@joebigelow / wix-1 / commits / 8b55203c

Correctly prefix the functions exposed from burnpipe.h

Rob Mensching committed Jan 11, 2024 at 00:17 UTC 8b55203c8b5a66362464f0738380932ac49918be
10 files changed +115 -115
src/burn/engine/burnpipe.cpp
+25 -25
@@ -13,10 +13,10 @@ static HRESULT ChildPipeConnected(
13
14
15 /*******************************************************************
16 - PipeConnectionInitialize - initialize pipe connection data.
16 + BurnPipeConnectionInitialize - initialize pipe connection data.
17
18 *******************************************************************/
19 -void PipeConnectionInitialize(
19 +void BurnPipeConnectionInitialize(
20 __in BURN_PIPE_CONNECTION* pConnection
21 )
22 {
@@ -27,10 +27,10 @@ void PipeConnectionInitialize(
27 }
28
29 /*******************************************************************
30 - PipeConnectionUninitialize - free data in a pipe connection.
30 + BurnPipeConnectionUninitialize - free data in a pipe connection.
31
32 *******************************************************************/
33 -void PipeConnectionUninitialize(
33 +void BurnPipeConnectionUninitialize(
34 __in BURN_PIPE_CONNECTION* pConnection
35 )
36 {
@@ -41,14 +41,14 @@ void PipeConnectionUninitialize(
41 ReleaseStr(pConnection->sczSecret);
42 ReleaseStr(pConnection->sczName);
43
44 - PipeConnectionInitialize(pConnection);
44 + BurnPipeConnectionInitialize(pConnection);
45 }
46
47 /*******************************************************************
48 - PipeSendMessage -
48 + BurnPipeSendMessage -
49
50 *******************************************************************/
51 -extern "C" HRESULT PipeSendMessage(
51 +extern "C" HRESULT BurnPipeSendMessage(
52 __in HANDLE hPipe,
53 __in DWORD dwMessage,
54 __in_bcount_opt(cbData) LPVOID pvData,
@@ -64,7 +64,7 @@ extern "C" HRESULT PipeSendMessage(
64 hr = PipeWriteMessage(hPipe, dwMessage, pvData, cbData);
65 ExitOnFailure(hr, "Failed to write send message to pipe.");
66
67 - hr = PipePumpMessages(hPipe, pfnCallback, pvContext, &result);
67 + hr = BurnPipePumpMessages(hPipe, pfnCallback, pvContext, &result);
68 ExitOnFailure(hr, "Failed to pump messages during send message to pipe.");
69
70 *pdwResult = result.dwResult;
@@ -74,10 +74,10 @@ LExit:
74 }
75
76 /*******************************************************************
77 - PipePumpMessages -
77 + BurnPipePumpMessages -
78
79 *******************************************************************/
80 -extern "C" HRESULT PipePumpMessages(
80 +extern "C" HRESULT BurnPipePumpMessages(
81 __in HANDLE hPipe,
82 __in_opt PFN_PIPE_MESSAGE_CALLBACK pfnCallback,
83 __in_opt LPVOID pvContext,
@@ -111,7 +111,7 @@ extern "C" HRESULT PipePumpMessages(
111 if (!msg.pvData || sizeof(DWORD) != msg.cbData)
112 {
113 hr = E_INVALIDARG;
114 - ExitOnRootFailure(hr, "No status returned to PipePumpMessages()");
114 + ExitOnRootFailure(hr, "No status returned to BurnPipePumpMessages()");
115 }
116
117 pResult->dwResult = *static_cast<DWORD*>(msg.pvData);
@@ -121,12 +121,12 @@ extern "C" HRESULT PipePumpMessages(
121 iData = 0;
122
123 hr = BuffReadNumber(static_cast<BYTE*>(msg.pvData), msg.cbData, &iData, &pResult->dwResult);
124 - ExitOnFailure(hr, "Failed to read returned result to PipePumpMessages()");
124 + ExitOnFailure(hr, "Failed to read returned result to BurnPipePumpMessages()");
125
126 if (sizeof(DWORD) * 2 == msg.cbData)
127 {
128 hr = BuffReadNumber(static_cast<BYTE*>(msg.pvData), msg.cbData, &iData, (DWORD*)&pResult->fRestart);
129 - ExitOnFailure(hr, "Failed to read returned restart to PipePumpMessages()");
129 + ExitOnFailure(hr, "Failed to read returned restart to BurnPipePumpMessages()");
130 }
131
132 ExitFunction1(hr = S_OK); // exit loop.
@@ -165,10 +165,10 @@ LExit:
165 }
166
167 /*******************************************************************
168 - PipeCreateNameAndSecret -
168 + BurnPipeCreateNameAndSecret -
169
170 *******************************************************************/
171 -extern "C" HRESULT PipeCreateNameAndSecret(
171 +extern "C" HRESULT BurnPipeCreateNameAndSecret(
172 __out_z LPWSTR *psczConnectionName,
173 __out_z LPWSTR *psczSecret
174 )
@@ -205,10 +205,10 @@ LExit:
205 }
206
207 /*******************************************************************
208 - PipeCreatePipes - create the pipes and event to signal child process.
208 + BurnPipeCreatePipes - create the pipes and event to signal child process.
209
210 *******************************************************************/
211 -extern "C" HRESULT PipeCreatePipes(
211 +extern "C" HRESULT BurnPipeCreatePipes(
212 __in BURN_PIPE_CONNECTION* pConnection,
213 __in BOOL fCompanion
214 )
@@ -287,10 +287,10 @@ LExit:
287 }
288
289 /*******************************************************************
290 - PipeWaitForChildConnect -
290 + BurnPipeWaitForChildConnect -
291
292 *******************************************************************/
293 -extern "C" HRESULT PipeWaitForChildConnect(
293 +extern "C" HRESULT BurnPipeWaitForChildConnect(
294 __in BURN_PIPE_CONNECTION* pConnection
295 )
296 {
@@ -335,10 +335,10 @@ LExit:
335 }
336
337 /*******************************************************************
338 - PipeTerminateLoggingPipe -
338 + BurnPipeTerminateLoggingPipe -
339
340 *******************************************************************/
341 -extern "C" HRESULT PipeTerminateLoggingPipe(
341 +extern "C" HRESULT BurnPipeTerminateLoggingPipe(
342 __in HANDLE hLoggingPipe,
343 __in DWORD dwParentExitCode
344 )
@@ -361,10 +361,10 @@ LExit:
361 }
362
363 /*******************************************************************
364 - PipeTerminateChildProcess -
364 + BurnPipeTerminateChildProcess -
365
366 *******************************************************************/
367 -extern "C" HRESULT PipeTerminateChildProcess(
367 +extern "C" HRESULT BurnPipeTerminateChildProcess(
368 __in BURN_PIPE_CONNECTION* pConnection,
369 __in DWORD dwParentExitCode,
370 __in BOOL fRestart
@@ -425,11 +425,11 @@ LExit:
425 }
426
427 /*******************************************************************
428 - PipeChildConnect - Called from the child process to connect back
428 + BurnPipeChildConnect - Called from the child process to connect back
429 to the pipe provided by the parent process.
430
431 *******************************************************************/
432 -extern "C" HRESULT PipeChildConnect(
432 +extern "C" HRESULT BurnPipeChildConnect(
433 __in BURN_PIPE_CONNECTION* pConnection,
434 __in BOOL fCompanion
435 )
src/burn/engine/burnpipe.h
+10 -10
@@ -40,13 +40,13 @@ typedef HRESULT (*PFN_PIPE_MESSAGE_CALLBACK)(
40
41
42 // Common functions.
43 -void PipeConnectionInitialize(
43 +void BurnPipeConnectionInitialize(
44 __in BURN_PIPE_CONNECTION* pConnection
45 );
46 -void PipeConnectionUninitialize(
46 +void BurnPipeConnectionUninitialize(
47 __in BURN_PIPE_CONNECTION* pConnection
48 );
49 -HRESULT PipeSendMessage(
49 +HRESULT BurnPipeSendMessage(
50 __in HANDLE hPipe,
51 __in DWORD dwMessage,
52 __in_bcount_opt(cbData) LPVOID pvData,
@@ -55,7 +55,7 @@ HRESULT PipeSendMessage(
55 __in_opt LPVOID pvContext,
56 __out DWORD* pdwResult
57 );
58 -HRESULT PipePumpMessages(
58 +HRESULT BurnPipePumpMessages(
59 __in HANDLE hPipe,
60 __in_opt PFN_PIPE_MESSAGE_CALLBACK pfnCallback,
61 __in_opt LPVOID pvContext,
@@ -63,29 +63,29 @@ HRESULT PipePumpMessages(
63 );
64
65 // Parent functions.
66 -HRESULT PipeCreateNameAndSecret(
66 +HRESULT BurnPipeCreateNameAndSecret(
67 __out_z LPWSTR *psczConnectionName,
68 __out_z LPWSTR *psczSecret
69 );
70 -HRESULT PipeCreatePipes(
70 +HRESULT BurnPipeCreatePipes(
71 __in BURN_PIPE_CONNECTION* pConnection,
72 __in BOOL fCompanion
73 );
74 -HRESULT PipeWaitForChildConnect(
74 +HRESULT BurnPipeWaitForChildConnect(
75 __in BURN_PIPE_CONNECTION* pConnection
76 );
77 -HRESULT PipeTerminateLoggingPipe(
77 +HRESULT BurnPipeTerminateLoggingPipe(
78 __in HANDLE hLoggingPipe,
79 __in DWORD dwParentExitCode
80 );
81 -HRESULT PipeTerminateChildProcess(
81 +HRESULT BurnPipeTerminateChildProcess(
82 __in BURN_PIPE_CONNECTION* pConnection,
83 __in DWORD dwParentExitCode,
84 __in BOOL fRestart
85 );
86
87 // Child functions.
88 -HRESULT PipeChildConnect(
88 +HRESULT BurnPipeChildConnect(
89 __in BURN_PIPE_CONNECTION* pConnection,
90 __in BOOL fCompanion
91 );
src/burn/engine/core.cpp
+3 -3
@@ -227,7 +227,7 @@ extern "C" HRESULT CoreInitializeConstants(
227 hr = StrAllocString(&pRegistration->sczBundlePackageAncestors, pRegistration->sczId, 0);
228 ExitOnFailure(hr, "Failed to copy self to bundle package ancestors.");
229 }
230 -
230 +
231 for (DWORD i = 0; i < pEngineState->packages.cPackages; ++i)
232 {
233 BURN_PACKAGE* pPackage = pEngineState->packages.rgPackages + i;
@@ -2285,7 +2285,7 @@ static HRESULT DetectPackage(
2285 {
2286 HRESULT hr = S_OK;
2287 BOOL fBegan = FALSE;
2288 -
2288 +
2289 fBegan = TRUE;
2290 hr = UserExperienceOnDetectPackageBegin(&pEngineState->userExperience, pPackage->sczId);
2291 ExitOnRootFailure(hr, "BA aborted detect package begin.");
@@ -2423,7 +2423,7 @@ static DWORD WINAPI LoggingThreadProc(
2423 BURN_ENGINE_STATE* pEngineState = reinterpret_cast<BURN_ENGINE_STATE*>(lpThreadParameter);
2424 BURN_PIPE_RESULT result = { };
2425
2426 - hr = PipePumpMessages(pEngineState->companionConnection.hLoggingPipe, NULL, NULL, &result);
2426 + hr = BurnPipePumpMessages(pEngineState->companionConnection.hLoggingPipe, NULL, NULL, &result);
2427 ExitOnFailure(hr, "Failed to pump logging messages for elevated process.");
2428
2429 hr = (HRESULT)result.dwResult;
src/burn/engine/elevation.cpp
+41 -41
@@ -423,10 +423,10 @@ extern "C" HRESULT ElevationElevate(
423 hr = UserExperienceOnElevateBegin(&pEngineState->userExperience);
424 ExitOnRootFailure(hr, "BA aborted elevation requirement.");
425
426 - hr = PipeCreateNameAndSecret(&pEngineState->companionConnection.sczName, &pEngineState->companionConnection.sczSecret);
426 + hr = BurnPipeCreateNameAndSecret(&pEngineState->companionConnection.sczName, &pEngineState->companionConnection.sczSecret);
427 ExitOnFailure(hr, "Failed to create pipe name and client token.");
428
429 - hr = PipeCreatePipes(&pEngineState->companionConnection, TRUE);
429 + hr = BurnPipeCreatePipes(&pEngineState->companionConnection, TRUE);
430 ExitOnFailure(hr, "Failed to create pipe and cache pipe.");
431
432 LogId(REPORT_STANDARD, MSG_LAUNCH_ELEVATED_ENGINE_STARTING);
@@ -441,7 +441,7 @@ extern "C" HRESULT ElevationElevate(
441 {
442 LogId(REPORT_STANDARD, MSG_LAUNCH_ELEVATED_ENGINE_SUCCESS);
443
444 - hr = PipeWaitForChildConnect(&pEngineState->companionConnection);
444 + hr = BurnPipeWaitForChildConnect(&pEngineState->companionConnection);
445 if (HRESULT_FROM_WIN32(ERROR_NO_DATA) == hr)
446 {
447 hr = E_SUSPECTED_AV_INTERFERENCE;
@@ -466,7 +466,7 @@ extern "C" HRESULT ElevationElevate(
466 LExit:
467 if (FAILED(hr))
468 {
469 - PipeConnectionUninitialize(&pEngineState->companionConnection);
469 + BurnPipeConnectionUninitialize(&pEngineState->companionConnection);
470 }
471
472 UserExperienceOnElevateComplete(&pEngineState->userExperience, hr);
@@ -503,7 +503,7 @@ extern "C" HRESULT ElevationApplyInitialize(
503 ExitOnFailure(hr, "Failed to write variables.");
504
505 // send message
506 - hr = PipeSendMessage(hPipe, BURN_ELEVATION_MESSAGE_TYPE_APPLY_INITIALIZE, pbData, cbData, ProcessApplyInitializeMessages, &context, &dwResult);
506 + hr = BurnPipeSendMessage(hPipe, BURN_ELEVATION_MESSAGE_TYPE_APPLY_INITIALIZE, pbData, cbData, ProcessApplyInitializeMessages, &context, &dwResult);
507 ExitOnFailure(hr, "Failed to send message to per-machine process.");
508
509 hr = (HRESULT)dwResult;
@@ -534,7 +534,7 @@ extern "C" HRESULT ElevationApplyUninitialize(
534 DWORD dwResult = 0;
535
536 // send message
537 - hr = PipeSendMessage(hPipe, BURN_ELEVATION_MESSAGE_TYPE_APPLY_UNINITIALIZE, pbData, cbData, NULL, NULL, &dwResult);
537 + hr = BurnPipeSendMessage(hPipe, BURN_ELEVATION_MESSAGE_TYPE_APPLY_UNINITIALIZE, pbData, cbData, NULL, NULL, &dwResult);
538 ExitOnFailure(hr, "Failed to send message to per-machine process.");
539
540 hr = (HRESULT)dwResult;
@@ -592,7 +592,7 @@ extern "C" HRESULT ElevationSessionBegin(
592 ExitOnFailure(hr, "Failed to write variables.");
593
594 // send message
595 - hr = PipeSendMessage(hPipe, BURN_ELEVATION_MESSAGE_TYPE_SESSION_BEGIN, pbData, cbData, NULL, NULL, &dwResult);
595 + hr = BurnPipeSendMessage(hPipe, BURN_ELEVATION_MESSAGE_TYPE_SESSION_BEGIN, pbData, cbData, NULL, NULL, &dwResult);
596 ExitOnFailure(hr, "Failed to send message to per-machine process.");
597
598 hr = (HRESULT)dwResult;
@@ -638,7 +638,7 @@ extern "C" HRESULT ElevationSessionEnd(
638 ExitOnFailure(hr, "Failed to write registration type to message buffer.");
639
640 // send message
641 - hr = PipeSendMessage(hPipe, BURN_ELEVATION_MESSAGE_TYPE_SESSION_END, pbData, cbData, NULL, NULL, &dwResult);
641 + hr = BurnPipeSendMessage(hPipe, BURN_ELEVATION_MESSAGE_TYPE_SESSION_END, pbData, cbData, NULL, NULL, &dwResult);
642 ExitOnFailure(hr, "Failed to send message to per-machine process.");
643
644 hr = (HRESULT)dwResult;
@@ -663,7 +663,7 @@ HRESULT ElevationSaveState(
663 DWORD dwResult = 0;
664
665 // send message
666 - hr = PipeSendMessage(hPipe, BURN_ELEVATION_MESSAGE_TYPE_SAVE_STATE, pbBuffer, cbBuffer, NULL, NULL, &dwResult);
666 + hr = BurnPipeSendMessage(hPipe, BURN_ELEVATION_MESSAGE_TYPE_SAVE_STATE, pbBuffer, cbBuffer, NULL, NULL, &dwResult);
667 ExitOnFailure(hr, "Failed to send message to per-machine process.");
668
669 hr = (HRESULT)dwResult;
@@ -687,7 +687,7 @@ extern "C" HRESULT ElevationCachePreparePackage(
687 ExitOnFailure(hr, "Failed to write package id to message buffer.");
688
689 // Send message.
690 - hr = PipeSendMessage(hPipe, BURN_ELEVATION_MESSAGE_TYPE_CACHE_PREPARE_PACKAGE, pbData, cbData, NULL, NULL, &dwResult);
690 + hr = BurnPipeSendMessage(hPipe, BURN_ELEVATION_MESSAGE_TYPE_CACHE_PREPARE_PACKAGE, pbData, cbData, NULL, NULL, &dwResult);
691 ExitOnFailure(hr, "Failed to send BURN_ELEVATION_MESSAGE_TYPE_CACHE_PREPARE_PACKAGE message to per-machine process.");
692
693 hr = (HRESULT)dwResult;
@@ -737,7 +737,7 @@ extern "C" HRESULT ElevationCacheCompletePayload(
737 ExitOnFailure(hr, "Failed to write move flag to message buffer.");
738
739 // send message
740 - hr = PipeSendMessage(hPipe, BURN_ELEVATION_MESSAGE_TYPE_CACHE_COMPLETE_PAYLOAD, pbData, cbData, ProcessBurnCacheMessages, &context, &dwResult);
740 + hr = BurnPipeSendMessage(hPipe, BURN_ELEVATION_MESSAGE_TYPE_CACHE_COMPLETE_PAYLOAD, pbData, cbData, ProcessBurnCacheMessages, &context, &dwResult);
741 ExitOnFailure(hr, "Failed to send BURN_ELEVATION_MESSAGE_TYPE_CACHE_COMPLETE_PAYLOAD message to per-machine process.");
742
743 hr = (HRESULT)dwResult;
@@ -775,7 +775,7 @@ extern "C" HRESULT ElevationCacheVerifyPayload(
775 ExitOnFailure(hr, "Failed to write payload id to message buffer.");
776
777 // send message
778 - hr = PipeSendMessage(hPipe, BURN_ELEVATION_MESSAGE_TYPE_CACHE_VERIFY_PAYLOAD, pbData, cbData, ProcessBurnCacheMessages, &context, &dwResult);
778 + hr = BurnPipeSendMessage(hPipe, BURN_ELEVATION_MESSAGE_TYPE_CACHE_VERIFY_PAYLOAD, pbData, cbData, ProcessBurnCacheMessages, &context, &dwResult);
779 ExitOnFailure(hr, "Failed to send BURN_ELEVATION_MESSAGE_TYPE_CACHE_VERIFY_PAYLOAD message to per-machine process.");
780
781 hr = (HRESULT)dwResult;
@@ -798,7 +798,7 @@ extern "C" HRESULT ElevationCacheCleanup(
798 DWORD dwResult = 0;
799
800 // send message
801 - hr = PipeSendMessage(hPipe, BURN_ELEVATION_MESSAGE_TYPE_CACHE_CLEANUP, NULL, 0, NULL, NULL, &dwResult);
801 + hr = BurnPipeSendMessage(hPipe, BURN_ELEVATION_MESSAGE_TYPE_CACHE_CLEANUP, NULL, 0, NULL, NULL, &dwResult);
802 ExitOnFailure(hr, "Failed to send BURN_ELEVATION_MESSAGE_TYPE_CACHE_CLEANUP message to per-machine process.");
803
804 hr = (HRESULT)dwResult;
@@ -828,7 +828,7 @@ extern "C" HRESULT ElevationProcessDependentRegistration(
828 ExitOnFailure(hr, "Failed to write dependent provider key to message buffer.");
829
830 // send message
831 - hr = PipeSendMessage(hPipe, BURN_ELEVATION_MESSAGE_TYPE_PROCESS_DEPENDENT_REGISTRATION, pbData, cbData, NULL, NULL, &dwResult);
831 + hr = BurnPipeSendMessage(hPipe, BURN_ELEVATION_MESSAGE_TYPE_PROCESS_DEPENDENT_REGISTRATION, pbData, cbData, NULL, NULL, &dwResult);
832 ExitOnFailure(hr, "Failed to send BURN_ELEVATION_MESSAGE_TYPE_PROCESS_DEPENDENT_REGISTRATION message to per-machine process.");
833
834 hr = (HRESULT)dwResult;
@@ -888,7 +888,7 @@ extern "C" HRESULT ElevationExecuteRelatedBundle(
888 context.pfnGenericMessageHandler = pfnGenericMessageHandler;
889 context.pvContext = pvContext;
890
891 - hr = PipeSendMessage(hPipe, BURN_ELEVATION_MESSAGE_TYPE_EXECUTE_RELATED_BUNDLE, pbData, cbData, ProcessGenericExecuteMessages, &context, &dwResult);
891 + hr = BurnPipeSendMessage(hPipe, BURN_ELEVATION_MESSAGE_TYPE_EXECUTE_RELATED_BUNDLE, pbData, cbData, ProcessGenericExecuteMessages, &context, &dwResult);
892 ExitOnFailure(hr, "Failed to send BURN_ELEVATION_MESSAGE_TYPE_EXECUTE_RELATED_BUNDLE message to per-machine process.");
893
894 hr = static_cast<HRESULT>(dwResult);
@@ -952,7 +952,7 @@ extern "C" HRESULT ElevationExecuteBundlePackage(
952 context.pfnGenericMessageHandler = pfnGenericMessageHandler;
953 context.pvContext = pvContext;
954
955 - hr = PipeSendMessage(hPipe, BURN_ELEVATION_MESSAGE_TYPE_EXECUTE_BUNDLE_PACKAGE, pbData, cbData, ProcessGenericExecuteMessages, &context, &dwResult);
955 + hr = BurnPipeSendMessage(hPipe, BURN_ELEVATION_MESSAGE_TYPE_EXECUTE_BUNDLE_PACKAGE, pbData, cbData, ProcessGenericExecuteMessages, &context, &dwResult);
956 ExitOnFailure(hr, "Failed to send BURN_ELEVATION_MESSAGE_TYPE_EXECUTE_BUNDLE_PACKAGE message to per-machine process.");
957
958 hr = static_cast<HRESULT>(dwResult);
@@ -1007,7 +1007,7 @@ extern "C" HRESULT ElevationExecuteExePackage(
1007 context.pfnGenericMessageHandler = pfnGenericMessageHandler;
1008 context.pvContext = pvContext;
1009
1010 - hr = PipeSendMessage(hPipe, BURN_ELEVATION_MESSAGE_TYPE_EXECUTE_EXE_PACKAGE, pbData, cbData, ProcessGenericExecuteMessages, &context, &dwResult);
1010 + hr = BurnPipeSendMessage(hPipe, BURN_ELEVATION_MESSAGE_TYPE_EXECUTE_EXE_PACKAGE, pbData, cbData, ProcessGenericExecuteMessages, &context, &dwResult);
1011 ExitOnFailure(hr, "Failed to send BURN_ELEVATION_MESSAGE_TYPE_EXECUTE_EXE_PACKAGE message to per-machine process.");
1012
1013 hr = static_cast<HRESULT>(dwResult);
@@ -1036,7 +1036,7 @@ extern "C" HRESULT ElevationMsiBeginTransaction(
1036 hr = BuffWriteString(&pbData, &cbData, pRollbackBoundary->sczLogPath);
1037 ExitOnFailure(hr, "Failed to write transaction log path to message buffer.");
1038
1039 - hr = PipeSendMessage(hPipe, BURN_ELEVATION_MESSAGE_TYPE_BEGIN_MSI_TRANSACTION, pbData, cbData, NULL, NULL, &dwResult);
1039 + hr = BurnPipeSendMessage(hPipe, BURN_ELEVATION_MESSAGE_TYPE_BEGIN_MSI_TRANSACTION, pbData, cbData, NULL, NULL, &dwResult);
1040 ExitOnFailure(hr, "Failed to send BURN_ELEVATION_MESSAGE_TYPE_BEGIN_MSI_TRANSACTION message to per-machine process.");
1041
1042 hr = static_cast<HRESULT>(dwResult);
@@ -1072,7 +1072,7 @@ extern "C" HRESULT ElevationMsiCommitTransaction(
1072 context.pfnMessageHandler = pfnMessageHandler;
1073 context.pvContext = pvContext;
1074
1075 - hr = PipeSendMessage(hPipe, BURN_ELEVATION_MESSAGE_TYPE_COMMIT_MSI_TRANSACTION, pbData, cbData, ProcessMsiPackageMessages, &context, &dwResult);
1075 + hr = BurnPipeSendMessage(hPipe, BURN_ELEVATION_MESSAGE_TYPE_COMMIT_MSI_TRANSACTION, pbData, cbData, ProcessMsiPackageMessages, &context, &dwResult);
1076 ExitOnFailure(hr, "Failed to send BURN_ELEVATION_MESSAGE_TYPE_COMMIT_MSI_TRANSACTION message to per-machine process.");
1077
1078 hr = static_cast<HRESULT>(dwResult);
@@ -1109,7 +1109,7 @@ extern "C" HRESULT ElevationMsiRollbackTransaction(
1109 context.pfnMessageHandler = pfnMessageHandler;
1110 context.pvContext = pvContext;
1111
1112 - hr = PipeSendMessage(hPipe, BURN_ELEVATION_MESSAGE_TYPE_ROLLBACK_MSI_TRANSACTION, pbData, cbData, ProcessMsiPackageMessages, &context, &dwResult);
1112 + hr = BurnPipeSendMessage(hPipe, BURN_ELEVATION_MESSAGE_TYPE_ROLLBACK_MSI_TRANSACTION, pbData, cbData, ProcessMsiPackageMessages, &context, &dwResult);
1113 ExitOnFailure(hr, "Failed to send BURN_ELEVATION_MESSAGE_TYPE_ROLLBACK_MSI_TRANSACTION message to per-machine process.");
1114
1115 hr = static_cast<HRESULT>(dwResult);
@@ -1196,7 +1196,7 @@ extern "C" HRESULT ElevationExecuteMsiPackage(
1196 context.pfnMessageHandler = pfnMessageHandler;
1197 context.pvContext = pvContext;
1198
1199 - hr = PipeSendMessage(hPipe, BURN_ELEVATION_MESSAGE_TYPE_EXECUTE_MSI_PACKAGE, pbData, cbData, ProcessMsiPackageMessages, &context, &dwResult);
1199 + hr = BurnPipeSendMessage(hPipe, BURN_ELEVATION_MESSAGE_TYPE_EXECUTE_MSI_PACKAGE, pbData, cbData, ProcessMsiPackageMessages, &context, &dwResult);
1200 ExitOnFailure(hr, "Failed to send BURN_ELEVATION_MESSAGE_TYPE_EXECUTE_MSI_PACKAGE message to per-machine process.");
1201
1202 hr = static_cast<HRESULT>(dwResult);
@@ -1276,7 +1276,7 @@ extern "C" HRESULT ElevationExecuteMspPackage(
1276 context.pfnMessageHandler = pfnMessageHandler;
1277 context.pvContext = pvContext;
1278
1279 - hr = PipeSendMessage(hPipe, BURN_ELEVATION_MESSAGE_TYPE_EXECUTE_MSP_PACKAGE, pbData, cbData, ProcessMsiPackageMessages, &context, &dwResult);
1279 + hr = BurnPipeSendMessage(hPipe, BURN_ELEVATION_MESSAGE_TYPE_EXECUTE_MSP_PACKAGE, pbData, cbData, ProcessMsiPackageMessages, &context, &dwResult);
1280 ExitOnFailure(hr, "Failed to send BURN_ELEVATION_MESSAGE_TYPE_EXECUTE_MSP_PACKAGE message to per-machine process.");
1281
1282 hr = static_cast<HRESULT>(dwResult);
@@ -1328,7 +1328,7 @@ extern "C" HRESULT ElevationExecuteMsuPackage(
1328 context.pfnGenericMessageHandler = pfnGenericMessageHandler;
1329 context.pvContext = pvContext;
1330
1331 - hr = PipeSendMessage(hPipe, BURN_ELEVATION_MESSAGE_TYPE_EXECUTE_MSU_PACKAGE, pbData, cbData, ProcessGenericExecuteMessages, &context, &dwResult);
1331 + hr = BurnPipeSendMessage(hPipe, BURN_ELEVATION_MESSAGE_TYPE_EXECUTE_MSU_PACKAGE, pbData, cbData, ProcessGenericExecuteMessages, &context, &dwResult);
1332 ExitOnFailure(hr, "Failed to send BURN_ELEVATION_MESSAGE_TYPE_EXECUTE_MSU_PACKAGE message to per-machine process.");
1333
1334 hr = static_cast<HRESULT>(dwResult);
@@ -1381,7 +1381,7 @@ extern "C" HRESULT ElevationUninstallMsiCompatiblePackage(
1381 context.pfnMessageHandler = pfnMessageHandler;
1382 context.pvContext = pvContext;
1383
1384 - hr = PipeSendMessage(hPipe, BURN_ELEVATION_MESSAGE_TYPE_UNINSTALL_MSI_COMPATIBLE_PACKAGE, pbData, cbData, ProcessMsiPackageMessages, &context, &dwResult);
1384 + hr = BurnPipeSendMessage(hPipe, BURN_ELEVATION_MESSAGE_TYPE_UNINSTALL_MSI_COMPATIBLE_PACKAGE, pbData, cbData, ProcessMsiPackageMessages, &context, &dwResult);
1385 ExitOnFailure(hr, "Failed to send BURN_ELEVATION_MESSAGE_TYPE_UNINSTALL_MSI_COMPATIBLE_PACKAGE message to per-machine process.");
1386
1387 hr = static_cast<HRESULT>(dwResult);
@@ -1421,7 +1421,7 @@ extern "C" HRESULT ElevationExecutePackageProviderAction(
1421 }
1422
1423 // Send the message.
1424 - hr = PipeSendMessage(hPipe, BURN_ELEVATION_MESSAGE_TYPE_EXECUTE_PACKAGE_PROVIDER, pbData, cbData, NULL, NULL, &dwResult);
1424 + hr = BurnPipeSendMessage(hPipe, BURN_ELEVATION_MESSAGE_TYPE_EXECUTE_PACKAGE_PROVIDER, pbData, cbData, NULL, NULL, &dwResult);
1425 ExitOnFailure(hr, "Failed to send BURN_ELEVATION_MESSAGE_TYPE_EXECUTE_PACKAGE_PROVIDER message to per-machine process.");
1426
1427 LExit:
@@ -1461,7 +1461,7 @@ extern "C" HRESULT ElevationExecutePackageDependencyAction(
1461 }
1462
1463 // Send the message.
1464 - hr = PipeSendMessage(hPipe, BURN_ELEVATION_MESSAGE_TYPE_EXECUTE_PACKAGE_DEPENDENCY, pbData, cbData, NULL, NULL, &dwResult);
1464 + hr = BurnPipeSendMessage(hPipe, BURN_ELEVATION_MESSAGE_TYPE_EXECUTE_PACKAGE_DEPENDENCY, pbData, cbData, NULL, NULL, &dwResult);
1465 ExitOnFailure(hr, "Failed to send BURN_ELEVATION_MESSAGE_TYPE_EXECUTE_PACKAGE_DEPENDENCY message to per-machine process.");
1466
1467 LExit:
@@ -1488,7 +1488,7 @@ extern "C" HRESULT ElevationCleanCompatiblePackage(
1488 ExitOnFailure(hr, "Failed to write compatible package id to message buffer.");
1489
1490 // send message
1491 - hr = PipeSendMessage(hPipe, BURN_ELEVATION_MESSAGE_TYPE_CLEAN_COMPATIBLE_PACKAGE, pbData, cbData, NULL, NULL, &dwResult);
1491 + hr = BurnPipeSendMessage(hPipe, BURN_ELEVATION_MESSAGE_TYPE_CLEAN_COMPATIBLE_PACKAGE, pbData, cbData, NULL, NULL, &dwResult);
1492 ExitOnFailure(hr, "Failed to send BURN_ELEVATION_MESSAGE_TYPE_CLEAN_COMPATIBLE_PACKAGE message to per-machine process.");
1493
1494 hr = (HRESULT)dwResult;
@@ -1518,7 +1518,7 @@ extern "C" HRESULT ElevationCleanPackage(
1518 ExitOnFailure(hr, "Failed to write clean package id to message buffer.");
1519
1520 // send message
1521 - hr = PipeSendMessage(hPipe, BURN_ELEVATION_MESSAGE_TYPE_CLEAN_PACKAGE, pbData, cbData, NULL, NULL, &dwResult);
1521 + hr = BurnPipeSendMessage(hPipe, BURN_ELEVATION_MESSAGE_TYPE_CLEAN_PACKAGE, pbData, cbData, NULL, NULL, &dwResult);
1522 ExitOnFailure(hr, "Failed to send BURN_ELEVATION_MESSAGE_TYPE_CLEAN_PACKAGE message to per-machine process.");
1523
1524 hr = (HRESULT)dwResult;
@@ -1552,7 +1552,7 @@ extern "C" HRESULT ElevationLaunchApprovedExe(
1552 ExitOnFailure(hr, "Failed to write approved exe WaitForInputIdle timeout to message buffer.");
1553
1554 // Send the message.
1555 - hr = PipeSendMessage(hPipe, BURN_ELEVATION_MESSAGE_TYPE_LAUNCH_APPROVED_EXE, pbData, cbData, ProcessLaunchApprovedExeMessages, &context, &dwResult);
1555 + hr = BurnPipeSendMessage(hPipe, BURN_ELEVATION_MESSAGE_TYPE_LAUNCH_APPROVED_EXE, pbData, cbData, ProcessLaunchApprovedExeMessages, &context, &dwResult);
1556 ExitOnFailure(hr, "Failed to send BURN_ELEVATION_MESSAGE_TYPE_LAUNCH_APPROVED_EXE message to per-machine process.");
1557
1558 hr = (HRESULT)dwResult;
@@ -1617,7 +1617,7 @@ extern "C" HRESULT ElevationChildPumpMessages(
1617 hCacheThread = ::CreateThread(NULL, 0, ElevatedChildCacheThreadProc, &cacheContext, 0, NULL);
1618 ExitOnNullWithLastError(hCacheThread, hr, "Failed to create elevated cache thread.");
1619
1620 - hr = PipePumpMessages(hPipe, ProcessElevatedChildMessage, &context, &result);
1620 + hr = BurnPipePumpMessages(hPipe, ProcessElevatedChildMessage, &context, &result);
1621 ExitOnFailure(hr, "Failed to pump messages in child process.");
1622
1623 // Wait for the cache thread and verify it gets the right result but don't fail if things
@@ -1705,7 +1705,7 @@ static DWORD WINAPI ElevatedChildCacheThreadProc(
1705 ExitOnFailure(hr, "Failed to initialize COM.");
1706 fComInitialized = TRUE;
1707
1708 - hr = PipePumpMessages(pContext->hPipe, ProcessElevatedChildCacheMessage, pContext, &result);
1708 + hr = BurnPipePumpMessages(pContext->hPipe, ProcessElevatedChildCacheMessage, pContext, &result);
1709 ExitOnFailure(hr, "Failed to pump messages in child process.");
1710
1711 hr = (HRESULT)result.dwResult;
@@ -3552,7 +3552,7 @@ static HRESULT CALLBACK BurnCacheMessageHandler(
3552 }
3553
3554 // send message
3555 - hr = PipeSendMessage(hPipe, dwMessage, pbData, cbData, NULL, NULL, &dwResult);
3555 + hr = BurnPipeSendMessage(hPipe, dwMessage, pbData, cbData, NULL, NULL, &dwResult);
3556 ExitOnFailure(hr, "Failed to send burn cache message to per-user process.");
3557
3558 hr = dwResult;
@@ -3589,7 +3589,7 @@ static DWORD CALLBACK ElevatedProgressRoutine(
3589 ExitOnFailure(hr, "Failed to write total bytes transferred progress to message buffer.");
3590
3591 // send message
3592 - hr = PipeSendMessage(hPipe, dwMessage, pbData, cbData, NULL, NULL, &dwResult);
3592 + hr = BurnPipeSendMessage(hPipe, dwMessage, pbData, cbData, NULL, NULL, &dwResult);
3593 ExitOnFailure(hr, "Failed to send progress routine message to per-user process.");
3594
3595 LExit:
@@ -3664,7 +3664,7 @@ static int GenericExecuteMessageHandler(
3664 }
3665
3666 // send message
3667 - hr = PipeSendMessage(hPipe, dwMessage, pbData, cbData, NULL, NULL, reinterpret_cast<DWORD*>(&nResult));
3667 + hr = BurnPipeSendMessage(hPipe, dwMessage, pbData, cbData, NULL, NULL, reinterpret_cast<DWORD*>(&nResult));
3668 ExitOnFailure(hr, "Failed to send message to per-user process.");
3669
3670 LExit:
@@ -3751,7 +3751,7 @@ static int MsiExecuteMessageHandler(
3751 }
3752
3753 // send message
3754 - hr = PipeSendMessage(hPipe, dwMessage, pbData, cbData, NULL, NULL, (DWORD*)&nResult);
3754 + hr = BurnPipeSendMessage(hPipe, dwMessage, pbData, cbData, NULL, NULL, (DWORD*)&nResult);
3755 ExitOnFailure(hr, "Failed to send msi message to per-user process.");
3756
3757 LExit:
@@ -3891,7 +3891,7 @@ static HRESULT OnLaunchApprovedExe(
3891 hr = BuffWriteNumber(&pbSendData, &cbSendData, dwProcessId);
3892 ExitOnFailure(hr, "Failed to write the approved exe process id to message buffer.");
3893
3894 - hr = PipeSendMessage(hPipe, BURN_ELEVATION_MESSAGE_TYPE_LAUNCH_APPROVED_EXE_PROCESSID, pbSendData, cbSendData, NULL, NULL, &dwResult);
3894 + hr = BurnPipeSendMessage(hPipe, BURN_ELEVATION_MESSAGE_TYPE_LAUNCH_APPROVED_EXE_PROCESSID, pbSendData, cbSendData, NULL, NULL, &dwResult);
3895 ExitOnFailure(hr, "Failed to send BURN_ELEVATION_MESSAGE_TYPE_LAUNCH_APPROVED_EXE_PROCESSID message to per-user process.");
3896
3897 LExit:
@@ -4032,7 +4032,7 @@ static HRESULT ElevatedOnPauseAUBegin(
4032 HRESULT hr = S_OK;
4033 DWORD dwResult = 0;
4034
4035 - hr = PipeSendMessage(hPipe, BURN_ELEVATION_MESSAGE_TYPE_APPLY_INITIALIZE_PAUSE_AU_BEGIN, NULL, 0, NULL, NULL, &dwResult);
4035 + hr = BurnPipeSendMessage(hPipe, BURN_ELEVATION_MESSAGE_TYPE_APPLY_INITIALIZE_PAUSE_AU_BEGIN, NULL, 0, NULL, NULL, &dwResult);
4036 ExitOnFailure(hr, "Failed to send BURN_ELEVATION_MESSAGE_TYPE_APPLY_INITIALIZE_PAUSE_AU_BEGIN message to per-user process.");
4037
4038 LExit:
@@ -4052,7 +4052,7 @@ static HRESULT ElevatedOnPauseAUComplete(
4052 hr = BuffWriteNumber(&pbSendData, &cbSendData, hrStatus);
4053 ExitOnFailure(hr, "Failed to write the pause au status to message buffer.");
4054
4055 - hr = PipeSendMessage(hPipe, BURN_ELEVATION_MESSAGE_TYPE_APPLY_INITIALIZE_PAUSE_AU_COMPLETE, pbSendData, cbSendData, NULL, NULL, &dwResult);
4055 + hr = BurnPipeSendMessage(hPipe, BURN_ELEVATION_MESSAGE_TYPE_APPLY_INITIALIZE_PAUSE_AU_COMPLETE, pbSendData, cbSendData, NULL, NULL, &dwResult);
4056 ExitOnFailure(hr, "Failed to send BURN_ELEVATION_MESSAGE_TYPE_APPLY_INITIALIZE_PAUSE_AU_COMPLETE message to per-user process.");
4057
4058 LExit:
@@ -4068,7 +4068,7 @@ static HRESULT ElevatedOnSystemRestorePointBegin(
4068 HRESULT hr = S_OK;
4069 DWORD dwResult = 0;
4070
4071 - hr = PipeSendMessage(hPipe, BURN_ELEVATION_MESSAGE_TYPE_APPLY_INITIALIZE_SYSTEM_RESTORE_POINT_BEGIN, NULL, 0, NULL, NULL, &dwResult);
4071 + hr = BurnPipeSendMessage(hPipe, BURN_ELEVATION_MESSAGE_TYPE_APPLY_INITIALIZE_SYSTEM_RESTORE_POINT_BEGIN, NULL, 0, NULL, NULL, &dwResult);
4072 ExitOnFailure(hr, "Failed to send BURN_ELEVATION_MESSAGE_TYPE_APPLY_INITIALIZE_SYSTEM_RESTORE_POINT_BEGIN message to per-user process.");
4073
4074 LExit:
@@ -4088,7 +4088,7 @@ static HRESULT ElevatedOnSystemRestorePointComplete(
4088 hr = BuffWriteNumber(&pbSendData, &cbSendData, hrStatus);
4089 ExitOnFailure(hr, "Failed to write the system restore point status to message buffer.");
4090
4091 - hr = PipeSendMessage(hPipe, BURN_ELEVATION_MESSAGE_TYPE_APPLY_INITIALIZE_SYSTEM_RESTORE_POINT_COMPLETE, pbSendData, cbSendData, NULL, NULL, &dwResult);
4091 + hr = BurnPipeSendMessage(hPipe, BURN_ELEVATION_MESSAGE_TYPE_APPLY_INITIALIZE_SYSTEM_RESTORE_POINT_COMPLETE, pbSendData, cbSendData, NULL, NULL, &dwResult);
4092 ExitOnFailure(hr, "Failed to send BURN_ELEVATION_MESSAGE_TYPE_APPLY_INITIALIZE_SYSTEM_RESTORE_POINT_COMPLETE message to per-user process.");
4093
4094 LExit:
@@ -4110,7 +4110,7 @@ static HRESULT ElevatedOnExecuteActionComplete(
4110 hr = BuffWriteNumber(&pbSendData, &cbSendData, restart);
4111 ExitOnFailure(hr, "Failed to write the restart type to message buffer.");
4112
4113 - hr = PipeSendMessage(hPipe, BURN_ELEVATION_MESSAGE_TYPE_EXECUTE_ACTION_COMPLETE, pbSendData, cbSendData, NULL, NULL, &dwResult);
4113 + hr = BurnPipeSendMessage(hPipe, BURN_ELEVATION_MESSAGE_TYPE_EXECUTE_ACTION_COMPLETE, pbSendData, cbSendData, NULL, NULL, &dwResult);
4114 ExitOnFailure(hr, "Failed to send BURN_ELEVATION_MESSAGE_TYPE_EXECUTE_ACTION_COMPLETE message to per-user process.");
4115
4116 LExit:
src/burn/engine/embedded.cpp
+6 -6
@@ -55,16 +55,16 @@ extern "C" HRESULT EmbeddedRunBundle(
55 PROCESS_INFORMATION pi = { };
56 BURN_PIPE_RESULT result = { };
57
58 - PipeConnectionInitialize(pConnection);
58 + BurnPipeConnectionInitialize(pConnection);
59
60 BURN_EMBEDDED_CALLBACK_CONTEXT context = { };
61 context.pfnGenericMessageHandler = pfnGenericMessageHandler;
62 context.pvContext = pvContext;
63
64 - hr = PipeCreateNameAndSecret(&pConnection->sczName, &pConnection->sczSecret);
64 + hr = BurnPipeCreateNameAndSecret(&pConnection->sczName, &pConnection->sczSecret);
65 ExitOnFailure(hr, "Failed to create embedded pipe name and client token.");
66
67 - hr = PipeCreatePipes(pConnection, FALSE);
67 + hr = BurnPipeCreatePipes(pConnection, FALSE);
68 ExitOnFailure(hr, "Failed to create embedded pipe.");
69
70 hr = StrAllocFormatted(&sczCommand, L"%ls -%ls %ls %ls %u", sczBaseCommand, BURN_COMMANDLINE_SWITCH_EMBEDDED, pConnection->sczName, pConnection->sczSecret, dwCurrentProcessId);
@@ -84,10 +84,10 @@ extern "C" HRESULT EmbeddedRunBundle(
84 pConnection->hProcess = pi.hProcess;
85 pi.hProcess = NULL;
86
87 - hr = PipeWaitForChildConnect(pConnection);
87 + hr = BurnPipeWaitForChildConnect(pConnection);
88 ExitOnFailure(hr, "Failed to wait for embedded process to connect to pipe.");
89
90 - hr = PipePumpMessages(pConnection->hPipe, ProcessEmbeddedMessages, &context, &result);
90 + hr = BurnPipePumpMessages(pConnection->hPipe, ProcessEmbeddedMessages, &context, &result);
91 ExitOnFailure(hr, "Failed to process messages from embedded message.");
92
93 // Get the return code from the embedded process.
@@ -99,7 +99,7 @@ LExit:
99 ReleaseHandle(pi.hProcess);
100
101 StrSecureZeroFreeString(sczCommand);
102 - PipeConnectionUninitialize(pConnection);
102 + BurnPipeConnectionUninitialize(pConnection);
103
104 return hr;
105 }
src/burn/engine/engine.cpp
+9 -9
@@ -303,7 +303,7 @@ LExit:
303 // end per-machine process if running
304 if (!fRunElevated && INVALID_HANDLE_VALUE != engineState.companionConnection.hPipe)
305 {
306 - PipeTerminateChildProcess(&engineState.companionConnection, *pdwExitCode, engineState.fRestart);
306 + BurnPipeTerminateChildProcess(&engineState.companionConnection, *pdwExitCode, engineState.fRestart);
307 }
308 else if (engineState.fRestart)
309 {
@@ -405,8 +405,8 @@ static HRESULT InitializeEngineState(
405
406 pEngineState->internalCommand.automaticUpdates = BURN_AU_PAUSE_ACTION_IFELEVATED;
407 ::InitializeCriticalSection(&pEngineState->userExperience.csEngineActive);
408 - PipeConnectionInitialize(&pEngineState->companionConnection);
409 - PipeConnectionInitialize(&pEngineState->embeddedConnection);
408 + BurnPipeConnectionInitialize(&pEngineState->companionConnection);
409 + BurnPipeConnectionInitialize(&pEngineState->embeddedConnection);
410
411 // Retain whether bundle was initially run elevated.
412 ProcElevated(::GetCurrentProcess(), &pEngineState->internalCommand.fInitiallyElevated);
@@ -443,8 +443,8 @@ static void UninitializeEngineState(
443 ReleaseHandle(pEngineState->elevatedLoggingContext.hLogEvent);
444 ReleaseHandle(pEngineState->elevatedLoggingContext.hFinishedEvent);
445
446 - PipeConnectionUninitialize(&pEngineState->embeddedConnection);
447 - PipeConnectionUninitialize(&pEngineState->companionConnection);
446 + BurnPipeConnectionUninitialize(&pEngineState->embeddedConnection);
447 + BurnPipeConnectionUninitialize(&pEngineState->companionConnection);
448 ReleaseStr(pEngineState->sczBundleEngineWorkingPath)
449
450 ReleaseHandle(pEngineState->hMessageWindowThread);
@@ -690,7 +690,7 @@ static HRESULT RunElevated(
690 ExitOnFailure(hr, "Failed to open elevated log.");
691
692 // connect to per-user process
693 - hr = PipeChildConnect(&pEngineState->companionConnection, TRUE);
693 + hr = BurnPipeChildConnect(&pEngineState->companionConnection, TRUE);
694 ExitOnFailure(hr, "Failed to connect to unelevated process.");
695
696 // Set up the context for the logging thread then
@@ -741,7 +741,7 @@ static HRESULT RunEmbedded(
741 HRESULT hr = S_OK;
742
743 // Connect to parent process.
744 - hr = PipeChildConnect(&pEngineState->embeddedConnection, FALSE);
744 + hr = BurnPipeChildConnect(&pEngineState->embeddedConnection, FALSE);
745 ExitOnFailure(hr, "Failed to connect to parent of embedded process.");
746
747 // Do not register the bundle to automatically restart if embedded.
@@ -965,7 +965,7 @@ static HRESULT LogStringOverPipe(
965 hr = BuffWriteStringAnsi(&pbData, &cbData, szString);
966 ExitOnFailure(hr, "Failed to prepare logging pipe message.");
967
968 - hr = PipeSendMessage(hPipe, static_cast<DWORD>(BURN_PIPE_MESSAGE_TYPE_LOG), pbData, cbData, NULL, NULL, &dwResult);
968 + hr = BurnPipeSendMessage(hPipe, static_cast<DWORD>(BURN_PIPE_MESSAGE_TYPE_LOG), pbData, cbData, NULL, NULL, &dwResult);
969 ExitOnFailure(hr, "Failed to send logging message over the pipe.");
970
971 hr = (HRESULT)dwResult;
@@ -1048,7 +1048,7 @@ LExit:
1048 LogRedirect(NULL, NULL); // No more messages will be logged over the pipe.
1049
1050 {
1051 - HRESULT hrTerminate = PipeTerminateLoggingPipe(pContext->hPipe, hr);
1051 + HRESULT hrTerminate = BurnPipeTerminateLoggingPipe(pContext->hPipe, hr);
1052 if (FAILED(hrTerminate))
1053 {
1054 TraceError(hrTerminate, "Failed to terminate logging pipe.");
src/burn/engine/externalengine.cpp
+2 -2
@@ -221,7 +221,7 @@ HRESULT ExternalEngineSendEmbeddedError(
221 hr = BuffWriteNumber(&pbData, &cbData, dwUIHint);
222 ExitOnFailure(hr, "Failed to write UI hint to message buffer.");
223
224 - hr = PipeSendMessage(pEngineState->embeddedConnection.hPipe, BURN_EMBEDDED_MESSAGE_TYPE_ERROR, pbData, cbData, ProcessUnknownEmbeddedMessages, NULL, &dwResult);
224 + hr = BurnPipeSendMessage(pEngineState->embeddedConnection.hPipe, BURN_EMBEDDED_MESSAGE_TYPE_ERROR, pbData, cbData, ProcessUnknownEmbeddedMessages, NULL, &dwResult);
225 ExitOnFailure(hr, "Failed to send embedded message over pipe.");
226
227 *pnResult = static_cast<int>(dwResult);
@@ -256,7 +256,7 @@ HRESULT ExternalEngineSendEmbeddedProgress(
256 hr = BuffWriteNumber(&pbData, &cbData, dwOverallProgressPercentage);
257 ExitOnFailure(hr, "Failed to write overall progress percentage to message buffer.");
258
259 - hr = PipeSendMessage(pEngineState->embeddedConnection.hPipe, BURN_EMBEDDED_MESSAGE_TYPE_PROGRESS, pbData, cbData, ProcessUnknownEmbeddedMessages, NULL, &dwResult);
259 + hr = BurnPipeSendMessage(pEngineState->embeddedConnection.hPipe, BURN_EMBEDDED_MESSAGE_TYPE_PROGRESS, pbData, cbData, ProcessUnknownEmbeddedMessages, NULL, &dwResult);
260 ExitOnFailure(hr, "Failed to send embedded progress message over pipe.");
261
262 *pnResult = static_cast<int>(dwResult);
src/burn/test/BurnUnitTest/ElevationTest.cpp
+9 -9
@@ -63,7 +63,7 @@ namespace Bootstrapper
63 ShelFunctionOverride(ElevateTest_ShellExecuteExW);
64 CoreFunctionOverride(NULL, ThrdWaitForCompletion);
65
66 - PipeConnectionInitialize(pConnection);
66 + BurnPipeConnectionInitialize(pConnection);
67
68 //
69 // per-user side setup
@@ -72,13 +72,13 @@ namespace Bootstrapper
72 TestThrowOnFailure(hr, L"Failed to elevate.");
73
74 // post execute message
75 - hr = PipeSendMessage(pConnection->hPipe, TEST_PARENT_SENT_MESSAGE_ID, NULL, 0, ProcessParentMessages, NULL, &dwResult);
75 + hr = BurnPipeSendMessage(pConnection->hPipe, TEST_PARENT_SENT_MESSAGE_ID, NULL, 0, ProcessParentMessages, NULL, &dwResult);
76 TestThrowOnFailure(hr, "Failed to post execute message to per-machine process.");
77
78 //
79 // initiate termination
80 //
81 - hr = PipeTerminateChildProcess(pConnection, 666, FALSE);
81 + hr = BurnPipeTerminateChildProcess(pConnection, 666, FALSE);
82 TestThrowOnFailure(hr, L"Failed to terminate elevated process.");
83
84 // check flags
@@ -86,7 +86,7 @@ namespace Bootstrapper
86 }
87 finally
88 {
89 - PipeConnectionUninitialize(pConnection);
89 + BurnPipeConnectionUninitialize(pConnection);
90 }
91 }
92 };
@@ -127,7 +127,7 @@ static DWORD CALLBACK ElevateTest_ThreadProc(
127 BURN_PIPE_CONNECTION connection = { };
128 BURN_PIPE_RESULT result = { };
129
130 - PipeConnectionInitialize(&connection);
130 + BurnPipeConnectionInitialize(&connection);
131
132 StrAlloc(&connection.sczName, MAX_PATH);
133 StrAlloc(&connection.sczSecret, MAX_PATH);
@@ -140,15 +140,15 @@ static DWORD CALLBACK ElevateTest_ThreadProc(
140 }
141
142 // set up connection with per-user process
143 - hr = PipeChildConnect(&connection, TRUE);
143 + hr = BurnPipeChildConnect(&connection, TRUE);
144 ExitOnFailure(hr, "Failed to connect to per-user process.");
145
146 // pump messages
147 - hr = PipePumpMessages(connection.hPipe, ProcessChildMessages, static_cast<LPVOID>(connection.hPipe), &result);
147 + hr = BurnPipePumpMessages(connection.hPipe, ProcessChildMessages, static_cast<LPVOID>(connection.hPipe), &result);
148 ExitOnFailure(hr, "Failed while pumping messages in child 'process'.");
149
150 LExit:
151 - PipeConnectionUninitialize(&connection);
151 + BurnPipeConnectionUninitialize(&connection);
152 ReleaseStr(sczArguments);
153
154 return FAILED(hr) ? (DWORD)hr : result.dwResult;
@@ -199,7 +199,7 @@ static HRESULT ProcessChildMessages(
199 {
200 case TEST_PARENT_SENT_MESSAGE_ID:
201 // send test message
202 - hr = PipeSendMessage(hPipe, TEST_CHILD_SENT_MESSAGE_ID, (LPVOID)TEST_MESSAGE_DATA, sizeof(TEST_MESSAGE_DATA), NULL, NULL, &dwResult);
202 + hr = BurnPipeSendMessage(hPipe, TEST_CHILD_SENT_MESSAGE_ID, (LPVOID)TEST_MESSAGE_DATA, sizeof(TEST_MESSAGE_DATA), NULL, NULL, &dwResult);
203 ExitOnFailure(hr, "Failed to send message to per-machine process.");
204 break;
205
src/burn/test/BurnUnitTest/EmbeddedTest.cpp
+5 -5
@@ -133,7 +133,7 @@ static DWORD CALLBACK EmbeddedTest_ThreadProc(
133
134 engineState.internalCommand.mode = BURN_MODE_EMBEDDED;
135
136 - PipeConnectionInitialize(pConnection);
136 + BurnPipeConnectionInitialize(pConnection);
137
138 StrAlloc(&pConnection->sczName, MAX_PATH);
139 StrAlloc(&pConnection->sczSecret, MAX_PATH);
@@ -145,11 +145,11 @@ static DWORD CALLBACK EmbeddedTest_ThreadProc(
145 }
146
147 // set up connection with parent bundle runner
148 - hr = PipeChildConnect(pConnection, FALSE);
148 + hr = BurnPipeChildConnect(pConnection, FALSE);
149 ExitOnFailure(hr, "Failed to connect to parent bundle runner.");
150
151 // post unknown message
152 - hr = PipeSendMessage(pConnection->hPipe, TEST_UNKNOWN_MESSAGE_ID, NULL, 0, NULL, NULL, &dwResult);
152 + hr = BurnPipeSendMessage(pConnection->hPipe, TEST_UNKNOWN_MESSAGE_ID, NULL, 0, NULL, NULL, &dwResult);
153 ExitOnFailure(hr, "Failed to post unknown message to parent bundle runner.");
154
155 if (E_NOTIMPL != dwResult)
@@ -162,7 +162,7 @@ static DWORD CALLBACK EmbeddedTest_ThreadProc(
162 ExitOnFailure(hr, "Failed to post known message to parent bundle runner.");
163
164 LExit:
165 - PipeConnectionUninitialize(pConnection);
165 + BurnPipeConnectionUninitialize(pConnection);
166 ReleaseStr(sczArguments);
167
168 return FAILED(hr) ? (DWORD)hr : dwResult;
@@ -179,7 +179,7 @@ static int EmbeddedTest_GenericMessageHandler(
179 if (GENERIC_EXECUTE_MESSAGE_ERROR == pMessage->type)
180 {
181 // post unknown message
182 - HRESULT hr = PipeSendMessage(pContext->connection.hPipe, TEST_UNKNOWN_MESSAGE_ID, NULL, 0, NULL, NULL, &dwResult);
182 + HRESULT hr = BurnPipeSendMessage(pContext->connection.hPipe, TEST_UNKNOWN_MESSAGE_ID, NULL, 0, NULL, NULL, &dwResult);
183 ExitOnFailure(hr, "Failed to post unknown message to embedded bundle.");
184
185 if (E_NOTIMPL != dwResult)
src/burn/test/BurnUnitTest/ExitCodeTest.cpp
+5 -5
@@ -130,7 +130,7 @@ static void LoadEngineState(
130 //
131 // initiate termination
132 //
133 - hr = PipeTerminateChildProcess(pConnection, 0, FALSE);
133 + hr = BurnPipeTerminateChildProcess(pConnection, 0, FALSE);
134 TestThrowOnFailure(hr, L"Failed to terminate elevated process.");
135
136 // check results
@@ -150,7 +150,7 @@ static void LoadEngineState(
150 finally
151 {
152 VariablesUninitialize(&engineState.variables);
153 - PipeConnectionUninitialize(pConnection);
153 + BurnPipeConnectionUninitialize(pConnection);
154 }
155 }
156
@@ -241,14 +241,14 @@ static DWORD CALLBACK ExitCodeTest_ElevationThreadProc(
241 }
242
243 // set up connection with per-user process
244 - hr = PipeChildConnect(pConnection, TRUE);
244 + hr = BurnPipeChildConnect(pConnection, TRUE);
245 ExitOnFailure(hr, "Failed to connect to per-user process.");
246
247 hr = ElevationChildPumpMessages(pConnection->hPipe, pConnection->hCachePipe, &engineState.approvedExes, &engineState.cache, &engineState.containers, &engineState.packages, &engineState.payloads, &engineState.variables, &engineState.registration, &engineState.userExperience, &hLock, &dwChildExitCode, &fRestart, &fApplying);
248 ExitOnFailure(hr, "Failed while pumping messages in child 'process'.");
249
250 LExit:
251 - PipeConnectionUninitialize(pConnection);
251 + BurnPipeConnectionUninitialize(pConnection);
252 VariablesUninitialize(&engineState.variables);
253 ReleaseStr(sczArguments);
254
@@ -358,7 +358,7 @@ static void LoadEngineState(
358
359 VariableInitialize(&pEngineState->variables);
360
361 - PipeConnectionInitialize(&pEngineState->companionConnection);
361 + BurnPipeConnectionInitialize(&pEngineState->companionConnection);
362
363 hr = CacheInitialize(&pEngineState->cache, &pEngineState->internalCommand);
364 TestThrowOnFailure(hr, "CacheInitialize failed.");