summaryrefslogtreecommitdiff
path: root/src/burn/engine/netfxchainer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/burn/engine/netfxchainer.cpp')
-rw-r--r--src/burn/engine/netfxchainer.cpp16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/burn/engine/netfxchainer.cpp b/src/burn/engine/netfxchainer.cpp
index af4f03f5..6f223eed 100644
--- a/src/burn/engine/netfxchainer.cpp
+++ b/src/burn/engine/netfxchainer.cpp
@@ -329,8 +329,9 @@ LExit:
329} 329}
330 330
331extern "C" HRESULT NetFxRunChainer( 331extern "C" HRESULT NetFxRunChainer(
332 __in LPCWSTR wzExecutablePath, 332 __in_z LPCWSTR wzExecutablePath,
333 __in LPCWSTR wzArguments, 333 __in_z LPWSTR sczBaseCommand,
334 __in_z_opt LPCWSTR wzUserArgs,
334 __in PFN_GENERICMESSAGEHANDLER pfnGenericMessageHandler, 335 __in PFN_GENERICMESSAGEHANDLER pfnGenericMessageHandler,
335 __in LPVOID pvContext, 336 __in LPVOID pvContext,
336 __out DWORD* pdwExitCode 337 __out DWORD* pdwExitCode
@@ -360,8 +361,15 @@ extern "C" HRESULT NetFxRunChainer(
360 hr = CreateNetFxChainer(sczSectionName, sczEventName, &pNetfxChainer); 361 hr = CreateNetFxChainer(sczSectionName, sczEventName, &pNetfxChainer);
361 ExitOnFailure(hr, "Failed to create netfx chainer."); 362 ExitOnFailure(hr, "Failed to create netfx chainer.");
362 363
363 hr = StrAllocFormattedSecure(&sczCommand, L"%ls /pipe %ls", wzArguments, sczSectionName); 364 hr = StrAllocFormatted(&sczCommand, L"%ls /pipe %ls", sczBaseCommand, sczSectionName);
364 ExitOnFailure(hr, "Failed to allocate netfx chainer arguments."); 365 ExitOnFailure(hr, "Failed to append netfx chainer args.");
366
367 // Always add user supplied arguments last.
368 if (wzUserArgs)
369 {
370 hr = StrAllocConcatFormattedSecure(&sczCommand, L" %ls", wzUserArgs);
371 ExitOnFailure(hr, "Failed to append user args.");
372 }
365 373
366 si.cb = sizeof(si); 374 si.cb = sizeof(si);
367 if (!::CreateProcessW(wzExecutablePath, sczCommand, NULL, NULL, FALSE, CREATE_NO_WINDOW, NULL, NULL, &si, &pi)) 375 if (!::CreateProcessW(wzExecutablePath, sczCommand, NULL, NULL, FALSE, CREATE_NO_WINDOW, NULL, NULL, &si, &pi))