summaryrefslogtreecommitdiff
path: root/src/burn/engine/elevation.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/burn/engine/elevation.cpp')
-rw-r--r--src/burn/engine/elevation.cpp82
1 files changed, 41 insertions, 41 deletions
diff --git a/src/burn/engine/elevation.cpp b/src/burn/engine/elevation.cpp
index 10ae74a4..f357a8fc 100644
--- a/src/burn/engine/elevation.cpp
+++ b/src/burn/engine/elevation.cpp
@@ -423,10 +423,10 @@ extern "C" HRESULT ElevationElevate(
423 hr = UserExperienceOnElevateBegin(&pEngineState->userExperience); 423 hr = UserExperienceOnElevateBegin(&pEngineState->userExperience);
424 ExitOnRootFailure(hr, "BA aborted elevation requirement."); 424 ExitOnRootFailure(hr, "BA aborted elevation requirement.");
425 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."); 427 ExitOnFailure(hr, "Failed to create pipe name and client token.");
428 428
429 hr = PipeCreatePipes(&pEngineState->companionConnection, TRUE); 429 hr = BurnPipeCreatePipes(&pEngineState->companionConnection, TRUE);
430 ExitOnFailure(hr, "Failed to create pipe and cache pipe."); 430 ExitOnFailure(hr, "Failed to create pipe and cache pipe.");
431 431
432 LogId(REPORT_STANDARD, MSG_LAUNCH_ELEVATED_ENGINE_STARTING); 432 LogId(REPORT_STANDARD, MSG_LAUNCH_ELEVATED_ENGINE_STARTING);
@@ -441,7 +441,7 @@ extern "C" HRESULT ElevationElevate(
441 { 441 {
442 LogId(REPORT_STANDARD, MSG_LAUNCH_ELEVATED_ENGINE_SUCCESS); 442 LogId(REPORT_STANDARD, MSG_LAUNCH_ELEVATED_ENGINE_SUCCESS);
443 443
444 hr = PipeWaitForChildConnect(&pEngineState->companionConnection); 444 hr = BurnPipeWaitForChildConnect(&pEngineState->companionConnection);
445 if (HRESULT_FROM_WIN32(ERROR_NO_DATA) == hr) 445 if (HRESULT_FROM_WIN32(ERROR_NO_DATA) == hr)
446 { 446 {
447 hr = E_SUSPECTED_AV_INTERFERENCE; 447 hr = E_SUSPECTED_AV_INTERFERENCE;
@@ -466,7 +466,7 @@ extern "C" HRESULT ElevationElevate(
466LExit: 466LExit:
467 if (FAILED(hr)) 467 if (FAILED(hr))
468 { 468 {
469 PipeConnectionUninitialize(&pEngineState->companionConnection); 469 BurnPipeConnectionUninitialize(&pEngineState->companionConnection);
470 } 470 }
471 471
472 UserExperienceOnElevateComplete(&pEngineState->userExperience, hr); 472 UserExperienceOnElevateComplete(&pEngineState->userExperience, hr);
@@ -503,7 +503,7 @@ extern "C" HRESULT ElevationApplyInitialize(
503 ExitOnFailure(hr, "Failed to write variables."); 503 ExitOnFailure(hr, "Failed to write variables.");
504 504
505 // send message 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."); 507 ExitOnFailure(hr, "Failed to send message to per-machine process.");
508 508
509 hr = (HRESULT)dwResult; 509 hr = (HRESULT)dwResult;
@@ -534,7 +534,7 @@ extern "C" HRESULT ElevationApplyUninitialize(
534 DWORD dwResult = 0; 534 DWORD dwResult = 0;
535 535
536 // send message 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."); 538 ExitOnFailure(hr, "Failed to send message to per-machine process.");
539 539
540 hr = (HRESULT)dwResult; 540 hr = (HRESULT)dwResult;
@@ -592,7 +592,7 @@ extern "C" HRESULT ElevationSessionBegin(
592 ExitOnFailure(hr, "Failed to write variables."); 592 ExitOnFailure(hr, "Failed to write variables.");
593 593
594 // send message 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."); 596 ExitOnFailure(hr, "Failed to send message to per-machine process.");
597 597
598 hr = (HRESULT)dwResult; 598 hr = (HRESULT)dwResult;
@@ -638,7 +638,7 @@ extern "C" HRESULT ElevationSessionEnd(
638 ExitOnFailure(hr, "Failed to write registration type to message buffer."); 638 ExitOnFailure(hr, "Failed to write registration type to message buffer.");
639 639
640 // send message 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."); 642 ExitOnFailure(hr, "Failed to send message to per-machine process.");
643 643
644 hr = (HRESULT)dwResult; 644 hr = (HRESULT)dwResult;
@@ -663,7 +663,7 @@ HRESULT ElevationSaveState(
663 DWORD dwResult = 0; 663 DWORD dwResult = 0;
664 664
665 // send message 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."); 667 ExitOnFailure(hr, "Failed to send message to per-machine process.");
668 668
669 hr = (HRESULT)dwResult; 669 hr = (HRESULT)dwResult;
@@ -687,7 +687,7 @@ extern "C" HRESULT ElevationCachePreparePackage(
687 ExitOnFailure(hr, "Failed to write package id to message buffer."); 687 ExitOnFailure(hr, "Failed to write package id to message buffer.");
688 688
689 // Send message. 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."); 691 ExitOnFailure(hr, "Failed to send BURN_ELEVATION_MESSAGE_TYPE_CACHE_PREPARE_PACKAGE message to per-machine process.");
692 692
693 hr = (HRESULT)dwResult; 693 hr = (HRESULT)dwResult;
@@ -737,7 +737,7 @@ extern "C" HRESULT ElevationCacheCompletePayload(
737 ExitOnFailure(hr, "Failed to write move flag to message buffer."); 737 ExitOnFailure(hr, "Failed to write move flag to message buffer.");
738 738
739 // send message 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."); 741 ExitOnFailure(hr, "Failed to send BURN_ELEVATION_MESSAGE_TYPE_CACHE_COMPLETE_PAYLOAD message to per-machine process.");
742 742
743 hr = (HRESULT)dwResult; 743 hr = (HRESULT)dwResult;
@@ -775,7 +775,7 @@ extern "C" HRESULT ElevationCacheVerifyPayload(
775 ExitOnFailure(hr, "Failed to write payload id to message buffer."); 775 ExitOnFailure(hr, "Failed to write payload id to message buffer.");
776 776
777 // send message 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."); 779 ExitOnFailure(hr, "Failed to send BURN_ELEVATION_MESSAGE_TYPE_CACHE_VERIFY_PAYLOAD message to per-machine process.");
780 780
781 hr = (HRESULT)dwResult; 781 hr = (HRESULT)dwResult;
@@ -798,7 +798,7 @@ extern "C" HRESULT ElevationCacheCleanup(
798 DWORD dwResult = 0; 798 DWORD dwResult = 0;
799 799
800 // send message 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."); 802 ExitOnFailure(hr, "Failed to send BURN_ELEVATION_MESSAGE_TYPE_CACHE_CLEANUP message to per-machine process.");
803 803
804 hr = (HRESULT)dwResult; 804 hr = (HRESULT)dwResult;
@@ -828,7 +828,7 @@ extern "C" HRESULT ElevationProcessDependentRegistration(
828 ExitOnFailure(hr, "Failed to write dependent provider key to message buffer."); 828 ExitOnFailure(hr, "Failed to write dependent provider key to message buffer.");
829 829
830 // send message 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."); 832 ExitOnFailure(hr, "Failed to send BURN_ELEVATION_MESSAGE_TYPE_PROCESS_DEPENDENT_REGISTRATION message to per-machine process.");
833 833
834 hr = (HRESULT)dwResult; 834 hr = (HRESULT)dwResult;
@@ -888,7 +888,7 @@ extern "C" HRESULT ElevationExecuteRelatedBundle(
888 context.pfnGenericMessageHandler = pfnGenericMessageHandler; 888 context.pfnGenericMessageHandler = pfnGenericMessageHandler;
889 context.pvContext = pvContext; 889 context.pvContext = pvContext;
890 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."); 892 ExitOnFailure(hr, "Failed to send BURN_ELEVATION_MESSAGE_TYPE_EXECUTE_RELATED_BUNDLE message to per-machine process.");
893 893
894 hr = static_cast<HRESULT>(dwResult); 894 hr = static_cast<HRESULT>(dwResult);
@@ -952,7 +952,7 @@ extern "C" HRESULT ElevationExecuteBundlePackage(
952 context.pfnGenericMessageHandler = pfnGenericMessageHandler; 952 context.pfnGenericMessageHandler = pfnGenericMessageHandler;
953 context.pvContext = pvContext; 953 context.pvContext = pvContext;
954 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."); 956 ExitOnFailure(hr, "Failed to send BURN_ELEVATION_MESSAGE_TYPE_EXECUTE_BUNDLE_PACKAGE message to per-machine process.");
957 957
958 hr = static_cast<HRESULT>(dwResult); 958 hr = static_cast<HRESULT>(dwResult);
@@ -1007,7 +1007,7 @@ extern "C" HRESULT ElevationExecuteExePackage(
1007 context.pfnGenericMessageHandler = pfnGenericMessageHandler; 1007 context.pfnGenericMessageHandler = pfnGenericMessageHandler;
1008 context.pvContext = pvContext; 1008 context.pvContext = pvContext;
1009 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."); 1011 ExitOnFailure(hr, "Failed to send BURN_ELEVATION_MESSAGE_TYPE_EXECUTE_EXE_PACKAGE message to per-machine process.");
1012 1012
1013 hr = static_cast<HRESULT>(dwResult); 1013 hr = static_cast<HRESULT>(dwResult);
@@ -1036,7 +1036,7 @@ extern "C" HRESULT ElevationMsiBeginTransaction(
1036 hr = BuffWriteString(&pbData, &cbData, pRollbackBoundary->sczLogPath); 1036 hr = BuffWriteString(&pbData, &cbData, pRollbackBoundary->sczLogPath);
1037 ExitOnFailure(hr, "Failed to write transaction log path to message buffer."); 1037 ExitOnFailure(hr, "Failed to write transaction log path to message buffer.");
1038 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."); 1040 ExitOnFailure(hr, "Failed to send BURN_ELEVATION_MESSAGE_TYPE_BEGIN_MSI_TRANSACTION message to per-machine process.");
1041 1041
1042 hr = static_cast<HRESULT>(dwResult); 1042 hr = static_cast<HRESULT>(dwResult);
@@ -1072,7 +1072,7 @@ extern "C" HRESULT ElevationMsiCommitTransaction(
1072 context.pfnMessageHandler = pfnMessageHandler; 1072 context.pfnMessageHandler = pfnMessageHandler;
1073 context.pvContext = pvContext; 1073 context.pvContext = pvContext;
1074 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."); 1076 ExitOnFailure(hr, "Failed to send BURN_ELEVATION_MESSAGE_TYPE_COMMIT_MSI_TRANSACTION message to per-machine process.");
1077 1077
1078 hr = static_cast<HRESULT>(dwResult); 1078 hr = static_cast<HRESULT>(dwResult);
@@ -1109,7 +1109,7 @@ extern "C" HRESULT ElevationMsiRollbackTransaction(
1109 context.pfnMessageHandler = pfnMessageHandler; 1109 context.pfnMessageHandler = pfnMessageHandler;
1110 context.pvContext = pvContext; 1110 context.pvContext = pvContext;
1111 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."); 1113 ExitOnFailure(hr, "Failed to send BURN_ELEVATION_MESSAGE_TYPE_ROLLBACK_MSI_TRANSACTION message to per-machine process.");
1114 1114
1115 hr = static_cast<HRESULT>(dwResult); 1115 hr = static_cast<HRESULT>(dwResult);
@@ -1196,7 +1196,7 @@ extern "C" HRESULT ElevationExecuteMsiPackage(
1196 context.pfnMessageHandler = pfnMessageHandler; 1196 context.pfnMessageHandler = pfnMessageHandler;
1197 context.pvContext = pvContext; 1197 context.pvContext = pvContext;
1198 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."); 1200 ExitOnFailure(hr, "Failed to send BURN_ELEVATION_MESSAGE_TYPE_EXECUTE_MSI_PACKAGE message to per-machine process.");
1201 1201
1202 hr = static_cast<HRESULT>(dwResult); 1202 hr = static_cast<HRESULT>(dwResult);
@@ -1276,7 +1276,7 @@ extern "C" HRESULT ElevationExecuteMspPackage(
1276 context.pfnMessageHandler = pfnMessageHandler; 1276 context.pfnMessageHandler = pfnMessageHandler;
1277 context.pvContext = pvContext; 1277 context.pvContext = pvContext;
1278 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."); 1280 ExitOnFailure(hr, "Failed to send BURN_ELEVATION_MESSAGE_TYPE_EXECUTE_MSP_PACKAGE message to per-machine process.");
1281 1281
1282 hr = static_cast<HRESULT>(dwResult); 1282 hr = static_cast<HRESULT>(dwResult);
@@ -1328,7 +1328,7 @@ extern "C" HRESULT ElevationExecuteMsuPackage(
1328 context.pfnGenericMessageHandler = pfnGenericMessageHandler; 1328 context.pfnGenericMessageHandler = pfnGenericMessageHandler;
1329 context.pvContext = pvContext; 1329 context.pvContext = pvContext;
1330 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."); 1332 ExitOnFailure(hr, "Failed to send BURN_ELEVATION_MESSAGE_TYPE_EXECUTE_MSU_PACKAGE message to per-machine process.");
1333 1333
1334 hr = static_cast<HRESULT>(dwResult); 1334 hr = static_cast<HRESULT>(dwResult);
@@ -1381,7 +1381,7 @@ extern "C" HRESULT ElevationUninstallMsiCompatiblePackage(
1381 context.pfnMessageHandler = pfnMessageHandler; 1381 context.pfnMessageHandler = pfnMessageHandler;
1382 context.pvContext = pvContext; 1382 context.pvContext = pvContext;
1383 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."); 1385 ExitOnFailure(hr, "Failed to send BURN_ELEVATION_MESSAGE_TYPE_UNINSTALL_MSI_COMPATIBLE_PACKAGE message to per-machine process.");
1386 1386
1387 hr = static_cast<HRESULT>(dwResult); 1387 hr = static_cast<HRESULT>(dwResult);
@@ -1421,7 +1421,7 @@ extern "C" HRESULT ElevationExecutePackageProviderAction(
1421 } 1421 }
1422 1422
1423 // Send the message. 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."); 1425 ExitOnFailure(hr, "Failed to send BURN_ELEVATION_MESSAGE_TYPE_EXECUTE_PACKAGE_PROVIDER message to per-machine process.");
1426 1426
1427LExit: 1427LExit:
@@ -1461,7 +1461,7 @@ extern "C" HRESULT ElevationExecutePackageDependencyAction(
1461 } 1461 }
1462 1462
1463 // Send the message. 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."); 1465 ExitOnFailure(hr, "Failed to send BURN_ELEVATION_MESSAGE_TYPE_EXECUTE_PACKAGE_DEPENDENCY message to per-machine process.");
1466 1466
1467LExit: 1467LExit:
@@ -1488,7 +1488,7 @@ extern "C" HRESULT ElevationCleanCompatiblePackage(
1488 ExitOnFailure(hr, "Failed to write compatible package id to message buffer."); 1488 ExitOnFailure(hr, "Failed to write compatible package id to message buffer.");
1489 1489
1490 // send message 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."); 1492 ExitOnFailure(hr, "Failed to send BURN_ELEVATION_MESSAGE_TYPE_CLEAN_COMPATIBLE_PACKAGE message to per-machine process.");
1493 1493
1494 hr = (HRESULT)dwResult; 1494 hr = (HRESULT)dwResult;
@@ -1518,7 +1518,7 @@ extern "C" HRESULT ElevationCleanPackage(
1518 ExitOnFailure(hr, "Failed to write clean package id to message buffer."); 1518 ExitOnFailure(hr, "Failed to write clean package id to message buffer.");
1519 1519
1520 // send message 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."); 1522 ExitOnFailure(hr, "Failed to send BURN_ELEVATION_MESSAGE_TYPE_CLEAN_PACKAGE message to per-machine process.");
1523 1523
1524 hr = (HRESULT)dwResult; 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."); 1552 ExitOnFailure(hr, "Failed to write approved exe WaitForInputIdle timeout to message buffer.");
1553 1553
1554 // Send the message. 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."); 1556 ExitOnFailure(hr, "Failed to send BURN_ELEVATION_MESSAGE_TYPE_LAUNCH_APPROVED_EXE message to per-machine process.");
1557 1557
1558 hr = (HRESULT)dwResult; 1558 hr = (HRESULT)dwResult;
@@ -1617,7 +1617,7 @@ extern "C" HRESULT ElevationChildPumpMessages(
1617 hCacheThread = ::CreateThread(NULL, 0, ElevatedChildCacheThreadProc, &cacheContext, 0, NULL); 1617 hCacheThread = ::CreateThread(NULL, 0, ElevatedChildCacheThreadProc, &cacheContext, 0, NULL);
1618 ExitOnNullWithLastError(hCacheThread, hr, "Failed to create elevated cache thread."); 1618 ExitOnNullWithLastError(hCacheThread, hr, "Failed to create elevated cache thread.");
1619 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."); 1621 ExitOnFailure(hr, "Failed to pump messages in child process.");
1622 1622
1623 // Wait for the cache thread and verify it gets the right result but don't fail if things 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."); 1705 ExitOnFailure(hr, "Failed to initialize COM.");
1706 fComInitialized = TRUE; 1706 fComInitialized = TRUE;
1707 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."); 1709 ExitOnFailure(hr, "Failed to pump messages in child process.");
1710 1710
1711 hr = (HRESULT)result.dwResult; 1711 hr = (HRESULT)result.dwResult;
@@ -3552,7 +3552,7 @@ static HRESULT CALLBACK BurnCacheMessageHandler(
3552 } 3552 }
3553 3553
3554 // send message 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."); 3556 ExitOnFailure(hr, "Failed to send burn cache message to per-user process.");
3557 3557
3558 hr = dwResult; 3558 hr = dwResult;
@@ -3589,7 +3589,7 @@ static DWORD CALLBACK ElevatedProgressRoutine(
3589 ExitOnFailure(hr, "Failed to write total bytes transferred progress to message buffer."); 3589 ExitOnFailure(hr, "Failed to write total bytes transferred progress to message buffer.");
3590 3590
3591 // send message 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."); 3593 ExitOnFailure(hr, "Failed to send progress routine message to per-user process.");
3594 3594
3595LExit: 3595LExit:
@@ -3664,7 +3664,7 @@ static int GenericExecuteMessageHandler(
3664 } 3664 }
3665 3665
3666 // send message 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."); 3668 ExitOnFailure(hr, "Failed to send message to per-user process.");
3669 3669
3670LExit: 3670LExit:
@@ -3751,7 +3751,7 @@ static int MsiExecuteMessageHandler(
3751 } 3751 }
3752 3752
3753 // send message 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."); 3755 ExitOnFailure(hr, "Failed to send msi message to per-user process.");
3756 3756
3757LExit: 3757LExit:
@@ -3891,7 +3891,7 @@ static HRESULT OnLaunchApprovedExe(
3891 hr = BuffWriteNumber(&pbSendData, &cbSendData, dwProcessId); 3891 hr = BuffWriteNumber(&pbSendData, &cbSendData, dwProcessId);
3892 ExitOnFailure(hr, "Failed to write the approved exe process id to message buffer."); 3892 ExitOnFailure(hr, "Failed to write the approved exe process id to message buffer.");
3893 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."); 3895 ExitOnFailure(hr, "Failed to send BURN_ELEVATION_MESSAGE_TYPE_LAUNCH_APPROVED_EXE_PROCESSID message to per-user process.");
3896 3896
3897LExit: 3897LExit:
@@ -4032,7 +4032,7 @@ static HRESULT ElevatedOnPauseAUBegin(
4032 HRESULT hr = S_OK; 4032 HRESULT hr = S_OK;
4033 DWORD dwResult = 0; 4033 DWORD dwResult = 0;
4034 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."); 4036 ExitOnFailure(hr, "Failed to send BURN_ELEVATION_MESSAGE_TYPE_APPLY_INITIALIZE_PAUSE_AU_BEGIN message to per-user process.");
4037 4037
4038LExit: 4038LExit:
@@ -4052,7 +4052,7 @@ static HRESULT ElevatedOnPauseAUComplete(
4052 hr = BuffWriteNumber(&pbSendData, &cbSendData, hrStatus); 4052 hr = BuffWriteNumber(&pbSendData, &cbSendData, hrStatus);
4053 ExitOnFailure(hr, "Failed to write the pause au status to message buffer."); 4053 ExitOnFailure(hr, "Failed to write the pause au status to message buffer.");
4054 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."); 4056 ExitOnFailure(hr, "Failed to send BURN_ELEVATION_MESSAGE_TYPE_APPLY_INITIALIZE_PAUSE_AU_COMPLETE message to per-user process.");
4057 4057
4058LExit: 4058LExit:
@@ -4068,7 +4068,7 @@ static HRESULT ElevatedOnSystemRestorePointBegin(
4068 HRESULT hr = S_OK; 4068 HRESULT hr = S_OK;
4069 DWORD dwResult = 0; 4069 DWORD dwResult = 0;
4070 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."); 4072 ExitOnFailure(hr, "Failed to send BURN_ELEVATION_MESSAGE_TYPE_APPLY_INITIALIZE_SYSTEM_RESTORE_POINT_BEGIN message to per-user process.");
4073 4073
4074LExit: 4074LExit:
@@ -4088,7 +4088,7 @@ static HRESULT ElevatedOnSystemRestorePointComplete(
4088 hr = BuffWriteNumber(&pbSendData, &cbSendData, hrStatus); 4088 hr = BuffWriteNumber(&pbSendData, &cbSendData, hrStatus);
4089 ExitOnFailure(hr, "Failed to write the system restore point status to message buffer."); 4089 ExitOnFailure(hr, "Failed to write the system restore point status to message buffer.");
4090 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."); 4092 ExitOnFailure(hr, "Failed to send BURN_ELEVATION_MESSAGE_TYPE_APPLY_INITIALIZE_SYSTEM_RESTORE_POINT_COMPLETE message to per-user process.");
4093 4093
4094LExit: 4094LExit:
@@ -4110,7 +4110,7 @@ static HRESULT ElevatedOnExecuteActionComplete(
4110 hr = BuffWriteNumber(&pbSendData, &cbSendData, restart); 4110 hr = BuffWriteNumber(&pbSendData, &cbSendData, restart);
4111 ExitOnFailure(hr, "Failed to write the restart type to message buffer."); 4111 ExitOnFailure(hr, "Failed to write the restart type to message buffer.");
4112 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."); 4114 ExitOnFailure(hr, "Failed to send BURN_ELEVATION_MESSAGE_TYPE_EXECUTE_ACTION_COMPLETE message to per-user process.");
4115 4115
4116LExit: 4116LExit: