diff options
author | Sean Hall <r.sean.hall@gmail.com> | 2022-06-29 10:29:14 -0500 |
---|---|---|
committer | Sean Hall <r.sean.hall@gmail.com> | 2022-06-29 15:08:37 -0500 |
commit | ec413164bd0285d1e9b9d36538974641a109b579 (patch) | |
tree | a8c38c1c1c883eee7897efa179ce1379384871c8 /src/burn/engine/embedded.cpp | |
parent | 7cca75c8e95f129a21c33f1f4568e90e9e397f9d (diff) | |
download | wix-ec413164bd0285d1e9b9d36538974641a109b579.tar.gz wix-ec413164bd0285d1e9b9d36538974641a109b579.tar.bz2 wix-ec413164bd0285d1e9b9d36538974641a109b579.zip |
Add embedded test.
Diffstat (limited to 'src/burn/engine/embedded.cpp')
-rw-r--r-- | src/burn/engine/embedded.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/burn/engine/embedded.cpp b/src/burn/engine/embedded.cpp index 58af5574..4c3de98e 100644 --- a/src/burn/engine/embedded.cpp +++ b/src/burn/engine/embedded.cpp | |||
@@ -52,7 +52,6 @@ extern "C" HRESULT EmbeddedRunBundle( | |||
52 | DWORD dwCurrentProcessId = ::GetCurrentProcessId(); | 52 | DWORD dwCurrentProcessId = ::GetCurrentProcessId(); |
53 | HANDLE hCreatedPipesEvent = NULL; | 53 | HANDLE hCreatedPipesEvent = NULL; |
54 | LPWSTR sczCommand = NULL; | 54 | LPWSTR sczCommand = NULL; |
55 | STARTUPINFOW si = { }; | ||
56 | PROCESS_INFORMATION pi = { }; | 55 | PROCESS_INFORMATION pi = { }; |
57 | BURN_PIPE_RESULT result = { }; | 56 | BURN_PIPE_RESULT result = { }; |
58 | 57 | ||
@@ -79,10 +78,8 @@ extern "C" HRESULT EmbeddedRunBundle( | |||
79 | ExitOnFailure(hr, "Failed to append user args."); | 78 | ExitOnFailure(hr, "Failed to append user args."); |
80 | } | 79 | } |
81 | 80 | ||
82 | if (!::CreateProcessW(wzExecutablePath, sczCommand, NULL, NULL, TRUE, CREATE_NO_WINDOW, NULL, NULL, &si, &pi)) | 81 | hr = CoreCreateProcess(wzExecutablePath, sczCommand, TRUE, CREATE_NO_WINDOW, NULL, 0, &pi); |
83 | { | 82 | ExitOnFailure(hr, "Failed to create embedded process at path: %ls", wzExecutablePath); |
84 | ExitWithLastError(hr, "Failed to create embedded process at path: %ls", wzExecutablePath); | ||
85 | } | ||
86 | 83 | ||
87 | connection.dwProcessId = ::GetProcessId(pi.hProcess); | 84 | connection.dwProcessId = ::GetProcessId(pi.hProcess); |
88 | connection.hProcess = pi.hProcess; | 85 | connection.hProcess = pi.hProcess; |
@@ -95,7 +92,7 @@ extern "C" HRESULT EmbeddedRunBundle( | |||
95 | ExitOnFailure(hr, "Failed to process messages from embedded message."); | 92 | ExitOnFailure(hr, "Failed to process messages from embedded message."); |
96 | 93 | ||
97 | // Get the return code from the embedded process. | 94 | // Get the return code from the embedded process. |
98 | hr = ProcWaitForCompletion(connection.hProcess, INFINITE, pdwExitCode); | 95 | hr = CoreWaitForProcCompletion(connection.hProcess, INFINITE, pdwExitCode); |
99 | ExitOnFailure(hr, "Failed to wait for embedded executable: %ls", wzExecutablePath); | 96 | ExitOnFailure(hr, "Failed to wait for embedded executable: %ls", wzExecutablePath); |
100 | 97 | ||
101 | LExit: | 98 | LExit: |