summaryrefslogtreecommitdiff
path: root/src/burn/test/BurnUnitTest/ElevationTest.cpp
diff options
context:
space:
mode:
authorRob Mensching <rob@firegiant.com>2024-01-11 00:17:24 -0800
committerRob Mensching <rob@firegiant.com>2024-01-11 18:24:06 -0800
commit8b55203c8b5a66362464f0738380932ac49918be (patch)
tree2a57a8bc193566b3287f70ad5dd53e4c98a5a159 /src/burn/test/BurnUnitTest/ElevationTest.cpp
parent8cfd711f775e8501836162538998b5b6d8efbf89 (diff)
downloadwix-8b55203c8b5a66362464f0738380932ac49918be.tar.gz
wix-8b55203c8b5a66362464f0738380932ac49918be.tar.bz2
wix-8b55203c8b5a66362464f0738380932ac49918be.zip
Correctly prefix the functions exposed from burnpipe.h
Diffstat (limited to 'src/burn/test/BurnUnitTest/ElevationTest.cpp')
-rw-r--r--src/burn/test/BurnUnitTest/ElevationTest.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/burn/test/BurnUnitTest/ElevationTest.cpp b/src/burn/test/BurnUnitTest/ElevationTest.cpp
index 857873b6..77aac423 100644
--- a/src/burn/test/BurnUnitTest/ElevationTest.cpp
+++ b/src/burn/test/BurnUnitTest/ElevationTest.cpp
@@ -63,7 +63,7 @@ namespace Bootstrapper
63 ShelFunctionOverride(ElevateTest_ShellExecuteExW); 63 ShelFunctionOverride(ElevateTest_ShellExecuteExW);
64 CoreFunctionOverride(NULL, ThrdWaitForCompletion); 64 CoreFunctionOverride(NULL, ThrdWaitForCompletion);
65 65
66 PipeConnectionInitialize(pConnection); 66 BurnPipeConnectionInitialize(pConnection);
67 67
68 // 68 //
69 // per-user side setup 69 // per-user side setup
@@ -72,13 +72,13 @@ namespace Bootstrapper
72 TestThrowOnFailure(hr, L"Failed to elevate."); 72 TestThrowOnFailure(hr, L"Failed to elevate.");
73 73
74 // post execute message 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."); 76 TestThrowOnFailure(hr, "Failed to post execute message to per-machine process.");
77 77
78 // 78 //
79 // initiate termination 79 // initiate termination
80 // 80 //
81 hr = PipeTerminateChildProcess(pConnection, 666, FALSE); 81 hr = BurnPipeTerminateChildProcess(pConnection, 666, FALSE);
82 TestThrowOnFailure(hr, L"Failed to terminate elevated process."); 82 TestThrowOnFailure(hr, L"Failed to terminate elevated process.");
83 83
84 // check flags 84 // check flags
@@ -86,7 +86,7 @@ namespace Bootstrapper
86 } 86 }
87 finally 87 finally
88 { 88 {
89 PipeConnectionUninitialize(pConnection); 89 BurnPipeConnectionUninitialize(pConnection);
90 } 90 }
91 } 91 }
92 }; 92 };
@@ -127,7 +127,7 @@ static DWORD CALLBACK ElevateTest_ThreadProc(
127 BURN_PIPE_CONNECTION connection = { }; 127 BURN_PIPE_CONNECTION connection = { };
128 BURN_PIPE_RESULT result = { }; 128 BURN_PIPE_RESULT result = { };
129 129
130 PipeConnectionInitialize(&connection); 130 BurnPipeConnectionInitialize(&connection);
131 131
132 StrAlloc(&connection.sczName, MAX_PATH); 132 StrAlloc(&connection.sczName, MAX_PATH);
133 StrAlloc(&connection.sczSecret, MAX_PATH); 133 StrAlloc(&connection.sczSecret, MAX_PATH);
@@ -140,15 +140,15 @@ static DWORD CALLBACK ElevateTest_ThreadProc(
140 } 140 }
141 141
142 // set up connection with per-user process 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."); 144 ExitOnFailure(hr, "Failed to connect to per-user process.");
145 145
146 // pump messages 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'."); 148 ExitOnFailure(hr, "Failed while pumping messages in child 'process'.");
149 149
150LExit: 150LExit:
151 PipeConnectionUninitialize(&connection); 151 BurnPipeConnectionUninitialize(&connection);
152 ReleaseStr(sczArguments); 152 ReleaseStr(sczArguments);
153 153
154 return FAILED(hr) ? (DWORD)hr : result.dwResult; 154 return FAILED(hr) ? (DWORD)hr : result.dwResult;
@@ -199,7 +199,7 @@ static HRESULT ProcessChildMessages(
199 { 199 {
200 case TEST_PARENT_SENT_MESSAGE_ID: 200 case TEST_PARENT_SENT_MESSAGE_ID:
201 // send test message 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."); 203 ExitOnFailure(hr, "Failed to send message to per-machine process.");
204 break; 204 break;
205 205