diff options
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: |