From ec413164bd0285d1e9b9d36538974641a109b579 Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Wed, 29 Jun 2022 10:29:14 -0500 Subject: Add embedded test. --- src/burn/engine/engine.cpp | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'src/burn/engine/engine.cpp') diff --git a/src/burn/engine/engine.cpp b/src/burn/engine/engine.cpp index 13075497..413db69b 100644 --- a/src/burn/engine/engine.cpp +++ b/src/burn/engine/engine.cpp @@ -445,7 +445,6 @@ static HRESULT RunUntrusted( LPWSTR sczCachedCleanRoomBundlePath = NULL; LPWSTR sczParameters = NULL; LPWSTR sczFullCommandLine = NULL; - STARTUPINFOW si = { }; PROCESS_INFORMATION pi = { }; HANDLE hFileAttached = NULL; HANDLE hFileSelf = NULL; @@ -484,12 +483,8 @@ static HRESULT RunUntrusted( hr = StrAllocFormattedSecure(&sczFullCommandLine, L"\"%ls\" %ls", wzCleanRoomBundlePath, sczParameters); ExitOnFailure(hr, "Failed to allocate full command-line."); - si.cb = sizeof(si); - si.wShowWindow = static_cast(pEngineState->command.nCmdShow); - if (!::CreateProcessW(wzCleanRoomBundlePath, sczFullCommandLine, NULL, NULL, TRUE, 0, NULL, NULL, &si, &pi)) - { - ExitWithLastError(hr, "Failed to launch clean room process: %ls", sczFullCommandLine); - } + hr = CoreCreateProcess(wzCleanRoomBundlePath, sczFullCommandLine, TRUE, 0, NULL, static_cast(pEngineState->command.nCmdShow), &pi); + ExitOnFailure(hr, "Failed to launch clean room process: %ls", sczFullCommandLine); hProcess = pi.hProcess; pi.hProcess = NULL; -- cgit v1.2.3-55-g6feb