@joebigelow / wix-1 / commits / f104c01b

Clean up Burn a bit.

Bob Arnson committed Mar 14, 2024 at 13:48 UTC f104c01bc29378b544c0f458c45106bcfd63c11b
6 files changed +1 -3502
src/burn/engine/engine.vcxproj
-2
@@ -94,7 +94,6 @@
94 <ClCompile Include="splashscreen.cpp" />
95 <ClCompile Include="uithread.cpp" />
96 <ClCompile Include="update.cpp" />
97 - <ClCompile Include="userexperience.cpp" />
97 <ClCompile Include="variable.cpp" />
98 <ClCompile Include="variant.cpp" />
99 </ItemGroup>
@@ -145,7 +144,6 @@
144 <ClInclude Include="splashscreen.h" />
145 <ClInclude Include="uithread.h" />
146 <ClInclude Include="update.h" />
148 - <ClInclude Include="userexperience.h" />
147 <ClInclude Include="variable.h" />
148 <ClInclude Include="variant.h" />
149 </ItemGroup>
src/burn/engine/logging.cpp
+1 -1
@@ -110,7 +110,7 @@ extern "C" HRESULT LoggingOpen(
110 }
111 }
112
113 - // Open the log approriately.
113 + // Open the log appropriately.
114 if (pLog->sczPath && *pLog->sczPath)
115 {
116 DWORD cRetry = 0;
src/burn/engine/precomp.h
-1
@@ -76,7 +76,6 @@
76 #include "burnextension.h"
77 #include "search.h"
78 #include "ba.h"
79 -#include "userexperience.h"
79 #include "package.h"
80 #include "update.h"
81 #include "pseudobundle.h"
src/burn/engine/userexperience.cpp deleted
-2958
@@ -1,2958 +0,0 @@
1 -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
2 -
3 -#include "precomp.h"
4 -
5 -// internal function declarations
6 -
7 -// static int FilterResult(
8 -// __in DWORD dwAllowedResults,
9 -// __in int nResult
10 -// );
11 -
12 -// static HRESULT FilterExecuteResult(
13 -// __in BURN_USER_EXPERIENCE* pUserExperience,
14 -// __in HRESULT hrStatus,
15 -// __in BOOL fRollback,
16 -// __in BOOL fCancel,
17 -// __in LPCWSTR sczEventName
18 -// );
19 -
20 -// static HRESULT SendBAMessage(
21 -// __in BURN_USER_EXPERIENCE* pUserExperience,
22 -// __in BOOTSTRAPPER_APPLICATION_MESSAGE message,
23 -// __in_bcount(cbArgs) const LPVOID pvArgs,
24 -// __in const DWORD cbArgs,
25 -// __in PIPE_RPC_RESULT* pResult
26 -// );
27 -
28 -// static HRESULT SendBAMessageFromInactiveEngine(
29 -// __in BURN_USER_EXPERIENCE* pUserExperience,
30 -// __in BOOTSTRAPPER_APPLICATION_MESSAGE message,
31 -// __in const LPVOID pvArgs,
32 -// __in const DWORD cbArgs,
33 -// __in PIPE_RPC_RESULT* pResult
34 -// );
35 -
36 -
37 -// function definitions
38 -
39 -// /*******************************************************************
40 -// UserExperienceUninitialize -
41 -
42 -// *******************************************************************/
43 -// extern "C" void UserExperienceUninitialize(
44 -// __in BURN_USER_EXPERIENCE* pUserExperience
45 -// )
46 -// {
47 -// if (pUserExperience->pEngineContext)
48 -// {
49 -// BAEngineFreeContext(pUserExperience->pEngineContext);
50 -// pUserExperience->pEngineContext = NULL;
51 -// }
52 -
53 -// ReleaseStr(pUserExperience->sczTempDirectory);
54 -// PayloadsUninitialize(&pUserExperience->payloads);
55 -
56 -// // clear struct
57 -// memset(pUserExperience, 0, sizeof(BURN_USER_EXPERIENCE));
58 -// }
59 -
60 -#ifdef TODO_DELETE
61 -/*******************************************************************
62 - UserExperienceLoad -
63 -
64 -*******************************************************************/
65 -extern "C" HRESULT UserExperienceLoad(
66 - __in BURN_USER_EXPERIENCE* pUserExperience,
67 - __in BOOTSTRAPPER_ENGINE_CONTEXT* pEngineContext,
68 - __in BOOTSTRAPPER_COMMAND* pCommand
69 - )
70 -{
71 - HRESULT hr = S_OK;
72 - BOOTSTRAPPER_CREATE_ARGS args = { };
73 - BOOTSTRAPPER_CREATE_RESULTS results = { };
74 - LPCWSTR wzPath = pUserExperience->payloads.rgPayloads[0].sczLocalFilePath;
75 -
76 - args.cbSize = sizeof(BOOTSTRAPPER_CREATE_ARGS);
77 - args.pCommand = pCommand;
78 - args.pfnBootstrapperEngineProc = EngineForApplicationProc;
79 - args.pvBootstrapperEngineProcContext = pEngineContext;
80 - args.qwEngineAPIVersion = MAKEQWORDVERSION(2022, 6, 10, 0);
81 -
82 - results.cbSize = sizeof(BOOTSTRAPPER_CREATE_RESULTS);
83 -
84 - // Load BA DLL.
85 - pUserExperience->hUXModule = ::LoadLibraryExW(wzPath, NULL, LOAD_WITH_ALTERED_SEARCH_PATH);
86 - ExitOnNullWithLastError(pUserExperience->hUXModule, hr, "Failed to load BA DLL: %ls", wzPath);
87 -
88 - // Get BootstrapperApplicationCreate entry-point.
89 - PFN_BOOTSTRAPPER_APPLICATION_CREATE pfnCreate = (PFN_BOOTSTRAPPER_APPLICATION_CREATE)::GetProcAddress(pUserExperience->hUXModule, "BootstrapperApplicationCreate");
90 - ExitOnNullWithLastError(pfnCreate, hr, "Failed to get BootstrapperApplicationCreate entry-point");
91 -
92 - // Create BA.
93 - hr = pfnCreate(&args, &results);
94 - ExitOnFailure(hr, "Failed to create BA.");
95 -
96 - pUserExperience->pfnBAProc = results.pfnBootstrapperApplicationProc;
97 - pUserExperience->pvBAProcContext = results.pvBootstrapperApplicationProcContext;
98 -
99 -LExit:
100 - return hr;
101 -}
102 -
103 -/*******************************************************************
104 - UserExperienceUnload -
105 -
106 -*******************************************************************/
107 -extern "C" HRESULT UserExperienceUnload(
108 - __in BURN_USER_EXPERIENCE* pUserExperience,
109 - __in BOOL fReload
110 - )
111 -{
112 - HRESULT hr = S_OK;
113 - BOOTSTRAPPER_DESTROY_ARGS args = { };
114 - BOOTSTRAPPER_DESTROY_RESULTS results = { };
115 -
116 - args.cbSize = sizeof(BOOTSTRAPPER_DESTROY_ARGS);
117 - args.fReload = fReload;
118 -
119 - results.cbSize = sizeof(BOOTSTRAPPER_DESTROY_RESULTS);
120 -
121 - if (pUserExperience->hUXModule)
122 - {
123 - // Get BootstrapperApplicationDestroy entry-point and call it if it exists.
124 - PFN_BOOTSTRAPPER_APPLICATION_DESTROY pfnDestroy = (PFN_BOOTSTRAPPER_APPLICATION_DESTROY)::GetProcAddress(pUserExperience->hUXModule, "BootstrapperApplicationDestroy");
125 - if (pfnDestroy)
126 - {
127 - pfnDestroy(&args, &results);
128 - }
129 -
130 - // Free BA DLL if it supports it.
131 - if (!results.fDisableUnloading && !::FreeLibrary(pUserExperience->hUXModule))
132 - {
133 - hr = HRESULT_FROM_WIN32(::GetLastError());
134 - TraceError(hr, "Failed to unload BA DLL.");
135 - }
136 - pUserExperience->hUXModule = NULL;
137 - }
138 -
139 -//LExit:
140 - return hr;
141 -}
142 -#endif
143 -
144 -// EXTERN_C BAAPI UserExperienceOnApplyBegin(
145 -// __in BURN_USER_EXPERIENCE* pUserExperience,
146 -// __in DWORD dwPhaseCount
147 -// )
148 -// {
149 -// HRESULT hr = S_OK;
150 -// BA_ONAPPLYBEGIN_ARGS args = { };
151 -// BA_ONAPPLYBEGIN_RESULTS results = { };
152 -// PIPE_RPC_RESULT result = { };
153 -
154 -// args.cbSize = sizeof(args);
155 -// args.dwPhaseCount = dwPhaseCount;
156 -
157 -// results.cbSize = sizeof(results);
158 -
159 -// hr = SendBAMessage(pUserExperience, BOOTSTRAPPER_APPLICATION_MESSAGE_ONAPPLYBEGIN, &args, args.cbSize, &result);
160 -// ExitOnFailure(hr, "BA OnApplyBegin failed.");
161 -
162 -// if (results.fCancel)
163 -// {
164 -// hr = HRESULT_FROM_WIN32(ERROR_INSTALL_USEREXIT);
165 -// }
166 -
167 -// LExit:
168 -// return hr;
169 -// }
170 -
171 -// EXTERN_C BAAPI UserExperienceOnApplyComplete(
172 -// __in BURN_USER_EXPERIENCE* pUserExperience,
173 -// __in HRESULT hrStatus,
174 -// __in BOOTSTRAPPER_APPLY_RESTART restart,
175 -// __inout BOOTSTRAPPER_APPLYCOMPLETE_ACTION* pAction
176 -// )
177 -// {
178 -// HRESULT hr = S_OK;
179 -// BA_ONAPPLYCOMPLETE_ARGS args = { };
180 -// BA_ONAPPLYCOMPLETE_RESULTS results = { };
181 -// PIPE_RPC_RESULT result = { };
182 -
183 -// args.cbSize = sizeof(args);
184 -// args.hrStatus = hrStatus;
185 -// args.restart = restart;
186 -// args.recommendation = *pAction;
187 -
188 -// results.cbSize = sizeof(results);
189 -// results.action = *pAction;
190 -
191 -// hr = SendBAMessageFromInactiveEngine(pUserExperience, BOOTSTRAPPER_APPLICATION_MESSAGE_ONAPPLYCOMPLETE, &args, args.cbSize, &result);
192 -// ExitOnFailure(hr, "BA OnApplyComplete failed.");
193 -
194 -// *pAction = results.action;
195 -
196 -// LExit:
197 -// return hr;
198 -// }
199 -
200 -// EXTERN_C BAAPI UserExperienceOnApplyDowngrade(
201 -// __in BURN_USER_EXPERIENCE* pUserExperience,
202 -// __inout HRESULT* phrStatus
203 -// )
204 -// {
205 -// HRESULT hr = S_OK;
206 -// BA_ONAPPLYDOWNGRADE_ARGS args = { };
207 -// BA_ONAPPLYDOWNGRADE_RESULTS results = { };
208 -// PIPE_RPC_RESULT result = { };
209 -
210 -// args.cbSize = sizeof(args);
211 -// args.hrRecommended = *phrStatus;
212 -
213 -// results.cbSize = sizeof(results);
214 -// results.hrStatus = *phrStatus;
215 -
216 -// hr = SendBAMessage(pUserExperience, BOOTSTRAPPER_APPLICATION_MESSAGE_ONAPPLYDOWNGRADE, &args, args.cbSize, &result);
217 -// ExitOnFailure(hr, "BA OnApplyDowngrade failed.");
218 -
219 -// *phrStatus = results.hrStatus;
220 -
221 -// LExit:
222 -// return hr;
223 -// }
224 -
225 -// EXTERN_C BAAPI UserExperienceOnBeginMsiTransactionBegin(
226 -// __in BURN_USER_EXPERIENCE* pUserExperience,
227 -// __in LPCWSTR wzTransactionId
228 -// )
229 -// {
230 -// HRESULT hr = S_OK;
231 -// BA_ONBEGINMSITRANSACTIONBEGIN_ARGS args = { };
232 -// BA_ONBEGINMSITRANSACTIONBEGIN_RESULTS results = { };
233 -// PIPE_RPC_RESULT result = { };
234 -
235 -// args.cbSize = sizeof(args);
236 -// args.wzTransactionId = wzTransactionId;
237 -
238 -// results.cbSize = sizeof(results);
239 -
240 -// hr = SendBAMessage(pUserExperience, BOOTSTRAPPER_APPLICATION_MESSAGE_ONBEGINMSITRANSACTIONBEGIN, &args, args.cbSize, &result);
241 -// ExitOnFailure(hr, "BA OnBeginMsiTransactionBegin failed.");
242 -
243 -// if (results.fCancel)
244 -// {
245 -// hr = HRESULT_FROM_WIN32(ERROR_INSTALL_USEREXIT);
246 -// }
247 -
248 -// LExit:
249 -// return hr;
250 -// }
251 -
252 -// EXTERN_C BAAPI UserExperienceOnBeginMsiTransactionComplete(
253 -// __in BURN_USER_EXPERIENCE* pUserExperience,
254 -// __in LPCWSTR wzTransactionId,
255 -// __in HRESULT hrStatus
256 -// )
257 -// {
258 -// HRESULT hr = S_OK;
259 -// BA_ONBEGINMSITRANSACTIONCOMPLETE_ARGS args = { };
260 -// BA_ONBEGINMSITRANSACTIONCOMPLETE_RESULTS results = { };
261 -// PIPE_RPC_RESULT result = { };
262 -
263 -// args.cbSize = sizeof(args);
264 -// args.wzTransactionId = wzTransactionId;
265 -// args.hrStatus = hrStatus;
266 -
267 -// results.cbSize = sizeof(results);
268 -
269 -// hr = SendBAMessage(pUserExperience, BOOTSTRAPPER_APPLICATION_MESSAGE_ONBEGINMSITRANSACTIONCOMPLETE, &args, args.cbSize, &result);
270 -// ExitOnFailure(hr, "BA OnBeginMsiTransactionComplete failed.");
271 -
272 -// LExit:
273 -// return hr;
274 -// }
275 -
276 -// EXTERN_C BAAPI UserExperienceOnCacheAcquireBegin(
277 -// __in BURN_USER_EXPERIENCE* pUserExperience,
278 -// __in_z_opt LPCWSTR wzPackageOrContainerId,
279 -// __in_z_opt LPCWSTR wzPayloadId,
280 -// __in_z LPWSTR* pwzSource,
281 -// __in_z LPWSTR* pwzDownloadUrl,
282 -// __in_z_opt LPCWSTR wzPayloadContainerId,
283 -// __out BOOTSTRAPPER_CACHE_OPERATION* pCacheOperation
284 -// )
285 -// {
286 -// HRESULT hr = S_OK;
287 -// BA_ONCACHEACQUIREBEGIN_ARGS args = { };
288 -// BA_ONCACHEACQUIREBEGIN_RESULTS results = { };
289 -// PIPE_RPC_RESULT result = { };
290 -
291 -// *pCacheOperation = BOOTSTRAPPER_CACHE_OPERATION_NONE;
292 -
293 -// args.cbSize = sizeof(args);
294 -// args.wzPackageOrContainerId = wzPackageOrContainerId;
295 -// args.wzPayloadId = wzPayloadId;
296 -// args.wzSource = *pwzSource;
297 -// args.wzDownloadUrl = *pwzDownloadUrl;
298 -// args.wzPayloadContainerId = wzPayloadContainerId;
299 -// args.recommendation = *pCacheOperation;
300 -
301 -// results.cbSize = sizeof(results);
302 -// results.action = *pCacheOperation;
303 -
304 -// hr = SendBAMessageFromInactiveEngine(pUserExperience, BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEACQUIREBEGIN, &args, args.cbSize, &result);
305 -// ExitOnFailure(hr, "BA OnCacheAcquireBegin failed.");
306 -
307 -// if (results.fCancel)
308 -// {
309 -// hr = HRESULT_FROM_WIN32(ERROR_INSTALL_USEREXIT);
310 -// }
311 -// else
312 -// {
313 -// // Verify the BA requested an action that is possible.
314 -// if (BOOTSTRAPPER_CACHE_OPERATION_DOWNLOAD == results.action && *pwzDownloadUrl && **pwzDownloadUrl ||
315 -// BOOTSTRAPPER_CACHE_OPERATION_EXTRACT == results.action && wzPayloadContainerId ||
316 -// BOOTSTRAPPER_CACHE_OPERATION_COPY == results.action ||
317 -// BOOTSTRAPPER_CACHE_OPERATION_NONE == results.action)
318 -// {
319 -// *pCacheOperation = results.action;
320 -// }
321 -// }
322 -
323 -// LExit:
324 -// return hr;
325 -// }
326 -
327 -// EXTERN_C BAAPI UserExperienceOnCacheAcquireComplete(
328 -// __in BURN_USER_EXPERIENCE* pUserExperience,
329 -// __in_z_opt LPCWSTR wzPackageOrContainerId,
330 -// __in_z_opt LPCWSTR wzPayloadId,
331 -// __in HRESULT hrStatus,
332 -// __inout BOOL* pfRetry
333 -// )
334 -// {
335 -// HRESULT hr = S_OK;
336 -// BA_ONCACHEACQUIRECOMPLETE_ARGS args = { };
337 -// BA_ONCACHEACQUIRECOMPLETE_RESULTS results = { };
338 -// PIPE_RPC_RESULT result = { };
339 -
340 -// args.cbSize = sizeof(args);
341 -// args.wzPackageOrContainerId = wzPackageOrContainerId;
342 -// args.wzPayloadId = wzPayloadId;
343 -// args.hrStatus = hrStatus;
344 -// args.recommendation = *pfRetry ? BOOTSTRAPPER_CACHEACQUIRECOMPLETE_ACTION_RETRY : BOOTSTRAPPER_CACHEACQUIRECOMPLETE_ACTION_NONE;
345 -
346 -// results.cbSize = sizeof(results);
347 -// results.action = args.recommendation;
348 -
349 -// hr = SendBAMessageFromInactiveEngine(pUserExperience, BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEACQUIRECOMPLETE, &args, args.cbSize, &result);
350 -// ExitOnFailure(hr, "BA OnCacheAcquireComplete failed.");
351 -
352 -// if (FAILED(hrStatus))
353 -// {
354 -// *pfRetry = BOOTSTRAPPER_CACHEACQUIRECOMPLETE_ACTION_RETRY == results.action;
355 -// }
356 -
357 -// LExit:
358 -// return hr;
359 -// }
360 -
361 -// EXTERN_C BAAPI UserExperienceOnCacheAcquireProgress(
362 -// __in BURN_USER_EXPERIENCE* pUserExperience,
363 -// __in_z_opt LPCWSTR wzPackageOrContainerId,
364 -// __in_z_opt LPCWSTR wzPayloadId,
365 -// __in DWORD64 dw64Progress,
366 -// __in DWORD64 dw64Total,
367 -// __in DWORD dwOverallPercentage
368 -// )
369 -// {
370 -// HRESULT hr = S_OK;
371 -// BA_ONCACHEACQUIREPROGRESS_ARGS args = { };
372 -// BA_ONCACHEACQUIREPROGRESS_RESULTS results = { };
373 -// PIPE_RPC_RESULT result = { };
374 -
375 -// args.cbSize = sizeof(args);
376 -// args.wzPackageOrContainerId = wzPackageOrContainerId;
377 -// args.wzPayloadId = wzPayloadId;
378 -// args.dw64Progress = dw64Progress;
379 -// args.dw64Total = dw64Total;
380 -// args.dwOverallPercentage = dwOverallPercentage;
381 -
382 -// results.cbSize = sizeof(results);
383 -
384 -// hr = SendBAMessage(pUserExperience, BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEACQUIREPROGRESS, &args, args.cbSize, &result);
385 -// ExitOnFailure(hr, "BA OnCacheAcquireProgress failed.");
386 -
387 -// if (results.fCancel)
388 -// {
389 -// hr = HRESULT_FROM_WIN32(ERROR_INSTALL_USEREXIT);
390 -// }
391 -
392 -// LExit:
393 -// return hr;
394 -// }
395 -
396 -// EXTERN_C BAAPI UserExperienceOnCacheAcquireResolving(
397 -// __in BURN_USER_EXPERIENCE* pUserExperience,
398 -// __in_z_opt LPCWSTR wzPackageOrContainerId,
399 -// __in_z_opt LPCWSTR wzPayloadId,
400 -// __in_z LPWSTR* rgSearchPaths,
401 -// __in DWORD cSearchPaths,
402 -// __in BOOL fFoundLocal,
403 -// __in DWORD* pdwChosenSearchPath,
404 -// __in_z_opt LPWSTR* pwzDownloadUrl,
405 -// __in_z_opt LPCWSTR wzPayloadContainerId,
406 -// __inout BOOTSTRAPPER_CACHE_RESOLVE_OPERATION* pCacheOperation
407 -// )
408 -// {
409 -// HRESULT hr = S_OK;
410 -// BA_ONCACHEACQUIRERESOLVING_ARGS args = { };
411 -// BA_ONCACHEACQUIRERESOLVING_RESULTS results = { };
412 -// PIPE_RPC_RESULT result = { };
413 -
414 -// args.cbSize = sizeof(args);
415 -// args.wzPackageOrContainerId = wzPackageOrContainerId;
416 -// args.wzPayloadId = wzPayloadId;
417 -// args.rgSearchPaths = const_cast<LPCWSTR*>(rgSearchPaths);
418 -// args.cSearchPaths = cSearchPaths;
419 -// args.fFoundLocal = fFoundLocal;
420 -// args.dwRecommendedSearchPath = *pdwChosenSearchPath;
421 -// args.wzDownloadUrl = *pwzDownloadUrl;
422 -// args.recommendation = *pCacheOperation;
423 -
424 -// results.cbSize = sizeof(results);
425 -// results.dwChosenSearchPath = *pdwChosenSearchPath;
426 -// results.action = *pCacheOperation;
427 -
428 -// hr = SendBAMessageFromInactiveEngine(pUserExperience, BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEACQUIRERESOLVING, &args, args.cbSize, &result);
429 -// ExitOnFailure(hr, "BA OnCacheAcquireResolving failed.");
430 -
431 -// if (results.fCancel)
432 -// {
433 -// hr = HRESULT_FROM_WIN32(ERROR_INSTALL_USEREXIT);
434 -// }
435 -// else
436 -// {
437 -// // Verify the BA requested an action that is possible.
438 -// if (BOOTSTRAPPER_CACHE_RESOLVE_DOWNLOAD == results.action && *pwzDownloadUrl && **pwzDownloadUrl ||
439 -// BOOTSTRAPPER_CACHE_RESOLVE_CONTAINER == results.action && wzPayloadContainerId ||
440 -// BOOTSTRAPPER_CACHE_RESOLVE_RETRY == results.action ||
441 -// BOOTSTRAPPER_CACHE_RESOLVE_NONE == results.action)
442 -// {
443 -// *pCacheOperation = results.action;
444 -// }
445 -// else if (BOOTSTRAPPER_CACHE_RESOLVE_LOCAL == results.action && results.dwChosenSearchPath < cSearchPaths)
446 -// {
447 -// *pdwChosenSearchPath = results.dwChosenSearchPath;
448 -// *pCacheOperation = results.action;
449 -// }
450 -// }
451 -
452 -// LExit:
453 -// return hr;
454 -// }
455 -
456 -// EXTERN_C BAAPI UserExperienceOnCacheBegin(
457 -// __in BURN_USER_EXPERIENCE* pUserExperience
458 -// )
459 -// {
460 -// HRESULT hr = S_OK;
461 -// BA_ONCACHEBEGIN_ARGS args = { };
462 -// BA_ONCACHEBEGIN_RESULTS results = { };
463 -// PIPE_RPC_RESULT result = { };
464 -
465 -// args.cbSize = sizeof(args);
466 -
467 -// results.cbSize = sizeof(results);
468 -
469 -// hr = SendBAMessage(pUserExperience, BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEBEGIN, &args, args.cbSize, &result);
470 -// ExitOnFailure(hr, "BA OnCacheBegin failed.");
471 -
472 -// if (results.fCancel)
473 -// {
474 -// hr = HRESULT_FROM_WIN32(ERROR_INSTALL_USEREXIT);
475 -// }
476 -
477 -// LExit:
478 -// return hr;
479 -// }
480 -
481 -// EXTERN_C BAAPI UserExperienceOnCacheComplete(
482 -// __in BURN_USER_EXPERIENCE* pUserExperience,
483 -// __in HRESULT hrStatus
484 -// )
485 -// {
486 -// HRESULT hr = S_OK;
487 -// BA_ONCACHECOMPLETE_ARGS args = { };
488 -// BA_ONCACHECOMPLETE_RESULTS results = { };
489 -// PIPE_RPC_RESULT result = { };
490 -
491 -// args.cbSize = sizeof(args);
492 -// args.hrStatus = hrStatus;
493 -
494 -// results.cbSize = sizeof(results);
495 -
496 -// hr = SendBAMessage(pUserExperience, BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHECOMPLETE, &args, args.cbSize, &result);
497 -// ExitOnFailure(hr, "BA OnCacheComplete failed.");
498 -
499 -// LExit:
500 -// return hr;
501 -// }
502 -
503 -// EXTERN_C BAAPI UserExperienceOnCacheContainerOrPayloadVerifyBegin(
504 -// __in BURN_USER_EXPERIENCE* pUserExperience,
505 -// __in_z_opt LPCWSTR wzPackageOrContainerId,
506 -// __in_z_opt LPCWSTR wzPayloadId
507 -// )
508 -// {
509 -// HRESULT hr = S_OK;
510 -// BA_ONCACHECONTAINERORPAYLOADVERIFYBEGIN_ARGS args = { };
511 -// BA_ONCACHECONTAINERORPAYLOADVERIFYBEGIN_RESULTS results = { };
512 -// PIPE_RPC_RESULT result = { };
513 -
514 -// args.cbSize = sizeof(args);
515 -// args.wzPackageOrContainerId = wzPackageOrContainerId;
516 -// args.wzPayloadId = wzPayloadId;
517 -
518 -// results.cbSize = sizeof(results);
519 -
520 -// hr = SendBAMessage(pUserExperience, BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHECONTAINERORPAYLOADVERIFYBEGIN, &args, args.cbSize, &result);
521 -// ExitOnFailure(hr, "BA OnCacheContainerOrPayloadVerifyBegin failed.");
522 -
523 -// if (results.fCancel)
524 -// {
525 -// hr = HRESULT_FROM_WIN32(ERROR_INSTALL_USEREXIT);
526 -// }
527 -
528 -// LExit:
529 -// return hr;
530 -// }
531 -
532 -// EXTERN_C BAAPI UserExperienceOnCacheContainerOrPayloadVerifyComplete(
533 -// __in BURN_USER_EXPERIENCE* pUserExperience,
534 -// __in_z_opt LPCWSTR wzPackageOrContainerId,
535 -// __in_z_opt LPCWSTR wzPayloadId,
536 -// __in HRESULT hrStatus
537 -// )
538 -// {
539 -// HRESULT hr = S_OK;
540 -// BA_ONCACHECONTAINERORPAYLOADVERIFYCOMPLETE_ARGS args = { };
541 -// BA_ONCACHECONTAINERORPAYLOADVERIFYCOMPLETE_RESULTS results = { };
542 -// PIPE_RPC_RESULT result = { };
543 -
544 -// args.cbSize = sizeof(args);
545 -// args.wzPackageOrContainerId = wzPackageOrContainerId;
546 -// args.wzPayloadId = wzPayloadId;
547 -// args.hrStatus = hrStatus;
548 -
549 -// results.cbSize = sizeof(results);
550 -
551 -// hr = SendBAMessage(pUserExperience, BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHECONTAINERORPAYLOADVERIFYCOMPLETE, &args, args.cbSize, &result);
552 -// ExitOnFailure(hr, "BA OnCacheContainerOrPayloadVerifyComplete failed.");
553 -
554 -// LExit:
555 -// return hr;
556 -// }
557 -
558 -// EXTERN_C BAAPI UserExperienceOnCacheContainerOrPayloadVerifyProgress(
559 -// __in BURN_USER_EXPERIENCE* pUserExperience,
560 -// __in_z_opt LPCWSTR wzPackageOrContainerId,
561 -// __in_z_opt LPCWSTR wzPayloadId,
562 -// __in DWORD64 dw64Progress,
563 -// __in DWORD64 dw64Total,
564 -// __in DWORD dwOverallPercentage
565 -// )
566 -// {
567 -// HRESULT hr = S_OK;
568 -// BA_ONCACHECONTAINERORPAYLOADVERIFYPROGRESS_ARGS args = { };
569 -// BA_ONCACHECONTAINERORPAYLOADVERIFYPROGRESS_RESULTS results = { };
570 -// PIPE_RPC_RESULT result = { };
571 -
572 -// args.cbSize = sizeof(args);
573 -// args.wzPackageOrContainerId = wzPackageOrContainerId;
574 -// args.wzPayloadId = wzPayloadId;
575 -// args.dw64Progress = dw64Progress;
576 -// args.dw64Total = dw64Total;
577 -// args.dwOverallPercentage = dwOverallPercentage;
578 -
579 -// results.cbSize = sizeof(results);
580 -
581 -// hr = SendBAMessage(pUserExperience, BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHECONTAINERORPAYLOADVERIFYPROGRESS, &args, args.cbSize, &result);
582 -// ExitOnFailure(hr, "BA OnCacheContainerOrPayloadVerifyProgress failed.");
583 -
584 -// if (results.fCancel)
585 -// {
586 -// hr = HRESULT_FROM_WIN32(ERROR_INSTALL_USEREXIT);
587 -// }
588 -
589 -// LExit:
590 -// return hr;
591 -// }
592 -
593 -// EXTERN_C BAAPI UserExperienceOnCachePackageBegin(
594 -// __in BURN_USER_EXPERIENCE* pUserExperience,
595 -// __in_z LPCWSTR wzPackageId,
596 -// __in DWORD cCachePayloads,
597 -// __in DWORD64 dw64PackageCacheSize,
598 -// __in BOOL fVital
599 -// )
600 -// {
601 -// HRESULT hr = S_OK;
602 -// BA_ONCACHEPACKAGEBEGIN_ARGS args = { };
603 -// BA_ONCACHEPACKAGEBEGIN_RESULTS results = { };
604 -// PIPE_RPC_RESULT result = { };
605 -
606 -// args.cbSize = sizeof(args);
607 -// args.wzPackageId = wzPackageId;
608 -// args.cCachePayloads = cCachePayloads;
609 -// args.dw64PackageCacheSize = dw64PackageCacheSize;
610 -// args.fVital = fVital;
611 -
612 -// results.cbSize = sizeof(results);
613 -
614 -// hr = SendBAMessage(pUserExperience, BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEPACKAGEBEGIN, &args, args.cbSize, &result);
615 -// ExitOnFailure(hr, "BA OnCachePackageBegin failed.");
616 -
617 -// if (results.fCancel)
618 -// {
619 -// hr = HRESULT_FROM_WIN32(ERROR_INSTALL_USEREXIT);
620 -// }
621 -
622 -// LExit:
623 -// return hr;
624 -// }
625 -
626 -// EXTERN_C BAAPI UserExperienceOnCachePackageComplete(
627 -// __in BURN_USER_EXPERIENCE* pUserExperience,
628 -// __in_z LPCWSTR wzPackageId,
629 -// __in HRESULT hrStatus,
630 -// __inout BOOTSTRAPPER_CACHEPACKAGECOMPLETE_ACTION* pAction
631 -// )
632 -// {
633 -// HRESULT hr = S_OK;
634 -// BA_ONCACHEPACKAGECOMPLETE_ARGS args = { };
635 -// BA_ONCACHEPACKAGECOMPLETE_RESULTS results = { };
636 -// PIPE_RPC_RESULT result = { };
637 -
638 -// args.cbSize = sizeof(args);
639 -// args.wzPackageId = wzPackageId;
640 -// args.hrStatus = hrStatus;
641 -// args.recommendation = *pAction;
642 -
643 -// results.cbSize = sizeof(results);
644 -// results.action = *pAction;
645 -
646 -// hr = SendBAMessage(pUserExperience, BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEPACKAGECOMPLETE, &args, args.cbSize, &result);
647 -// ExitOnFailure(hr, "BA OnCachePackageComplete failed.");
648 -
649 -// if (FAILED(hrStatus))
650 -// {
651 -// *pAction = results.action;
652 -// }
653 -
654 -// LExit:
655 -// return hr;
656 -// }
657 -
658 -// EXTERN_C BAAPI UserExperienceOnCachePackageNonVitalValidationFailure(
659 -// __in BURN_USER_EXPERIENCE* pUserExperience,
660 -// __in_z LPCWSTR wzPackageId,
661 -// __in HRESULT hrStatus,
662 -// __inout BOOTSTRAPPER_CACHEPACKAGENONVITALVALIDATIONFAILURE_ACTION* pAction
663 -// )
664 -// {
665 -// HRESULT hr = S_OK;
666 -// BA_ONCACHEPACKAGENONVITALVALIDATIONFAILURE_ARGS args = { };
667 -// BA_ONCACHEPACKAGENONVITALVALIDATIONFAILURE_RESULTS results = { };
668 -// PIPE_RPC_RESULT result = { };
669 -
670 -// args.cbSize = sizeof(args);
671 -// args.wzPackageId = wzPackageId;
672 -// args.hrStatus = hrStatus;
673 -// args.recommendation = *pAction;
674 -
675 -// results.cbSize = sizeof(results);
676 -// results.action = *pAction;
677 -
678 -// hr = SendBAMessage(pUserExperience, BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEPACKAGENONVITALVALIDATIONFAILURE, &args, args.cbSize, &result);
679 -// ExitOnFailure(hr, "BA OnCachePackageNonVitalValidationFailure failed.");
680 -
681 -// switch (results.action)
682 -// {
683 -// case BOOTSTRAPPER_CACHEPACKAGENONVITALVALIDATIONFAILURE_ACTION_NONE: __fallthrough;
684 -// case BOOTSTRAPPER_CACHEPACKAGENONVITALVALIDATIONFAILURE_ACTION_ACQUIRE:
685 -// *pAction = results.action;
686 -// break;
687 -// }
688 -
689 -// LExit:
690 -// return hr;
691 -// }
692 -
693 -// EXTERN_C BAAPI UserExperienceOnCachePayloadExtractBegin(
694 -// __in BURN_USER_EXPERIENCE* pUserExperience,
695 -// __in_z_opt LPCWSTR wzContainerId,
696 -// __in_z_opt LPCWSTR wzPayloadId
697 -// )
698 -// {
699 -// HRESULT hr = S_OK;
700 -// BA_ONCACHEPAYLOADEXTRACTBEGIN_ARGS args = { };
701 -// BA_ONCACHEPAYLOADEXTRACTBEGIN_RESULTS results = { };
702 -// PIPE_RPC_RESULT result = { };
703 -
704 -// args.cbSize = sizeof(args);
705 -// args.wzContainerId = wzContainerId;
706 -// args.wzPayloadId = wzPayloadId;
707 -
708 -// results.cbSize = sizeof(results);
709 -
710 -// hr = SendBAMessage(pUserExperience, BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEPAYLOADEXTRACTBEGIN, &args, args.cbSize, &result);
711 -// ExitOnFailure(hr, "BA OnCachePayloadExtractBegin failed.");
712 -
713 -// if (results.fCancel)
714 -// {
715 -// hr = HRESULT_FROM_WIN32(ERROR_INSTALL_USEREXIT);
716 -// }
717 -
718 -// LExit:
719 -// return hr;
720 -// }
721 -
722 -// EXTERN_C BAAPI UserExperienceOnCachePayloadExtractComplete(
723 -// __in BURN_USER_EXPERIENCE* pUserExperience,
724 -// __in_z_opt LPCWSTR wzContainerId,
725 -// __in_z_opt LPCWSTR wzPayloadId,
726 -// __in HRESULT hrStatus
727 -// )
728 -// {
729 -// HRESULT hr = S_OK;
730 -// BA_ONCACHEPAYLOADEXTRACTCOMPLETE_ARGS args = { };
731 -// BA_ONCACHEPAYLOADEXTRACTCOMPLETE_RESULTS results = { };
732 -// PIPE_RPC_RESULT result = { };
733 -
734 -// args.cbSize = sizeof(args);
735 -// args.wzContainerId = wzContainerId;
736 -// args.wzPayloadId = wzPayloadId;
737 -// args.hrStatus = hrStatus;
738 -
739 -// results.cbSize = sizeof(results);
740 -
741 -// hr = SendBAMessage(pUserExperience, BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEPAYLOADEXTRACTCOMPLETE, &args, args.cbSize, &result);
742 -// ExitOnFailure(hr, "BA OnCachePayloadExtractComplete failed.");
743 -
744 -// LExit:
745 -// return hr;
746 -// }
747 -
748 -// EXTERN_C BAAPI UserExperienceOnCachePayloadExtractProgress(
749 -// __in BURN_USER_EXPERIENCE* pUserExperience,
750 -// __in_z_opt LPCWSTR wzContainerId,
751 -// __in_z_opt LPCWSTR wzPayloadId,
752 -// __in DWORD64 dw64Progress,
753 -// __in DWORD64 dw64Total,
754 -// __in DWORD dwOverallPercentage
755 -// )
756 -// {
757 -// HRESULT hr = S_OK;
758 -// BA_ONCACHEPAYLOADEXTRACTPROGRESS_ARGS args = { };
759 -// BA_ONCACHEPAYLOADEXTRACTPROGRESS_RESULTS results = { };
760 -// PIPE_RPC_RESULT result = { };
761 -
762 -// args.cbSize = sizeof(args);
763 -// args.wzContainerId = wzContainerId;
764 -// args.wzPayloadId = wzPayloadId;
765 -// args.dw64Progress = dw64Progress;
766 -// args.dw64Total = dw64Total;
767 -// args.dwOverallPercentage = dwOverallPercentage;
768 -
769 -// results.cbSize = sizeof(results);
770 -
771 -// hr = SendBAMessage(pUserExperience, BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEPAYLOADEXTRACTPROGRESS, &args, args.cbSize, &result);
772 -// ExitOnFailure(hr, "BA OnCachePayloadExtractProgress failed.");
773 -
774 -// if (results.fCancel)
775 -// {
776 -// hr = HRESULT_FROM_WIN32(ERROR_INSTALL_USEREXIT);
777 -// }
778 -
779 -// LExit:
780 -// return hr;
781 -// }
782 -
783 -// EXTERN_C BAAPI UserExperienceOnCacheVerifyBegin(
784 -// __in BURN_USER_EXPERIENCE* pUserExperience,
785 -// __in_z_opt LPCWSTR wzPackageOrContainerId,
786 -// __in_z_opt LPCWSTR wzPayloadId
787 -// )
788 -// {
789 -// HRESULT hr = S_OK;
790 -// BA_ONCACHEVERIFYBEGIN_ARGS args = { };
791 -// BA_ONCACHEVERIFYBEGIN_RESULTS results = { };
792 -// PIPE_RPC_RESULT result = { };
793 -
794 -// args.cbSize = sizeof(args);
795 -// args.wzPackageOrContainerId = wzPackageOrContainerId;
796 -// args.wzPayloadId = wzPayloadId;
797 -
798 -// results.cbSize = sizeof(results);
799 -
800 -// hr = SendBAMessage(pUserExperience, BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEVERIFYBEGIN, &args, args.cbSize, &result);
801 -// ExitOnFailure(hr, "BA OnCacheVerifyBegin failed.");
802 -
803 -// if (results.fCancel)
804 -// {
805 -// hr = HRESULT_FROM_WIN32(ERROR_INSTALL_USEREXIT);
806 -// }
807 -
808 -// LExit:
809 -// return hr;
810 -// }
811 -
812 -// EXTERN_C BAAPI UserExperienceOnCacheVerifyComplete(
813 -// __in BURN_USER_EXPERIENCE* pUserExperience,
814 -// __in_z_opt LPCWSTR wzPackageOrContainerId,
815 -// __in_z_opt LPCWSTR wzPayloadId,
816 -// __in HRESULT hrStatus,
817 -// __inout BOOTSTRAPPER_CACHEVERIFYCOMPLETE_ACTION* pAction
818 -// )
819 -// {
820 -// HRESULT hr = S_OK;
821 -// BA_ONCACHEVERIFYCOMPLETE_ARGS args = { };
822 -// BA_ONCACHEVERIFYCOMPLETE_RESULTS results = { };
823 -// PIPE_RPC_RESULT result = { };
824 -
825 -// args.cbSize = sizeof(args);
826 -// args.wzPackageOrContainerId = wzPackageOrContainerId;
827 -// args.wzPayloadId = wzPayloadId;
828 -// args.hrStatus = hrStatus;
829 -// args.recommendation = *pAction;
830 -
831 -// results.cbSize = sizeof(results);
832 -// results.action = *pAction;
833 -
834 -// hr = SendBAMessage(pUserExperience, BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEVERIFYCOMPLETE, &args, args.cbSize, &result);
835 -// ExitOnFailure(hr, "BA OnCacheVerifyComplete failed.");
836 -
837 -// if (FAILED(hrStatus))
838 -// {
839 -// *pAction = results.action;
840 -// }
841 -
842 -// LExit:
843 -// return hr;
844 -// }
845 -
846 -// EXTERN_C BAAPI UserExperienceOnCacheVerifyProgress(
847 -// __in BURN_USER_EXPERIENCE* pUserExperience,
848 -// __in_z_opt LPCWSTR wzPackageOrContainerId,
849 -// __in_z_opt LPCWSTR wzPayloadId,
850 -// __in DWORD64 dw64Progress,
851 -// __in DWORD64 dw64Total,
852 -// __in DWORD dwOverallPercentage,
853 -// __in BOOTSTRAPPER_CACHE_VERIFY_STEP verifyStep
854 -// )
855 -// {
856 -// HRESULT hr = S_OK;
857 -// BA_ONCACHEVERIFYPROGRESS_ARGS args = { };
858 -// BA_ONCACHEVERIFYPROGRESS_RESULTS results = { };
859 -// PIPE_RPC_RESULT result = { };
860 -
861 -// args.cbSize = sizeof(args);
862 -// args.wzPackageOrContainerId = wzPackageOrContainerId;
863 -// args.wzPayloadId = wzPayloadId;
864 -// args.dw64Progress = dw64Progress;
865 -// args.dw64Total = dw64Total;
866 -// args.dwOverallPercentage = dwOverallPercentage;
867 -// args.verifyStep = verifyStep;
868 -
869 -// results.cbSize = sizeof(results);
870 -
871 -// hr = SendBAMessage(pUserExperience, BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEVERIFYPROGRESS, &args, args.cbSize, &result);
872 -// ExitOnFailure(hr, "BA OnCacheVerifyProgress failed.");
873 -
874 -// if (results.fCancel)
875 -// {
876 -// hr = HRESULT_FROM_WIN32(ERROR_INSTALL_USEREXIT);
877 -// }
878 -
879 -// LExit:
880 -// return hr;
881 -// }
882 -
883 -// EXTERN_C BAAPI UserExperienceOnCommitMsiTransactionBegin(
884 -// __in BURN_USER_EXPERIENCE* pUserExperience,
885 -// __in LPCWSTR wzTransactionId
886 -// )
887 -// {
888 -// HRESULT hr = S_OK;
889 -// BA_ONCOMMITMSITRANSACTIONBEGIN_ARGS args = { };
890 -// BA_ONCOMMITMSITRANSACTIONBEGIN_RESULTS results = { };
891 -// PIPE_RPC_RESULT result = { };
892 -
893 -// args.cbSize = sizeof(args);
894 -// args.wzTransactionId = wzTransactionId;
895 -
896 -// results.cbSize = sizeof(results);
897 -
898 -// hr = SendBAMessage(pUserExperience, BOOTSTRAPPER_APPLICATION_MESSAGE_ONCOMMITMSITRANSACTIONBEGIN, &args, args.cbSize, &result);
899 -// ExitOnFailure(hr, "BA OnCommitMsiTransactionBegin failed.");
900 -
901 -// if (results.fCancel)
902 -// {
903 -// hr = HRESULT_FROM_WIN32(ERROR_INSTALL_USEREXIT);
904 -// }
905 -
906 -// LExit:
907 -// return hr;
908 -// }
909 -
910 -// EXTERN_C BAAPI UserExperienceOnCommitMsiTransactionComplete(
911 -// __in BURN_USER_EXPERIENCE* pUserExperience,
912 -// __in LPCWSTR wzTransactionId,
913 -// __in HRESULT hrStatus,
914 -// __in BOOTSTRAPPER_APPLY_RESTART restart,
915 -// __inout BOOTSTRAPPER_EXECUTEMSITRANSACTIONCOMPLETE_ACTION* pAction
916 -// )
917 -// {
918 -// HRESULT hr = S_OK;
919 -// BA_ONCOMMITMSITRANSACTIONCOMPLETE_ARGS args = { };
920 -// BA_ONCOMMITMSITRANSACTIONCOMPLETE_RESULTS results = { };
921 -// PIPE_RPC_RESULT result = { };
922 -
923 -// args.cbSize = sizeof(args);
924 -// args.wzTransactionId = wzTransactionId;
925 -// args.hrStatus = hrStatus;
926 -// args.restart = restart;
927 -// args.recommendation = *pAction;
928 -
929 -// results.cbSize = sizeof(results);
930 -// results.action = *pAction;
931 -
932 -// hr = SendBAMessage(pUserExperience, BOOTSTRAPPER_APPLICATION_MESSAGE_ONCOMMITMSITRANSACTIONCOMPLETE, &args, args.cbSize, &result);
933 -// ExitOnFailure(hr, "BA OnCommitMsiTransactionComplete failed.");
934 -
935 -// *pAction = results.action;
936 -
937 -// LExit:
938 -// return hr;
939 -// }
940 -
941 -// EXTERN_C BAAPI UserExperienceOnDetectBegin(
942 -// __in BURN_USER_EXPERIENCE* pUserExperience,
943 -// __in BOOL fCached,
944 -// __in BOOTSTRAPPER_REGISTRATION_TYPE registrationType,
945 -// __in DWORD cPackages
946 -// )
947 -// {
948 -// HRESULT hr = S_OK;
949 -// BA_ONDETECTBEGIN_ARGS args = { };
950 -// BA_ONDETECTBEGIN_RESULTS results = { };
951 -// PIPE_RPC_RESULT result = { };
952 -
953 -// args.cbSize = sizeof(args);
954 -// args.cPackages = cPackages;
955 -// args.registrationType = registrationType;
956 -// args.fCached = fCached;
957 -
958 -// results.cbSize = sizeof(results);
959 -
960 -// hr = SendBAMessage(pUserExperience, BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTBEGIN, &args, args.cbSize, &result);
961 -// ExitOnFailure(hr, "BA OnDetectBegin failed.");
962 -
963 -// if (results.fCancel)
964 -// {
965 -// hr = HRESULT_FROM_WIN32(ERROR_INSTALL_USEREXIT);
966 -// }
967 -
968 -// LExit:
969 -// return hr;
970 -// }
971 -
972 -// EXTERN_C BAAPI UserExperienceOnDetectCompatibleMsiPackage(
973 -// __in BURN_USER_EXPERIENCE* pUserExperience,
974 -// __in_z LPCWSTR wzPackageId,
975 -// __in_z LPCWSTR wzCompatiblePackageId,
976 -// __in VERUTIL_VERSION* pCompatiblePackageVersion
977 -// )
978 -// {
979 -// HRESULT hr = S_OK;
980 -// BA_ONDETECTCOMPATIBLEMSIPACKAGE_ARGS args = { };
981 -// BA_ONDETECTCOMPATIBLEMSIPACKAGE_RESULTS results = { };
982 -// PIPE_RPC_RESULT result = { };
983 -
984 -// args.cbSize = sizeof(args);
985 -// args.wzPackageId = wzPackageId;
986 -// args.wzCompatiblePackageId = wzCompatiblePackageId;
987 -// args.wzCompatiblePackageVersion = pCompatiblePackageVersion->sczVersion;
988 -
989 -// results.cbSize = sizeof(results);
990 -
991 -// hr = SendBAMessage(pUserExperience, BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTCOMPATIBLEMSIPACKAGE, &args, args.cbSize, &result);
992 -// ExitOnFailure(hr, "BA OnDetectCompatibleMsiPackage failed.");
993 -
994 -// if (results.fCancel)
995 -// {
996 -// hr = HRESULT_FROM_WIN32(ERROR_INSTALL_USEREXIT);
997 -// }
998 -
999 -// LExit:
1000 -// return hr;
1001 -// }
1002 -
1003 -// EXTERN_C BAAPI UserExperienceOnDetectComplete(
1004 -// __in BURN_USER_EXPERIENCE* pUserExperience,
1005 -// __in HRESULT hrStatus,
1006 -// __in BOOL fEligibleForCleanup
1007 -// )
1008 -// {
1009 -// HRESULT hr = S_OK;
1010 -// BA_ONDETECTCOMPLETE_ARGS args = { };
1011 -// BA_ONDETECTCOMPLETE_RESULTS results = { };
1012 -// PIPE_RPC_RESULT result = { };
1013 -
1014 -// args.cbSize = sizeof(args);
1015 -// args.hrStatus = hrStatus;
1016 -// args.fEligibleForCleanup = fEligibleForCleanup;
1017 -
1018 -// results.cbSize = sizeof(results);
1019 -
1020 -// hr = SendBAMessageFromInactiveEngine(pUserExperience, BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTCOMPLETE, &args, args.cbSize, &result);
1021 -// ExitOnFailure(hr, "BA OnDetectComplete failed.");
1022 -
1023 -// LExit:
1024 -// return hr;
1025 -// }
1026 -
1027 -// EXTERN_C BAAPI UserExperienceOnDetectForwardCompatibleBundle(
1028 -// __in BURN_USER_EXPERIENCE* pUserExperience,
1029 -// __in_z LPCWSTR wzBundleId,
1030 -// __in BOOTSTRAPPER_RELATION_TYPE relationType,
1031 -// __in_z LPCWSTR wzBundleTag,
1032 -// __in BOOL fPerMachine,
1033 -// __in VERUTIL_VERSION* pVersion,
1034 -// __in BOOL fMissingFromCache
1035 -// )
1036 -// {
1037 -// HRESULT hr = S_OK;
1038 -// BA_ONDETECTFORWARDCOMPATIBLEBUNDLE_ARGS args = { };
1039 -// BA_ONDETECTFORWARDCOMPATIBLEBUNDLE_RESULTS results = { };
1040 -// PIPE_RPC_RESULT result = { };
1041 -
1042 -// args.cbSize = sizeof(args);
1043 -// args.wzBundleId = wzBundleId;
1044 -// args.relationType = relationType;
1045 -// args.wzBundleTag = wzBundleTag;
1046 -// args.fPerMachine = fPerMachine;
1047 -// args.wzVersion = pVersion->sczVersion;
1048 -// args.fMissingFromCache = fMissingFromCache;
1049 -
1050 -// results.cbSize = sizeof(results);
1051 -
1052 -// hr = SendBAMessage(pUserExperience, BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTFORWARDCOMPATIBLEBUNDLE, &args, args.cbSize, &result);
1053 -// ExitOnFailure(hr, "BA OnDetectForwardCompatibleBundle failed.");
1054 -
1055 -// if (results.fCancel)
1056 -// {
1057 -// hr = HRESULT_FROM_WIN32(ERROR_INSTALL_USEREXIT);
1058 -// }
1059 -
1060 -// LExit:
1061 -// return hr;
1062 -// }
1063 -
1064 -// EXTERN_C BAAPI UserExperienceOnDetectMsiFeature(
1065 -// __in BURN_USER_EXPERIENCE* pUserExperience,
1066 -// __in_z LPCWSTR wzPackageId,
1067 -// __in_z LPCWSTR wzFeatureId,
1068 -// __in BOOTSTRAPPER_FEATURE_STATE state
1069 -// )
1070 -// {
1071 -// HRESULT hr = S_OK;
1072 -// BA_ONDETECTMSIFEATURE_ARGS args = { };
1073 -// BA_ONDETECTMSIFEATURE_RESULTS results = { };
1074 -// PIPE_RPC_RESULT result = { };
1075 -
1076 -// args.cbSize = sizeof(args);
1077 -// args.wzPackageId = wzPackageId;
1078 -// args.wzFeatureId = wzFeatureId;
1079 -// args.state = state;
1080 -
1081 -// results.cbSize = sizeof(results);
1082 -
1083 -// hr = SendBAMessage(pUserExperience, BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTMSIFEATURE, &args, args.cbSize, &result);
1084 -// ExitOnFailure(hr, "BA OnDetectMsiFeature failed.");
1085 -
1086 -// if (results.fCancel)
1087 -// {
1088 -// hr = HRESULT_FROM_WIN32(ERROR_INSTALL_USEREXIT);
1089 -// }
1090 -
1091 -// LExit:
1092 -// return hr;
1093 -// }
1094 -
1095 -// EXTERN_C BAAPI UserExperienceOnDetectPackageBegin(
1096 -// __in BURN_USER_EXPERIENCE* pUserExperience,
1097 -// __in_z LPCWSTR wzPackageId
1098 -// )
1099 -// {
1100 -// HRESULT hr = S_OK;
1101 -// BA_ONDETECTPACKAGEBEGIN_ARGS args = { };
1102 -// BA_ONDETECTPACKAGEBEGIN_RESULTS results = { };
1103 -// PIPE_RPC_RESULT result = { };
1104 -
1105 -// args.cbSize = sizeof(args);
1106 -// args.wzPackageId = wzPackageId;
1107 -
1108 -// results.cbSize = sizeof(results);
1109 -
1110 -// hr = SendBAMessage(pUserExperience, BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTPACKAGEBEGIN, &args, args.cbSize, &result);
1111 -// ExitOnFailure(hr, "BA OnDetectPackageBegin failed.");
1112 -
1113 -// if (results.fCancel)
1114 -// {
1115 -// hr = HRESULT_FROM_WIN32(ERROR_INSTALL_USEREXIT);
1116 -// }
1117 -
1118 -// LExit:
1119 -// return hr;
1120 -// }
1121 -
1122 -// EXTERN_C BAAPI UserExperienceOnDetectPackageComplete(
1123 -// __in BURN_USER_EXPERIENCE* pUserExperience,
1124 -// __in_z LPCWSTR wzPackageId,
1125 -// __in HRESULT hrStatus,
1126 -// __in BOOTSTRAPPER_PACKAGE_STATE state,
1127 -// __in BOOL fCached
1128 -// )
1129 -// {
1130 -// HRESULT hr = S_OK;
1131 -// BA_ONDETECTPACKAGECOMPLETE_ARGS args = { };
1132 -// BA_ONDETECTPACKAGECOMPLETE_RESULTS results = { };
1133 -// PIPE_RPC_RESULT result = { };
1134 -
1135 -// args.cbSize = sizeof(args);
1136 -// args.wzPackageId = wzPackageId;
1137 -// args.hrStatus = hrStatus;
1138 -// args.state = state;
1139 -// args.fCached = fCached;
1140 -
1141 -// results.cbSize = sizeof(results);
1142 -
1143 -// hr = SendBAMessage(pUserExperience, BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTPACKAGECOMPLETE, &args, args.cbSize, &result);
1144 -// ExitOnFailure(hr, "BA OnDetectPackageComplete failed.");
1145 -
1146 -// LExit:
1147 -// return hr;
1148 -// }
1149 -
1150 -// EXTERN_C BAAPI UserExperienceOnDetectRelatedBundle(
1151 -// __in BURN_USER_EXPERIENCE* pUserExperience,
1152 -// __in_z LPCWSTR wzBundleId,
1153 -// __in BOOTSTRAPPER_RELATION_TYPE relationType,
1154 -// __in_z LPCWSTR wzBundleTag,
1155 -// __in BOOL fPerMachine,
1156 -// __in VERUTIL_VERSION* pVersion,
1157 -// __in BOOL fMissingFromCache
1158 -// )
1159 -// {
1160 -// HRESULT hr = S_OK;
1161 -// BA_ONDETECTRELATEDBUNDLE_ARGS args = { };
1162 -// BA_ONDETECTRELATEDBUNDLE_RESULTS results = { };
1163 -// PIPE_RPC_RESULT result = { };
1164 -
1165 -// args.cbSize = sizeof(args);
1166 -// args.wzBundleId = wzBundleId;
1167 -// args.relationType = relationType;
1168 -// args.wzBundleTag = wzBundleTag;
1169 -// args.fPerMachine = fPerMachine;
1170 -// args.wzVersion = pVersion->sczVersion;
1171 -// args.fMissingFromCache = fMissingFromCache;
1172 -
1173 -// results.cbSize = sizeof(results);
1174 -
1175 -// hr = SendBAMessage(pUserExperience, BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTRELATEDBUNDLE, &args, args.cbSize, &result);
1176 -// ExitOnFailure(hr, "BA OnDetectRelatedBundle failed.");
1177 -
1178 -// if (results.fCancel)
1179 -// {
1180 -// hr = HRESULT_FROM_WIN32(ERROR_INSTALL_USEREXIT);
1181 -// }
1182 -
1183 -// LExit:
1184 -// return hr;
1185 -// }
1186 -
1187 -// EXTERN_C BAAPI UserExperienceOnDetectRelatedBundlePackage(
1188 -// __in BURN_USER_EXPERIENCE* pUserExperience,
1189 -// __in_z LPCWSTR wzPackageId,
1190 -// __in_z LPCWSTR wzBundleId,
1191 -// __in BOOTSTRAPPER_RELATION_TYPE relationType,
1192 -// __in BOOL fPerMachine,
1193 -// __in VERUTIL_VERSION* pVersion
1194 -// )
1195 -// {
1196 -// HRESULT hr = S_OK;
1197 -// BA_ONDETECTRELATEDBUNDLEPACKAGE_ARGS args = { };
1198 -// BA_ONDETECTRELATEDBUNDLEPACKAGE_RESULTS results = { };
1199 -// PIPE_RPC_RESULT result = { };
1200 -
1201 -// args.cbSize = sizeof(args);
1202 -// args.wzPackageId = wzPackageId;
1203 -// args.wzBundleId = wzBundleId;
1204 -// args.relationType = relationType;
1205 -// args.fPerMachine = fPerMachine;
1206 -// args.wzVersion = pVersion->sczVersion;
1207 -
1208 -// results.cbSize = sizeof(results);
1209 -
1210 -// hr = SendBAMessage(pUserExperience, BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTRELATEDBUNDLEPACKAGE, &args, args.cbSize, &result);
1211 -// ExitOnFailure(hr, "BA OnDetectRelatedBundlePackage failed.");
1212 -
1213 -// if (results.fCancel)
1214 -// {
1215 -// hr = HRESULT_FROM_WIN32(ERROR_INSTALL_USEREXIT);
1216 -// }
1217 -
1218 -// LExit:
1219 -// return hr;
1220 -// }
1221 -
1222 -// EXTERN_C BAAPI UserExperienceOnDetectRelatedMsiPackage(
1223 -// __in BURN_USER_EXPERIENCE* pUserExperience,
1224 -// __in_z LPCWSTR wzPackageId,
1225 -// __in_z LPCWSTR wzUpgradeCode,
1226 -// __in_z LPCWSTR wzProductCode,
1227 -// __in BOOL fPerMachine,
1228 -// __in VERUTIL_VERSION* pVersion,
1229 -// __in BOOTSTRAPPER_RELATED_OPERATION operation
1230 -// )
1231 -// {
1232 -// HRESULT hr = S_OK;
1233 -// BA_ONDETECTRELATEDMSIPACKAGE_ARGS args = { };
1234 -// BA_ONDETECTRELATEDMSIPACKAGE_RESULTS results = { };
1235 -// PIPE_RPC_RESULT result = { };
1236 -
1237 -// args.cbSize = sizeof(args);
1238 -// args.wzPackageId = wzPackageId;
1239 -// args.wzUpgradeCode = wzUpgradeCode;
1240 -// args.wzProductCode = wzProductCode;
1241 -// args.fPerMachine = fPerMachine;
1242 -// args.wzVersion = pVersion->sczVersion;
1243 -// args.operation = operation;
1244 -
1245 -// results.cbSize = sizeof(results);
1246 -
1247 -// hr = SendBAMessage(pUserExperience, BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTRELATEDMSIPACKAGE, &args, args.cbSize, &result);
1248 -// ExitOnFailure(hr, "BA OnDetectRelatedMsiPackage failed.");
1249 -
1250 -// if (results.fCancel)
1251 -// {
1252 -// hr = HRESULT_FROM_WIN32(ERROR_INSTALL_USEREXIT);
1253 -// }
1254 -
1255 -// LExit:
1256 -// return hr;
1257 -// }
1258 -
1259 -// EXTERN_C BAAPI UserExperienceOnDetectPatchTarget(
1260 -// __in BURN_USER_EXPERIENCE* pUserExperience,
1261 -// __in_z LPCWSTR wzPackageId,
1262 -// __in_z LPCWSTR wzProductCode,
1263 -// __in BOOTSTRAPPER_PACKAGE_STATE patchState
1264 -// )
1265 -// {
1266 -// HRESULT hr = S_OK;
1267 -// BA_ONDETECTPATCHTARGET_ARGS args = { };
1268 -// BA_ONDETECTPATCHTARGET_RESULTS results = { };
1269 -// PIPE_RPC_RESULT result = { };
1270 -
1271 -// args.cbSize = sizeof(args);
1272 -// args.wzPackageId = wzPackageId;
1273 -// args.wzProductCode = wzProductCode;
1274 -// args.patchState = patchState;
1275 -
1276 -// results.cbSize = sizeof(results);
1277 -
1278 -// hr = SendBAMessage(pUserExperience, BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTPATCHTARGET, &args, args.cbSize, &result);
1279 -// ExitOnFailure(hr, "BA OnDetectPatchTarget failed.");
1280 -
1281 -// if (results.fCancel)
1282 -// {
1283 -// hr = HRESULT_FROM_WIN32(ERROR_INSTALL_USEREXIT);
1284 -// }
1285 -
1286 -// LExit:
1287 -// return hr;
1288 -// }
1289 -
1290 -// EXTERN_C BAAPI UserExperienceOnDetectUpdate(
1291 -// __in BURN_USER_EXPERIENCE* pUserExperience,
1292 -// __in_z_opt LPCWSTR wzUpdateLocation,
1293 -// __in DWORD64 dw64Size,
1294 -// __in_z_opt LPCWSTR wzHash,
1295 -// __in BOOTSTRAPPER_UPDATE_HASH_TYPE hashAlgorithm,
1296 -// __in VERUTIL_VERSION* pVersion,
1297 -// __in_z_opt LPCWSTR wzTitle,
1298 -// __in_z_opt LPCWSTR wzSummary,
1299 -// __in_z_opt LPCWSTR wzContentType,
1300 -// __in_z_opt LPCWSTR wzContent,
1301 -// __inout BOOL* pfStopProcessingUpdates
1302 -// )
1303 -// {
1304 -// HRESULT hr = S_OK;
1305 -// BA_ONDETECTUPDATE_ARGS args = { };
1306 -// BA_ONDETECTUPDATE_RESULTS results = { };
1307 -// PIPE_RPC_RESULT result = { };
1308 -
1309 -// args.cbSize = sizeof(args);
1310 -// args.wzUpdateLocation = wzUpdateLocation;
1311 -// args.dw64Size = dw64Size;
1312 -// args.wzHash = wzHash;
1313 -// args.hashAlgorithm = hashAlgorithm;
1314 -// args.wzVersion = pVersion->sczVersion;
1315 -// args.wzTitle = wzTitle;
1316 -// args.wzSummary = wzSummary;
1317 -// args.wzContentType = wzContentType;
1318 -// args.wzContent = wzContent;
1319 -
1320 -// results.cbSize = sizeof(results);
1321 -// results.fStopProcessingUpdates = *pfStopProcessingUpdates;
1322 -
1323 -// hr = SendBAMessageFromInactiveEngine(pUserExperience, BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTUPDATE, &args, args.cbSize, &result);
1324 -// ExitOnFailure(hr, "BA OnDetectUpdate failed.");
1325 -
1326 -// if (results.fCancel)
1327 -// {
1328 -// hr = HRESULT_FROM_WIN32(ERROR_INSTALL_USEREXIT);
1329 -// }
1330 -
1331 -// *pfStopProcessingUpdates = results.fStopProcessingUpdates;
1332 -
1333 -// LExit:
1334 -// return hr;
1335 -// }
1336 -
1337 -// EXTERN_C BAAPI UserExperienceOnDetectUpdateBegin(
1338 -// __in BURN_USER_EXPERIENCE* pUserExperience,
1339 -// __in_z LPCWSTR wzUpdateLocation,
1340 -// __inout BOOL* pfSkip
1341 -// )
1342 -// {
1343 -// HRESULT hr = S_OK;
1344 -// BA_ONDETECTUPDATEBEGIN_ARGS args = { };
1345 -// BA_ONDETECTUPDATEBEGIN_RESULTS results = { };
1346 -// PIPE_RPC_RESULT result = { };
1347 -
1348 -// args.cbSize = sizeof(args);
1349 -// args.wzUpdateLocation = wzUpdateLocation;
1350 -
1351 -// results.cbSize = sizeof(results);
1352 -// results.fSkip = *pfSkip;
1353 -
1354 -// hr = SendBAMessageFromInactiveEngine(pUserExperience, BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTUPDATEBEGIN, &args, args.cbSize, &result);
1355 -// ExitOnFailure(hr, "BA OnDetectUpdateBegin failed.");
1356 -
1357 -// if (results.fCancel)
1358 -// {
1359 -// hr = HRESULT_FROM_WIN32(ERROR_INSTALL_USEREXIT);
1360 -// }
1361 -// *pfSkip = results.fSkip;
1362 -
1363 -// LExit:
1364 -// return hr;
1365 -// }
1366 -
1367 -// EXTERN_C BAAPI UserExperienceOnDetectUpdateComplete(
1368 -// __in BURN_USER_EXPERIENCE* pUserExperience,
1369 -// __in HRESULT hrStatus,
1370 -// __inout BOOL* pfIgnoreError
1371 -// )
1372 -// {
1373 -// HRESULT hr = S_OK;
1374 -// BA_ONDETECTUPDATECOMPLETE_ARGS args = { };
1375 -// BA_ONDETECTUPDATECOMPLETE_RESULTS results = { };
1376 -// PIPE_RPC_RESULT result = { };
1377 -
1378 -// args.cbSize = sizeof(args);
1379 -// args.hrStatus = hrStatus;
1380 -
1381 -// results.cbSize = sizeof(results);
1382 -// results.fIgnoreError = *pfIgnoreError;
1383 -
1384 -// hr = SendBAMessageFromInactiveEngine(pUserExperience, BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTUPDATECOMPLETE, &args, args.cbSize, &result);
1385 -// ExitOnFailure(hr, "BA OnDetectUpdateComplete failed.");
1386 -
1387 -// if (FAILED(hrStatus))
1388 -// {
1389 -// *pfIgnoreError = results.fIgnoreError;
1390 -// }
1391 -
1392 -// LExit:
1393 -// return hr;
1394 -// }
1395 -
1396 -// EXTERN_C BAAPI UserExperienceOnElevateBegin(
1397 -// __in BURN_USER_EXPERIENCE* pUserExperience
1398 -// )
1399 -// {
1400 -// HRESULT hr = S_OK;
1401 -// BA_ONELEVATEBEGIN_ARGS args = { };
1402 -// BA_ONELEVATEBEGIN_RESULTS results = { };
1403 -// PIPE_RPC_RESULT result = { };
1404 -
1405 -// args.cbSize = sizeof(args);
1406 -
1407 -// results.cbSize = sizeof(results);
1408 -
1409 -// hr = SendBAMessage(pUserExperience, BOOTSTRAPPER_APPLICATION_MESSAGE_ONELEVATEBEGIN, &args, args.cbSize, &result);
1410 -// ExitOnFailure(hr, "BA OnElevateBegin failed.");
1411 -
1412 -// if (results.fCancel)
1413 -// {
1414 -// hr = HRESULT_FROM_WIN32(ERROR_INSTALL_USEREXIT);
1415 -// }
1416 -
1417 -// LExit:
1418 -// return hr;
1419 -// }
1420 -
1421 -// EXTERN_C BAAPI UserExperienceOnElevateComplete(
1422 -// __in BURN_USER_EXPERIENCE* pUserExperience,
1423 -// __in HRESULT hrStatus
1424 -// )
1425 -// {
1426 -// HRESULT hr = S_OK;
1427 -// BA_ONELEVATECOMPLETE_ARGS args = { };
1428 -// BA_ONELEVATECOMPLETE_RESULTS results = { };
1429 -// PIPE_RPC_RESULT result = { };
1430 -
1431 -// args.cbSize = sizeof(args);
1432 -// args.hrStatus = hrStatus;
1433 -
1434 -// results.cbSize = sizeof(results);
1435 -
1436 -// hr = SendBAMessageFromInactiveEngine(pUserExperience, BOOTSTRAPPER_APPLICATION_MESSAGE_ONELEVATECOMPLETE, &args, args.cbSize, &result);
1437 -// ExitOnFailure(hr, "BA OnElevateComplete failed.");
1438 -
1439 -// LExit:
1440 -// return hr;
1441 -// }
1442 -
1443 -// EXTERN_C BAAPI UserExperienceOnError(
1444 -// __in BURN_USER_EXPERIENCE* pUserExperience,
1445 -// __in BOOTSTRAPPER_ERROR_TYPE errorType,
1446 -// __in_z_opt LPCWSTR wzPackageId,
1447 -// __in DWORD dwCode,
1448 -// __in_z_opt LPCWSTR wzError,
1449 -// __in DWORD dwUIHint,
1450 -// __in DWORD cData,
1451 -// __in_ecount_z_opt(cData) LPCWSTR* rgwzData,
1452 -// __inout int* pnResult
1453 -// )
1454 -// {
1455 -// HRESULT hr = S_OK;
1456 -// BA_ONERROR_ARGS args = { };
1457 -// BA_ONERROR_RESULTS results = { };
1458 -// PIPE_RPC_RESULT result = { };
1459 -
1460 -// args.cbSize = sizeof(args);
1461 -// args.errorType = errorType;
1462 -// args.wzPackageId = wzPackageId;
1463 -// args.dwCode = dwCode;
1464 -// args.wzError = wzError;
1465 -// args.dwUIHint = dwUIHint;
1466 -// args.cData = cData;
1467 -// args.rgwzData = rgwzData;
1468 -// args.nRecommendation = *pnResult;
1469 -
1470 -// results.cbSize = sizeof(results);
1471 -// results.nResult = *pnResult;
1472 -
1473 -// hr = SendBAMessage(pUserExperience, BOOTSTRAPPER_APPLICATION_MESSAGE_ONERROR, &args, args.cbSize, &result);
1474 -// ExitOnFailure(hr, "BA OnError failed.");
1475 -
1476 -// *pnResult = results.nResult;
1477 -
1478 -// LExit:
1479 -// return hr;
1480 -// }
1481 -
1482 -// EXTERN_C BAAPI UserExperienceOnExecuteBegin(
1483 -// __in BURN_USER_EXPERIENCE* pUserExperience,
1484 -// __in DWORD cExecutingPackages
1485 -// )
1486 -// {
1487 -// HRESULT hr = S_OK;
1488 -// BA_ONEXECUTEBEGIN_ARGS args = { };
1489 -// BA_ONEXECUTEBEGIN_RESULTS results = { };
1490 -// PIPE_RPC_RESULT result = { };
1491 -
1492 -// args.cbSize = sizeof(args);
1493 -// args.cExecutingPackages = cExecutingPackages;
1494 -
1495 -// results.cbSize = sizeof(results);
1496 -
1497 -// hr = SendBAMessage(pUserExperience, BOOTSTRAPPER_APPLICATION_MESSAGE_ONEXECUTEBEGIN, &args, args.cbSize, &result);
1498 -// ExitOnFailure(hr, "BA OnExecuteBegin failed.");
1499 -
1500 -// if (results.fCancel)
1501 -// {
1502 -// hr = HRESULT_FROM_WIN32(ERROR_INSTALL_USEREXIT);
1503 -// }
1504 -
1505 -// LExit:
1506 -// return hr;
1507 -// }
1508 -
1509 -// EXTERN_C BAAPI UserExperienceOnExecuteComplete(
1510 -// __in BURN_USER_EXPERIENCE* pUserExperience,
1511 -// __in HRESULT hrStatus
1512 -// )
1513 -// {
1514 -// HRESULT hr = S_OK;
1515 -// BA_ONEXECUTECOMPLETE_ARGS args = { };
1516 -// BA_ONEXECUTECOMPLETE_RESULTS results = { };
1517 -// PIPE_RPC_RESULT result = { };
1518 -
1519 -// args.cbSize = sizeof(args);
1520 -// args.hrStatus = hrStatus;
1521 -
1522 -// results.cbSize = sizeof(results);
1523 -
1524 -// hr = SendBAMessage(pUserExperience, BOOTSTRAPPER_APPLICATION_MESSAGE_ONEXECUTECOMPLETE, &args, args.cbSize, &result);
1525 -// ExitOnFailure(hr, "BA OnExecuteComplete failed.");
1526 -
1527 -// LExit:
1528 -// return hr;
1529 -// }
1530 -
1531 -// EXTERN_C BAAPI UserExperienceOnExecuteFilesInUse(
1532 -// __in BURN_USER_EXPERIENCE* pUserExperience,
1533 -// __in_z LPCWSTR wzPackageId,
1534 -// __in DWORD cFiles,
1535 -// __in_ecount_z_opt(cFiles) LPCWSTR* rgwzFiles,
1536 -// __in BOOTSTRAPPER_FILES_IN_USE_TYPE source,
1537 -// __inout int* pnResult
1538 -// )
1539 -// {
1540 -// HRESULT hr = S_OK;
1541 -// BA_ONEXECUTEFILESINUSE_ARGS args = { };
1542 -// BA_ONEXECUTEFILESINUSE_RESULTS results = { };
1543 -// PIPE_RPC_RESULT result = { };
1544 -
1545 -// args.cbSize = sizeof(args);
1546 -// args.wzPackageId = wzPackageId;
1547 -// args.cFiles = cFiles;
1548 -// args.rgwzFiles = rgwzFiles;
1549 -// args.nRecommendation = *pnResult;
1550 -// args.source = source;
1551 -
1552 -// results.cbSize = sizeof(results);
1553 -// results.nResult = *pnResult;
1554 -
1555 -// hr = SendBAMessage(pUserExperience, BOOTSTRAPPER_APPLICATION_MESSAGE_ONEXECUTEFILESINUSE, &args, args.cbSize, &result);
1556 -// ExitOnFailure(hr, "BA OnExecuteFilesInUse failed.");
1557 -
1558 -// *pnResult = results.nResult;
1559 -
1560 -// LExit:
1561 -// return hr;
1562 -// }
1563 -
1564 -// EXTERN_C BAAPI UserExperienceOnExecuteMsiMessage(
1565 -// __in BURN_USER_EXPERIENCE* pUserExperience,
1566 -// __in_z LPCWSTR wzPackageId,
1567 -// __in INSTALLMESSAGE messageType,
1568 -// __in DWORD dwUIHint,
1569 -// __in_z LPCWSTR wzMessage,
1570 -// __in DWORD cData,
1571 -// __in_ecount_z_opt(cData) LPCWSTR* rgwzData,
1572 -// __inout int* pnResult
1573 -// )
1574 -// {
1575 -// HRESULT hr = S_OK;
1576 -// BA_ONEXECUTEMSIMESSAGE_ARGS args = { };
1577 -// BA_ONEXECUTEMSIMESSAGE_RESULTS results = { };
1578 -// PIPE_RPC_RESULT result = { };
1579 -
1580 -// args.cbSize = sizeof(args);
1581 -// args.wzPackageId = wzPackageId;
1582 -// args.messageType = messageType;
1583 -// args.dwUIHint = dwUIHint;
1584 -// args.wzMessage = wzMessage;
1585 -// args.cData = cData;
1586 -// args.rgwzData = rgwzData;
1587 -// args.nRecommendation = *pnResult;
1588 -
1589 -// results.cbSize = sizeof(results);
1590 -// results.nResult = *pnResult;
1591 -
1592 -// hr = SendBAMessage(pUserExperience, BOOTSTRAPPER_APPLICATION_MESSAGE_ONEXECUTEMSIMESSAGE, &args, args.cbSize, &result);
1593 -// ExitOnFailure(hr, "BA OnExecuteMsiMessage failed.");
1594 -
1595 -// *pnResult = results.nResult;
1596 -
1597 -// LExit:
1598 -// return hr;
1599 -// }
1600 -
1601 -// EXTERN_C BAAPI UserExperienceOnExecutePackageBegin(
1602 -// __in BURN_USER_EXPERIENCE* pUserExperience,
1603 -// __in_z LPCWSTR wzPackageId,
1604 -// __in BOOL fExecute,
1605 -// __in BOOTSTRAPPER_ACTION_STATE action,
1606 -// __in INSTALLUILEVEL uiLevel,
1607 -// __in BOOL fDisableExternalUiHandler
1608 -// )
1609 -// {
1610 -// HRESULT hr = S_OK;
1611 -// BA_ONEXECUTEPACKAGEBEGIN_ARGS args = { };
1612 -// BA_ONEXECUTEPACKAGEBEGIN_RESULTS results = { };
1613 -// PIPE_RPC_RESULT result = { };
1614 -
1615 -// args.cbSize = sizeof(args);
1616 -// args.wzPackageId = wzPackageId;
1617 -// args.fExecute = fExecute;
1618 -// args.action = action;
1619 -// args.uiLevel = uiLevel;
1620 -// args.fDisableExternalUiHandler = fDisableExternalUiHandler;
1621 -
1622 -// results.cbSize = sizeof(results);
1623 -
1624 -// hr = SendBAMessage(pUserExperience, BOOTSTRAPPER_APPLICATION_MESSAGE_ONEXECUTEPACKAGEBEGIN, &args, args.cbSize, &result);
1625 -// ExitOnFailure(hr, "BA OnExecutePackageBegin failed.");
1626 -
1627 -// if (results.fCancel)
1628 -// {
1629 -// hr = HRESULT_FROM_WIN32(ERROR_INSTALL_USEREXIT);
1630 -// }
1631 -
1632 -// LExit:
1633 -// return hr;
1634 -// }
1635 -
1636 -// EXTERN_C BAAPI UserExperienceOnExecutePackageComplete(
1637 -// __in BURN_USER_EXPERIENCE* pUserExperience,
1638 -// __in_z LPCWSTR wzPackageId,
1639 -// __in HRESULT hrStatus,
1640 -// __in BOOTSTRAPPER_APPLY_RESTART restart,
1641 -// __inout BOOTSTRAPPER_EXECUTEPACKAGECOMPLETE_ACTION* pAction
1642 -// )
1643 -// {
1644 -// HRESULT hr = S_OK;
1645 -// BA_ONEXECUTEPACKAGECOMPLETE_ARGS args = { };
1646 -// BA_ONEXECUTEPACKAGECOMPLETE_RESULTS results = { };
1647 -// PIPE_RPC_RESULT result = { };
1648 -
1649 -// args.cbSize = sizeof(args);
1650 -// args.wzPackageId = wzPackageId;
1651 -// args.hrStatus = hrStatus;
1652 -// args.restart = restart;
1653 -// args.recommendation = *pAction;
1654 -
1655 -// results.cbSize = sizeof(results);
1656 -// results.action = *pAction;
1657 -
1658 -// hr = SendBAMessage(pUserExperience, BOOTSTRAPPER_APPLICATION_MESSAGE_ONEXECUTEPACKAGECOMPLETE, &args, args.cbSize, &result);
1659 -// ExitOnFailure(hr, "BA OnExecutePackageComplete failed.");
1660 -
1661 -// *pAction = results.action;
1662 -
1663 -// LExit:
1664 -// return hr;
1665 -// }
1666 -
1667 -// EXTERN_C BAAPI UserExperienceOnExecutePatchTarget(
1668 -// __in BURN_USER_EXPERIENCE* pUserExperience,
1669 -// __in_z LPCWSTR wzPackageId,
1670 -// __in_z LPCWSTR wzTargetProductCode
1671 -// )
1672 -// {
1673 -// HRESULT hr = S_OK;
1674 -// BA_ONEXECUTEPATCHTARGET_ARGS args = { };
1675 -// BA_ONEXECUTEPATCHTARGET_RESULTS results = { };
1676 -// PIPE_RPC_RESULT result = { };
1677 -
1678 -// args.cbSize = sizeof(args);
1679 -// args.wzPackageId = wzPackageId;
1680 -// args.wzTargetProductCode = wzTargetProductCode;
1681 -
1682 -// results.cbSize = sizeof(results);
1683 -
1684 -// hr = SendBAMessage(pUserExperience, BOOTSTRAPPER_APPLICATION_MESSAGE_ONEXECUTEPATCHTARGET, &args, args.cbSize, &result);
1685 -// ExitOnFailure(hr, "BA OnExecutePatchTarget failed.");
1686 -
1687 -// if (results.fCancel)
1688 -// {
1689 -// hr = HRESULT_FROM_WIN32(ERROR_INSTALL_USEREXIT);
1690 -// }
1691 -
1692 -// LExit:
1693 -// return hr;
1694 -// }
1695 -
1696 -// BAAPI UserExperienceOnExecuteProcessCancel(
1697 -// __in BURN_USER_EXPERIENCE* pUserExperience,
1698 -// __in_z LPCWSTR wzPackageId,
1699 -// __in DWORD dwProcessId,
1700 -// __inout BOOTSTRAPPER_EXECUTEPROCESSCANCEL_ACTION* pAction
1701 -// )
1702 -// {
1703 -// HRESULT hr = S_OK;
1704 -// BA_ONEXECUTEPROCESSCANCEL_ARGS args = { };
1705 -// BA_ONEXECUTEPROCESSCANCEL_RESULTS results = { };
1706 -// PIPE_RPC_RESULT result = { };
1707 -
1708 -// args.cbSize = sizeof(args);
1709 -// args.wzPackageId = wzPackageId;
1710 -// args.dwProcessId = dwProcessId;
1711 -// args.recommendation = *pAction;
1712 -
1713 -// results.cbSize = sizeof(results);
1714 -// results.action = *pAction;
1715 -
1716 -// hr = SendBAMessage(pUserExperience, BOOTSTRAPPER_APPLICATION_MESSAGE_ONEXECUTEPROCESSCANCEL, &args, args.cbSize, &result);
1717 -// ExitOnFailure(hr, "BA OnExecuteProcessCancel failed.");
1718 -
1719 -// *pAction = results.action;
1720 -
1721 -// LExit:
1722 -// return hr;
1723 -// }
1724 -
1725 -// EXTERN_C BAAPI UserExperienceOnExecuteProgress(
1726 -// __in BURN_USER_EXPERIENCE* pUserExperience,
1727 -// __in_z LPCWSTR wzPackageId,
1728 -// __in DWORD dwProgressPercentage,
1729 -// __in DWORD dwOverallPercentage,
1730 -// __out int* pnResult
1731 -// )
1732 -// {
1733 -// HRESULT hr = S_OK;
1734 -// BA_ONEXECUTEPROGRESS_ARGS args = { };
1735 -// BA_ONEXECUTEPROGRESS_RESULTS results = { };
1736 -// PIPE_RPC_RESULT result = { };
1737 -
1738 -// args.cbSize = sizeof(args);
1739 -// args.wzPackageId = wzPackageId;
1740 -// args.dwProgressPercentage = dwProgressPercentage;
1741 -// args.dwOverallPercentage = dwOverallPercentage;
1742 -
1743 -// results.cbSize = sizeof(results);
1744 -
1745 -// hr = SendBAMessage(pUserExperience, BOOTSTRAPPER_APPLICATION_MESSAGE_ONEXECUTEPROGRESS, &args, args.cbSize, &result);
1746 -// ExitOnFailure(hr, "BA OnExecuteProgress failed.");
1747 -
1748 -// LExit:
1749 -// if (FAILED(hr))
1750 -// {
1751 -// *pnResult = IDERROR;
1752 -// }
1753 -// else if (results.fCancel)
1754 -// {
1755 -// *pnResult = IDCANCEL;
1756 -// }
1757 -// else
1758 -// {
1759 -// *pnResult = IDNOACTION;
1760 -// }
1761 -// return hr;
1762 -// }
1763 -
1764 -// EXTERN_C BAAPI UserExperienceOnLaunchApprovedExeBegin(
1765 -// __in BURN_USER_EXPERIENCE* pUserExperience
1766 -// )
1767 -// {
1768 -// HRESULT hr = S_OK;
1769 -// BA_ONLAUNCHAPPROVEDEXEBEGIN_ARGS args = { };
1770 -// BA_ONLAUNCHAPPROVEDEXEBEGIN_RESULTS results = { };
1771 -// PIPE_RPC_RESULT result = { };
1772 -
1773 -// args.cbSize = sizeof(args);
1774 -
1775 -// results.cbSize = sizeof(results);
1776 -
1777 -// hr = SendBAMessage(pUserExperience, BOOTSTRAPPER_APPLICATION_MESSAGE_ONLAUNCHAPPROVEDEXEBEGIN, &args, args.cbSize, &result);
1778 -// ExitOnFailure(hr, "BA OnLaunchApprovedExeBegin failed.");
1779 -
1780 -// if (results.fCancel)
1781 -// {
1782 -// hr = HRESULT_FROM_WIN32(ERROR_INSTALL_USEREXIT);
1783 -// }
1784 -
1785 -// LExit:
1786 -// return hr;
1787 -// }
1788 -
1789 -// EXTERN_C BAAPI UserExperienceOnLaunchApprovedExeComplete(
1790 -// __in BURN_USER_EXPERIENCE* pUserExperience,
1791 -// __in HRESULT hrStatus,
1792 -// __in DWORD dwProcessId
1793 -// )
1794 -// {
1795 -// HRESULT hr = S_OK;
1796 -// BA_ONLAUNCHAPPROVEDEXECOMPLETE_ARGS args = { };
1797 -// BA_ONLAUNCHAPPROVEDEXECOMPLETE_RESULTS results = { };
1798 -// PIPE_RPC_RESULT result = { };
1799 -
1800 -// args.cbSize = sizeof(args);
1801 -// args.hrStatus = hrStatus;
1802 -// args.dwProcessId = dwProcessId;
1803 -
1804 -// results.cbSize = sizeof(results);
1805 -
1806 -// hr = SendBAMessageFromInactiveEngine(pUserExperience, BOOTSTRAPPER_APPLICATION_MESSAGE_ONLAUNCHAPPROVEDEXECOMPLETE, &args, args.cbSize, &result);
1807 -// ExitOnFailure(hr, "BA OnLaunchApprovedExeComplete failed.");
1808 -
1809 -// LExit:
1810 -// return hr;
1811 -// }
1812 -
1813 -// EXTERN_C BAAPI UserExperienceOnPauseAUBegin(
1814 -// __in BURN_USER_EXPERIENCE* pUserExperience
1815 -// )
1816 -// {
1817 -// HRESULT hr = S_OK;
1818 -// BA_ONPAUSEAUTOMATICUPDATESBEGIN_ARGS args = { };
1819 -// BA_ONPAUSEAUTOMATICUPDATESBEGIN_RESULTS results = { };
1820 -// PIPE_RPC_RESULT result = { };
1821 -
1822 -// args.cbSize = sizeof(args);
1823 -
1824 -// results.cbSize = sizeof(results);
1825 -
1826 -// hr = SendBAMessage(pUserExperience, BOOTSTRAPPER_APPLICATION_MESSAGE_ONPAUSEAUTOMATICUPDATESBEGIN, &args, args.cbSize, &result);
1827 -// ExitOnFailure(hr, "BA OnPauseAUBegin failed.");
1828 -
1829 -// LExit:
1830 -// return hr;
1831 -// }
1832 -
1833 -// EXTERN_C BAAPI UserExperienceOnPauseAUComplete(
1834 -// __in BURN_USER_EXPERIENCE* pUserExperience,
1835 -// __in HRESULT hrStatus
1836 -// )
1837 -// {
1838 -// HRESULT hr = S_OK;
1839 -// BA_ONPAUSEAUTOMATICUPDATESCOMPLETE_ARGS args = { };
1840 -// BA_ONPAUSEAUTOMATICUPDATESCOMPLETE_RESULTS results = { };
1841 -// PIPE_RPC_RESULT result = { };
1842 -
1843 -// args.cbSize = sizeof(args);
1844 -// args.hrStatus = hrStatus;
1845 -
1846 -// results.cbSize = sizeof(results);
1847 -
1848 -// hr = SendBAMessage(pUserExperience, BOOTSTRAPPER_APPLICATION_MESSAGE_ONPAUSEAUTOMATICUPDATESCOMPLETE, &args, args.cbSize, &result);
1849 -// ExitOnFailure(hr, "BA OnPauseAUComplete failed.");
1850 -
1851 -// LExit:
1852 -// return hr;
1853 -// }
1854 -
1855 -// EXTERN_C BAAPI UserExperienceOnPlanBegin(
1856 -// __in BURN_USER_EXPERIENCE* pUserExperience,
1857 -// __in DWORD cPackages
1858 -// )
1859 -// {
1860 -// HRESULT hr = S_OK;
1861 -// BA_ONPLANBEGIN_ARGS args = { };
1862 -// BA_ONPLANBEGIN_RESULTS results = { };
1863 -// PIPE_RPC_RESULT result = { };
1864 -
1865 -// args.cbSize = sizeof(args);
1866 -// args.cPackages = cPackages;
1867 -
1868 -// results.cbSize = sizeof(results);
1869 -
1870 -// hr = SendBAMessage(pUserExperience, BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANBEGIN, &args, args.cbSize, &result);
1871 -// ExitOnFailure(hr, "BA OnPlanBegin failed.");
1872 -
1873 -// if (results.fCancel)
1874 -// {
1875 -// hr = HRESULT_FROM_WIN32(ERROR_INSTALL_USEREXIT);
1876 -// }
1877 -
1878 -// LExit:
1879 -// return hr;
1880 -// }
1881 -
1882 -// EXTERN_C BAAPI UserExperienceOnPlanCompatibleMsiPackageBegin(
1883 -// __in BURN_USER_EXPERIENCE* pUserExperience,
1884 -// __in_z LPCWSTR wzPackageId,
1885 -// __in_z LPCWSTR wzCompatiblePackageId,
1886 -// __in VERUTIL_VERSION* pCompatiblePackageVersion,
1887 -// __inout BOOL* pfRequested
1888 -// )
1889 -// {
1890 -// HRESULT hr = S_OK;
1891 -// BA_ONPLANCOMPATIBLEMSIPACKAGEBEGIN_ARGS args = { };
1892 -// BA_ONPLANCOMPATIBLEMSIPACKAGEBEGIN_RESULTS results = { };
1893 -// PIPE_RPC_RESULT result = { };
1894 -
1895 -// args.cbSize = sizeof(args);
1896 -// args.wzPackageId = wzPackageId;
1897 -// args.wzCompatiblePackageId = wzCompatiblePackageId;
1898 -// args.wzCompatiblePackageVersion = pCompatiblePackageVersion->sczVersion;
1899 -// args.fRecommendedRemove = *pfRequested;
1900 -
1901 -// results.cbSize = sizeof(results);
1902 -// results.fRequestRemove = *pfRequested;
1903 -
1904 -// hr = SendBAMessage(pUserExperience, BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANCOMPATIBLEMSIPACKAGEBEGIN, &args, args.cbSize, &result);
1905 -// ExitOnFailure(hr, "BA OnPlanCompatibleMsiPackageBegin failed.");
1906 -
1907 -// if (results.fCancel)
1908 -// {
1909 -// hr = HRESULT_FROM_WIN32(ERROR_INSTALL_USEREXIT);
1910 -// }
1911 -// *pfRequested = results.fRequestRemove;
1912 -
1913 -// LExit:
1914 -// return hr;
1915 -// }
1916 -
1917 -// EXTERN_C BAAPI UserExperienceOnPlanCompatibleMsiPackageComplete(
1918 -// __in BURN_USER_EXPERIENCE* pUserExperience,
1919 -// __in_z LPCWSTR wzPackageId,
1920 -// __in_z LPCWSTR wzCompatiblePackageId,
1921 -// __in HRESULT hrStatus,
1922 -// __in BOOL fRequested
1923 -// )
1924 -// {
1925 -// HRESULT hr = S_OK;
1926 -// BA_ONPLANCOMPATIBLEMSIPACKAGECOMPLETE_ARGS args = { };
1927 -// BA_ONPLANCOMPATIBLEMSIPACKAGECOMPLETE_RESULTS results = { };
1928 -// PIPE_RPC_RESULT result = { };
1929 -
1930 -// args.cbSize = sizeof(args);
1931 -// args.wzPackageId = wzPackageId;
1932 -// args.wzCompatiblePackageId = wzCompatiblePackageId;
1933 -// args.hrStatus = hrStatus;
1934 -// args.fRequestedRemove = fRequested;
1935 -
1936 -// results.cbSize = sizeof(results);
1937 -
1938 -// hr = SendBAMessage(pUserExperience, BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANCOMPATIBLEMSIPACKAGECOMPLETE, &args, args.cbSize, &result);
1939 -// ExitOnFailure(hr, "BA OnPlanCompatibleMsiPackageComplete failed.");
1940 -
1941 -// LExit:
1942 -// return hr;
1943 -// }
1944 -
1945 -// EXTERN_C BAAPI UserExperienceOnPlanMsiFeature(
1946 -// __in BURN_USER_EXPERIENCE* pUserExperience,
1947 -// __in_z LPCWSTR wzPackageId,
1948 -// __in_z LPCWSTR wzFeatureId,
1949 -// __inout BOOTSTRAPPER_FEATURE_STATE* pRequestedState
1950 -// )
1951 -// {
1952 -// HRESULT hr = S_OK;
1953 -// BA_ONPLANMSIFEATURE_ARGS args = { };
1954 -// BA_ONPLANMSIFEATURE_RESULTS results = { };
1955 -// PIPE_RPC_RESULT result = { };
1956 -
1957 -// args.cbSize = sizeof(args);
1958 -// args.wzPackageId = wzPackageId;
1959 -// args.wzFeatureId = wzFeatureId;
1960 -// args.recommendedState = *pRequestedState;
1961 -
1962 -// results.cbSize = sizeof(results);
1963 -// results.requestedState = *pRequestedState;
1964 -
1965 -// hr = SendBAMessage(pUserExperience, BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANMSIFEATURE, &args, args.cbSize, &result);
1966 -// ExitOnFailure(hr, "BA OnPlanMsiFeature failed.");
1967 -
1968 -// if (results.fCancel)
1969 -// {
1970 -// hr = HRESULT_FROM_WIN32(ERROR_INSTALL_USEREXIT);
1971 -// }
1972 -// *pRequestedState = results.requestedState;
1973 -
1974 -// LExit:
1975 -// return hr;
1976 -// }
1977 -
1978 -// EXTERN_C BAAPI UserExperienceOnPlanComplete(
1979 -// __in BURN_USER_EXPERIENCE* pUserExperience,
1980 -// __in HRESULT hrStatus
1981 -// )
1982 -// {
1983 -// HRESULT hr = S_OK;
1984 -// BA_ONPLANCOMPLETE_ARGS args = { };
1985 -// BA_ONPLANCOMPLETE_RESULTS results = { };
1986 -// PIPE_RPC_RESULT result = { };
1987 -
1988 -// args.cbSize = sizeof(args);
1989 -// args.hrStatus = hrStatus;
1990 -
1991 -// results.cbSize = sizeof(results);
1992 -
1993 -// hr = SendBAMessageFromInactiveEngine(pUserExperience, BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANCOMPLETE, &args, args.cbSize, &result);
1994 -// ExitOnFailure(hr, "BA OnPlanComplete failed.");
1995 -
1996 -// LExit:
1997 -// return hr;
1998 -// }
1999 -
2000 -// EXTERN_C BAAPI UserExperienceOnPlanForwardCompatibleBundle(
2001 -// __in BURN_USER_EXPERIENCE* pUserExperience,
2002 -// __in_z LPCWSTR wzBundleId,
2003 -// __in BOOTSTRAPPER_RELATION_TYPE relationType,
2004 -// __in_z LPCWSTR wzBundleTag,
2005 -// __in BOOL fPerMachine,
2006 -// __in VERUTIL_VERSION* pVersion,
2007 -// __inout BOOL* pfIgnoreBundle
2008 -// )
2009 -// {
2010 -// HRESULT hr = S_OK;
2011 -// BA_ONPLANFORWARDCOMPATIBLEBUNDLE_ARGS args = { };
2012 -// BA_ONPLANFORWARDCOMPATIBLEBUNDLE_RESULTS results = { };
2013 -// PIPE_RPC_RESULT result = { };
2014 -
2015 -// args.cbSize = sizeof(args);
2016 -// args.wzBundleId = wzBundleId;
2017 -// args.relationType = relationType;
2018 -// args.wzBundleTag = wzBundleTag;
2019 -// args.fPerMachine = fPerMachine;
2020 -// args.wzVersion = pVersion->sczVersion;
2021 -// args.fRecommendedIgnoreBundle = *pfIgnoreBundle;
2022 -
2023 -// results.cbSize = sizeof(results);
2024 -// results.fIgnoreBundle = *pfIgnoreBundle;
2025 -
2026 -// hr = SendBAMessage(pUserExperience, BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANFORWARDCOMPATIBLEBUNDLE, &args, args.cbSize, &result);
2027 -// ExitOnFailure(hr, "BA OnPlanForwardCompatibleBundle failed.");
2028 -
2029 -// if (results.fCancel)
2030 -// {
2031 -// hr = HRESULT_FROM_WIN32(ERROR_INSTALL_USEREXIT);
2032 -// }
2033 -// *pfIgnoreBundle = results.fIgnoreBundle;
2034 -
2035 -// LExit:
2036 -// return hr;
2037 -// }
2038 -
2039 -// EXTERN_C BAAPI UserExperienceOnPlanMsiPackage(
2040 -// __in BURN_USER_EXPERIENCE* pUserExperience,
2041 -// __in_z LPCWSTR wzPackageId,
2042 -// __in BOOL fExecute,
2043 -// __in BOOTSTRAPPER_ACTION_STATE action,
2044 -// __inout BURN_MSI_PROPERTY* pActionMsiProperty,
2045 -// __inout INSTALLUILEVEL* pUiLevel,
2046 -// __inout BOOL* pfDisableExternalUiHandler,
2047 -// __inout BOOTSTRAPPER_MSI_FILE_VERSIONING* pFileVersioning
2048 -// )
2049 -// {
2050 -// HRESULT hr = S_OK;
2051 -// BA_ONPLANMSIPACKAGE_ARGS args = { };
2052 -// BA_ONPLANMSIPACKAGE_RESULTS results = { };
2053 -// PIPE_RPC_RESULT result = { };
2054 -
2055 -// args.cbSize = sizeof(args);
2056 -// args.wzPackageId = wzPackageId;
2057 -// args.fExecute = fExecute;
2058 -// args.action = action;
2059 -// args.recommendedFileVersioning = *pFileVersioning;
2060 -
2061 -// results.cbSize = sizeof(results);
2062 -// results.actionMsiProperty = *pActionMsiProperty;
2063 -// results.uiLevel = *pUiLevel;
2064 -// results.fDisableExternalUiHandler = *pfDisableExternalUiHandler;
2065 -// results.fileVersioning = args.recommendedFileVersioning;
2066 -
2067 -// hr = SendBAMessage(pUserExperience, BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANMSIPACKAGE, &args, args.cbSize, &result);
2068 -// ExitOnFailure(hr, "BA OnPlanMsiPackage failed.");
2069 -
2070 -// if (results.fCancel)
2071 -// {
2072 -// hr = HRESULT_FROM_WIN32(ERROR_INSTALL_USEREXIT);
2073 -// }
2074 -// *pActionMsiProperty = results.actionMsiProperty;
2075 -// *pUiLevel = results.uiLevel;
2076 -// *pfDisableExternalUiHandler = results.fDisableExternalUiHandler;
2077 -// *pFileVersioning = results.fileVersioning;
2078 -
2079 -// LExit:
2080 -// return hr;
2081 -// }
2082 -
2083 -// EXTERN_C BAAPI UserExperienceOnPlannedCompatiblePackage(
2084 -// __in BURN_USER_EXPERIENCE* pUserExperience,
2085 -// __in_z LPCWSTR wzPackageId,
2086 -// __in_z LPCWSTR wzCompatiblePackageId,
2087 -// __in BOOL fRemove
2088 -// )
2089 -// {
2090 -// HRESULT hr = S_OK;
2091 -// BA_ONPLANNEDCOMPATIBLEPACKAGE_ARGS args = { };
2092 -// BA_ONPLANNEDCOMPATIBLEPACKAGE_RESULTS results = { };
2093 -// PIPE_RPC_RESULT result = { };
2094 -
2095 -// args.cbSize = sizeof(args);
2096 -// args.wzPackageId = wzPackageId;
2097 -// args.wzCompatiblePackageId = wzCompatiblePackageId;
2098 -// args.fRemove = fRemove;
2099 -
2100 -// results.cbSize = sizeof(results);
2101 -
2102 -// hr = SendBAMessage(pUserExperience, BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANNEDCOMPATIBLEPACKAGE, &args, args.cbSize, &result);
2103 -// ExitOnFailure(hr, "BA OnPlannedCompatiblePackage failed.");
2104 -
2105 -// LExit:
2106 -// return hr;
2107 -// }
2108 -
2109 -// EXTERN_C BAAPI UserExperienceOnPlannedPackage(
2110 -// __in BURN_USER_EXPERIENCE* pUserExperience,
2111 -// __in_z LPCWSTR wzPackageId,
2112 -// __in BOOTSTRAPPER_ACTION_STATE execute,
2113 -// __in BOOTSTRAPPER_ACTION_STATE rollback,
2114 -// __in BOOL fPlannedCache,
2115 -// __in BOOL fPlannedUncache
2116 -// )
2117 -// {
2118 -// HRESULT hr = S_OK;
2119 -// BA_ONPLANNEDPACKAGE_ARGS args = { };
2120 -// BA_ONPLANNEDPACKAGE_RESULTS results = { };
2121 -// PIPE_RPC_RESULT result = { };
2122 -
2123 -// args.cbSize = sizeof(args);
2124 -// args.wzPackageId = wzPackageId;
2125 -// args.execute = execute;
2126 -// args.rollback = rollback;
2127 -// args.fPlannedCache = fPlannedCache;
2128 -// args.fPlannedUncache = fPlannedUncache;
2129 -
2130 -// results.cbSize = sizeof(results);
2131 -
2132 -// hr = SendBAMessage(pUserExperience, BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANNEDPACKAGE, &args, args.cbSize, &result);
2133 -// ExitOnFailure(hr, "BA OnPlannedPackage failed.");
2134 -
2135 -// LExit:
2136 -// return hr;
2137 -// }
2138 -
2139 -// EXTERN_C BAAPI UserExperienceOnPlanPackageBegin(
2140 -// __in BURN_USER_EXPERIENCE* pUserExperience,
2141 -// __in_z LPCWSTR wzPackageId,
2142 -// __in BOOTSTRAPPER_PACKAGE_STATE state,
2143 -// __in BOOL fCached,
2144 -// __in BOOTSTRAPPER_PACKAGE_CONDITION_RESULT installCondition,
2145 -// __in BOOTSTRAPPER_PACKAGE_CONDITION_RESULT repairCondition,
2146 -// __inout BOOTSTRAPPER_REQUEST_STATE* pRequestedState,
2147 -// __inout BOOTSTRAPPER_CACHE_TYPE* pRequestedCacheType
2148 -// )
2149 -// {
2150 -// HRESULT hr = S_OK;
2151 -// BA_ONPLANPACKAGEBEGIN_ARGS args = { };
2152 -// BA_ONPLANPACKAGEBEGIN_RESULTS results = { };
2153 -// PIPE_RPC_RESULT result = { };
2154 -
2155 -// args.cbSize = sizeof(args);
2156 -// args.wzPackageId = wzPackageId;
2157 -// args.state = state;
2158 -// args.fCached = fCached;
2159 -// args.installCondition = installCondition;
2160 -// args.repairCondition = repairCondition;
2161 -// args.recommendedState = *pRequestedState;
2162 -// args.recommendedCacheType = *pRequestedCacheType;
2163 -
2164 -// results.cbSize = sizeof(results);
2165 -// results.requestedState = *pRequestedState;
2166 -// results.requestedCacheType = *pRequestedCacheType;
2167 -
2168 -// hr = SendBAMessage(pUserExperience, BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANPACKAGEBEGIN, &args, args.cbSize, &result);
2169 -// ExitOnFailure(hr, "BA OnPlanPackageBegin failed.");
2170 -
2171 -// if (results.fCancel)
2172 -// {
2173 -// hr = HRESULT_FROM_WIN32(ERROR_INSTALL_USEREXIT);
2174 -// }
2175 -// *pRequestedState = results.requestedState;
2176 -
2177 -// if (BOOTSTRAPPER_CACHE_TYPE_REMOVE <= results.requestedCacheType && BOOTSTRAPPER_CACHE_TYPE_FORCE >= results.requestedCacheType)
2178 -// {
2179 -// *pRequestedCacheType = results.requestedCacheType;
2180 -// }
2181 -
2182 -// LExit:
2183 -// return hr;
2184 -// }
2185 -
2186 -// EXTERN_C BAAPI UserExperienceOnPlanPackageComplete(
2187 -// __in BURN_USER_EXPERIENCE* pUserExperience,
2188 -// __in_z LPCWSTR wzPackageId,
2189 -// __in HRESULT hrStatus,
2190 -// __in BOOTSTRAPPER_REQUEST_STATE requested
2191 -// )
2192 -// {
2193 -// HRESULT hr = S_OK;
2194 -// BA_ONPLANPACKAGECOMPLETE_ARGS args = { };
2195 -// BA_ONPLANPACKAGECOMPLETE_RESULTS results = { };
2196 -// PIPE_RPC_RESULT result = { };
2197 -
2198 -// args.cbSize = sizeof(args);
2199 -// args.wzPackageId = wzPackageId;
2200 -// args.hrStatus = hrStatus;
2201 -// args.requested = requested;
2202 -
2203 -// results.cbSize = sizeof(results);
2204 -
2205 -// hr = SendBAMessage(pUserExperience, BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANPACKAGECOMPLETE, &args, args.cbSize, &result);
2206 -// ExitOnFailure(hr, "BA OnPlanPackageComplete failed.");
2207 -
2208 -// LExit:
2209 -// return hr;
2210 -// }
2211 -
2212 -// EXTERN_C BAAPI UserExperienceOnPlanRelatedBundle(
2213 -// __in BURN_USER_EXPERIENCE* pUserExperience,
2214 -// __in_z LPCWSTR wzBundleId,
2215 -// __inout BOOTSTRAPPER_REQUEST_STATE* pRequestedState
2216 -// )
2217 -// {
2218 -// HRESULT hr = S_OK;
2219 -// BA_ONPLANRELATEDBUNDLE_ARGS args = { };
2220 -// BA_ONPLANRELATEDBUNDLE_RESULTS results = { };
2221 -// PIPE_RPC_RESULT result = { };
2222 -
2223 -// args.cbSize = sizeof(args);
2224 -// args.wzBundleId = wzBundleId;
2225 -// args.recommendedState = *pRequestedState;
2226 -
2227 -// results.cbSize = sizeof(results);
2228 -// results.requestedState = *pRequestedState;
2229 -
2230 -// hr = SendBAMessage(pUserExperience, BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANRELATEDBUNDLE, &args, args.cbSize, &result);
2231 -// ExitOnFailure(hr, "BA OnPlanRelatedBundle failed.");
2232 -
2233 -// if (results.fCancel)
2234 -// {
2235 -// hr = HRESULT_FROM_WIN32(ERROR_INSTALL_USEREXIT);
2236 -// }
2237 -// *pRequestedState = results.requestedState;
2238 -
2239 -// LExit:
2240 -// return hr;
2241 -// }
2242 -
2243 -// EXTERN_C BAAPI UserExperienceOnPlanRelatedBundleType(
2244 -// __in BURN_USER_EXPERIENCE* pUserExperience,
2245 -// __in_z LPCWSTR wzBundleId,
2246 -// __inout BOOTSTRAPPER_RELATED_BUNDLE_PLAN_TYPE* pRequestedType
2247 -// )
2248 -// {
2249 -// HRESULT hr = S_OK;
2250 -// BA_ONPLANRELATEDBUNDLETYPE_ARGS args = { };
2251 -// BA_ONPLANRELATEDBUNDLETYPE_RESULTS results = { };
2252 -// PIPE_RPC_RESULT result = { };
2253 -
2254 -// args.cbSize = sizeof(args);
2255 -// args.wzBundleId = wzBundleId;
2256 -// args.recommendedType = *pRequestedType;
2257 -
2258 -// results.cbSize = sizeof(results);
2259 -// results.requestedType = *pRequestedType;
2260 -
2261 -// hr = SendBAMessage(pUserExperience, BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANRELATEDBUNDLETYPE, &args, args.cbSize, &result);
2262 -// ExitOnFailure(hr, "BA OnPlanRelatedBundleType failed.");
2263 -
2264 -// if (results.fCancel)
2265 -// {
2266 -// hr = HRESULT_FROM_WIN32(ERROR_INSTALL_USEREXIT);
2267 -// }
2268 -// *pRequestedType = results.requestedType;
2269 -
2270 -// LExit:
2271 -// return hr;
2272 -// }
2273 -
2274 -// EXTERN_C BAAPI UserExperienceOnPlanRestoreRelatedBundle(
2275 -// __in BURN_USER_EXPERIENCE* pUserExperience,
2276 -// __in_z LPCWSTR wzBundleId,
2277 -// __inout BOOTSTRAPPER_REQUEST_STATE* pRequestedState
2278 -// )
2279 -// {
2280 -// HRESULT hr = S_OK;
2281 -// BA_ONPLANRESTORERELATEDBUNDLE_ARGS args = { };
2282 -// BA_ONPLANRESTORERELATEDBUNDLE_RESULTS results = { };
2283 -// PIPE_RPC_RESULT result = { };
2284 -
2285 -// args.cbSize = sizeof(args);
2286 -// args.wzBundleId = wzBundleId;
2287 -// args.recommendedState = *pRequestedState;
2288 -
2289 -// results.cbSize = sizeof(results);
2290 -// results.requestedState = *pRequestedState;
2291 -
2292 -// hr = SendBAMessage(pUserExperience, BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANRESTORERELATEDBUNDLE, &args, args.cbSize, &result);
2293 -// ExitOnFailure(hr, "BA OnPlanRestoreRelatedBundle failed.");
2294 -
2295 -// if (results.fCancel)
2296 -// {
2297 -// hr = HRESULT_FROM_WIN32(ERROR_INSTALL_USEREXIT);
2298 -// }
2299 -// *pRequestedState = results.requestedState;
2300 -
2301 -// LExit:
2302 -// return hr;
2303 -// }
2304 -
2305 -// EXTERN_C BAAPI UserExperienceOnPlanRollbackBoundary(
2306 -// __in BURN_USER_EXPERIENCE* pUserExperience,
2307 -// __in_z LPCWSTR wzRollbackBoundaryId,
2308 -// __inout BOOL* pfTransaction
2309 -// )
2310 -// {
2311 -// HRESULT hr = S_OK;
2312 -// BA_ONPLANROLLBACKBOUNDARY_ARGS args = { };
2313 -// BA_ONPLANROLLBACKBOUNDARY_RESULTS results = { };
2314 -// PIPE_RPC_RESULT result = { };
2315 -
2316 -// args.cbSize = sizeof(args);
2317 -// args.wzRollbackBoundaryId = wzRollbackBoundaryId;
2318 -// args.fRecommendedTransaction = *pfTransaction;
2319 -
2320 -// results.cbSize = sizeof(results);
2321 -// results.fTransaction = *pfTransaction;
2322 -
2323 -// hr = SendBAMessage(pUserExperience, BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANROLLBACKBOUNDARY, &args, args.cbSize, &result);
2324 -// ExitOnFailure(hr, "BA OnPlanRollbackBoundary failed.");
2325 -
2326 -// if (results.fCancel)
2327 -// {
2328 -// hr = HRESULT_FROM_WIN32(ERROR_INSTALL_USEREXIT);
2329 -// }
2330 -// *pfTransaction = results.fTransaction;
2331 -
2332 -// LExit:
2333 -// return hr;
2334 -// }
2335 -
2336 -// EXTERN_C BAAPI UserExperienceOnPlanPatchTarget(
2337 -// __in BURN_USER_EXPERIENCE* pUserExperience,
2338 -// __in_z LPCWSTR wzPackageId,
2339 -// __in_z LPCWSTR wzProductCode,
2340 -// __inout BOOTSTRAPPER_REQUEST_STATE* pRequestedState
2341 -// )
2342 -// {
2343 -// HRESULT hr = S_OK;
2344 -// BA_ONPLANPATCHTARGET_ARGS args = { };
2345 -// BA_ONPLANPATCHTARGET_RESULTS results = { };
2346 -// PIPE_RPC_RESULT result = { };
2347 -
2348 -// args.cbSize = sizeof(args);
2349 -// args.wzPackageId = wzPackageId;
2350 -// args.wzProductCode = wzProductCode;
2351 -// args.recommendedState = *pRequestedState;
2352 -
2353 -// results.cbSize = sizeof(results);
2354 -// results.requestedState = *pRequestedState;
2355 -
2356 -// hr = SendBAMessage(pUserExperience, BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANPATCHTARGET, &args, args.cbSize, &result);
2357 -// ExitOnFailure(hr, "BA OnPlanPatchTarget failed.");
2358 -
2359 -// if (results.fCancel)
2360 -// {
2361 -// hr = HRESULT_FROM_WIN32(ERROR_INSTALL_USEREXIT);
2362 -// }
2363 -// *pRequestedState = results.requestedState;
2364 -
2365 -// LExit:
2366 -// return hr;
2367 -// }
2368 -
2369 -// EXTERN_C BAAPI UserExperienceOnProgress(
2370 -// __in BURN_USER_EXPERIENCE* pUserExperience,
2371 -// __in BOOL fRollback,
2372 -// __in DWORD dwProgressPercentage,
2373 -// __in DWORD dwOverallPercentage
2374 -// )
2375 -// {
2376 -// HRESULT hr = S_OK;
2377 -// BA_ONPROGRESS_ARGS args = { };
2378 -// BA_ONPROGRESS_RESULTS results = { };
2379 -// PIPE_RPC_RESULT result = { };
2380 -
2381 -// args.cbSize = sizeof(args);
2382 -// args.dwProgressPercentage = dwProgressPercentage;
2383 -// args.dwOverallPercentage = dwOverallPercentage;
2384 -
2385 -// results.cbSize = sizeof(results);
2386 -
2387 -// hr = SendBAMessage(pUserExperience, BOOTSTRAPPER_APPLICATION_MESSAGE_ONPROGRESS, &args, args.cbSize, &result);
2388 -// hr = FilterExecuteResult(pUserExperience, hr, fRollback, results.fCancel, L"OnProgress");
2389 -
2390 -// return hr;
2391 -// }
2392 -
2393 -// EXTERN_C BAAPI UserExperienceOnRegisterBegin(
2394 -// __in BURN_USER_EXPERIENCE* pUserExperience,
2395 -// __inout BOOTSTRAPPER_REGISTRATION_TYPE* pRegistrationType
2396 -// )
2397 -// {
2398 -// HRESULT hr = S_OK;
2399 -// BA_ONREGISTERBEGIN_ARGS args = { };
2400 -// BA_ONREGISTERBEGIN_RESULTS results = { };
2401 -// PIPE_RPC_RESULT result = { };
2402 -
2403 -// args.cbSize = sizeof(args);
2404 -// args.recommendedRegistrationType = *pRegistrationType;
2405 -
2406 -// results.cbSize = sizeof(results);
2407 -// results.registrationType = *pRegistrationType;
2408 -
2409 -// hr = SendBAMessage(pUserExperience, BOOTSTRAPPER_APPLICATION_MESSAGE_ONREGISTERBEGIN, &args, args.cbSize, &result);
2410 -// ExitOnFailure(hr, "BA OnRegisterBegin failed.");
2411 -
2412 -// if (results.fCancel)
2413 -// {
2414 -// hr = HRESULT_FROM_WIN32(ERROR_INSTALL_USEREXIT);
2415 -// }
2416 -// else if (BOOTSTRAPPER_REGISTRATION_TYPE_NONE < results.registrationType && BOOTSTRAPPER_REGISTRATION_TYPE_FULL >= results.registrationType)
2417 -// {
2418 -// *pRegistrationType = results.registrationType;
2419 -// }
2420 -
2421 -// LExit:
2422 -// return hr;
2423 -// }
2424 -
2425 -// EXTERN_C BAAPI UserExperienceOnRegisterComplete(
2426 -// __in BURN_USER_EXPERIENCE* pUserExperience,
2427 -// __in HRESULT hrStatus
2428 -// )
2429 -// {
2430 -// HRESULT hr = S_OK;
2431 -// BA_ONREGISTERCOMPLETE_ARGS args = { };
2432 -// BA_ONREGISTERCOMPLETE_RESULTS results = { };
2433 -// PIPE_RPC_RESULT result = { };
2434 -
2435 -// args.cbSize = sizeof(args);
2436 -// args.hrStatus = hrStatus;
2437 -
2438 -// results.cbSize = sizeof(results);
2439 -
2440 -// hr = SendBAMessage(pUserExperience, BOOTSTRAPPER_APPLICATION_MESSAGE_ONREGISTERCOMPLETE, &args, args.cbSize, &result);
2441 -// ExitOnFailure(hr, "BA OnRegisterComplete failed.");
2442 -
2443 -// LExit:
2444 -// return hr;
2445 -// }
2446 -
2447 -// EXTERN_C BAAPI UserExperienceOnRollbackMsiTransactionBegin(
2448 -// __in BURN_USER_EXPERIENCE* pUserExperience,
2449 -// __in LPCWSTR wzTransactionId
2450 -// )
2451 -// {
2452 -// HRESULT hr = S_OK;
2453 -// BA_ONROLLBACKMSITRANSACTIONBEGIN_ARGS args = { };
2454 -// BA_ONROLLBACKMSITRANSACTIONBEGIN_RESULTS results = { };
2455 -// PIPE_RPC_RESULT result = { };
2456 -
2457 -// args.cbSize = sizeof(args);
2458 -// args.wzTransactionId = wzTransactionId;
2459 -
2460 -// results.cbSize = sizeof(results);
2461 -
2462 -// hr = SendBAMessage(pUserExperience, BOOTSTRAPPER_APPLICATION_MESSAGE_ONROLLBACKMSITRANSACTIONBEGIN, &args, args.cbSize, &result);
2463 -// ExitOnFailure(hr, "BA OnRollbackMsiTransactionBegin failed.");
2464 -
2465 -// LExit:
2466 -// return hr;
2467 -// }
2468 -
2469 -// EXTERN_C BAAPI UserExperienceOnRollbackMsiTransactionComplete(
2470 -// __in BURN_USER_EXPERIENCE* pUserExperience,
2471 -// __in LPCWSTR wzTransactionId,
2472 -// __in HRESULT hrStatus,
2473 -// __in BOOTSTRAPPER_APPLY_RESTART restart,
2474 -// __inout BOOTSTRAPPER_EXECUTEMSITRANSACTIONCOMPLETE_ACTION *pAction
2475 -// )
2476 -// {
2477 -// HRESULT hr = S_OK;
2478 -// BA_ONROLLBACKMSITRANSACTIONCOMPLETE_ARGS args = { };
2479 -// BA_ONROLLBACKMSITRANSACTIONCOMPLETE_RESULTS results = { };
2480 -// PIPE_RPC_RESULT result = { };
2481 -
2482 -// args.cbSize = sizeof(args);
2483 -// args.wzTransactionId = wzTransactionId;
2484 -// args.hrStatus = hrStatus;
2485 -// args.restart = restart;
2486 -// args.recommendation = *pAction;
2487 -
2488 -// results.cbSize = sizeof(results);
2489 -// results.action = *pAction;
2490 -
2491 -// hr = SendBAMessage(pUserExperience, BOOTSTRAPPER_APPLICATION_MESSAGE_ONROLLBACKMSITRANSACTIONCOMPLETE, &args, args.cbSize, &result);
2492 -// ExitOnFailure(hr, "BA OnRollbackMsiTransactionComplete failed.");
2493 -
2494 -// *pAction = results.action;
2495 -
2496 -// LExit:
2497 -// return hr;
2498 -// }
2499 -
2500 -// EXTERN_C BAAPI UserExperienceOnSetUpdateBegin(
2501 -// __in BURN_USER_EXPERIENCE* pUserExperience
2502 -// )
2503 -// {
2504 -// HRESULT hr = S_OK;
2505 -// BA_ONSETUPDATEBEGIN_ARGS args = { };
2506 -// BA_ONSETUPDATEBEGIN_RESULTS results = { };
2507 -// PIPE_RPC_RESULT result = { };
2508 -
2509 -// args.cbSize = sizeof(args);
2510 -
2511 -// results.cbSize = sizeof(results);
2512 -
2513 -// hr = SendBAMessage(pUserExperience, BOOTSTRAPPER_APPLICATION_MESSAGE_ONSETUPDATEBEGIN, &args, args.cbSize, &result);
2514 -// ExitOnFailure(hr, "BA OnSetUpdateBegin failed.");
2515 -
2516 -// LExit:
2517 -// return hr;
2518 -// }
2519 -
2520 -// EXTERN_C BAAPI UserExperienceOnSetUpdateComplete(
2521 -// __in BURN_USER_EXPERIENCE* pUserExperience,
2522 -// __in HRESULT hrStatus,
2523 -// __in_z_opt LPCWSTR wzPreviousPackageId,
2524 -// __in_z_opt LPCWSTR wzNewPackageId
2525 -// )
2526 -// {
2527 -// HRESULT hr = S_OK;
2528 -// BA_ONSETUPDATECOMPLETE_ARGS args = { };
2529 -// BA_ONSETUPDATECOMPLETE_RESULTS results = { };
2530 -// PIPE_RPC_RESULT result = { };
2531 -
2532 -// args.cbSize = sizeof(args);
2533 -// args.hrStatus = hrStatus;
2534 -// args.wzPreviousPackageId = wzPreviousPackageId;
2535 -// args.wzNewPackageId = wzNewPackageId;
2536 -
2537 -// results.cbSize = sizeof(results);
2538 -
2539 -// hr = SendBAMessage(pUserExperience, BOOTSTRAPPER_APPLICATION_MESSAGE_ONSETUPDATECOMPLETE, &args, args.cbSize, &result);
2540 -// ExitOnFailure(hr, "BA OnSetUpdateComplete failed.");
2541 -
2542 -// LExit:
2543 -// return hr;
2544 -// }
2545 -
2546 -// EXTERN_C BAAPI UserExperienceOnSystemRestorePointBegin(
2547 -// __in BURN_USER_EXPERIENCE* pUserExperience
2548 -// )
2549 -// {
2550 -// HRESULT hr = S_OK;
2551 -// BA_ONSYSTEMRESTOREPOINTBEGIN_ARGS args = { };
2552 -// BA_ONSYSTEMRESTOREPOINTBEGIN_RESULTS results = { };
2553 -// PIPE_RPC_RESULT result = { };
2554 -
2555 -// args.cbSize = sizeof(args);
2556 -
2557 -// results.cbSize = sizeof(results);
2558 -
2559 -// hr = SendBAMessage(pUserExperience, BOOTSTRAPPER_APPLICATION_MESSAGE_ONSYSTEMRESTOREPOINTBEGIN, &args, args.cbSize, &result);
2560 -// ExitOnFailure(hr, "BA OnSystemRestorePointBegin failed.");
2561 -
2562 -// LExit:
2563 -// return hr;
2564 -// }
2565 -
2566 -// EXTERN_C BAAPI UserExperienceOnSystemRestorePointComplete(
2567 -// __in BURN_USER_EXPERIENCE* pUserExperience,
2568 -// __in HRESULT hrStatus
2569 -// )
2570 -// {
2571 -// HRESULT hr = S_OK;
2572 -// BA_ONSYSTEMRESTOREPOINTCOMPLETE_ARGS args = { };
2573 -// BA_ONSYSTEMRESTOREPOINTCOMPLETE_RESULTS results = { };
2574 -// PIPE_RPC_RESULT result = { };
2575 -
2576 -// args.cbSize = sizeof(args);
2577 -// args.hrStatus = hrStatus;
2578 -
2579 -// results.cbSize = sizeof(results);
2580 -
2581 -// hr = SendBAMessage(pUserExperience, BOOTSTRAPPER_APPLICATION_MESSAGE_ONSYSTEMRESTOREPOINTCOMPLETE, &args, args.cbSize, &result);
2582 -// ExitOnFailure(hr, "BA OnSystemRestorePointComplete failed.");
2583 -
2584 -// LExit:
2585 -// return hr;
2586 -// }
2587 -
2588 -// EXTERN_C BAAPI UserExperienceOnUnregisterBegin(
2589 -// __in BURN_USER_EXPERIENCE* pUserExperience,
2590 -// __inout BOOTSTRAPPER_REGISTRATION_TYPE* pRegistrationType
2591 -// )
2592 -// {
2593 -// HRESULT hr = S_OK;
2594 -// BA_ONUNREGISTERBEGIN_ARGS args = { };
2595 -// BA_ONUNREGISTERBEGIN_RESULTS results = { };
2596 -// PIPE_RPC_RESULT result = { };
2597 -
2598 -// args.cbSize = sizeof(args);
2599 -// args.recommendedRegistrationType = *pRegistrationType;
2600 -
2601 -// results.cbSize = sizeof(results);
2602 -// results.registrationType = *pRegistrationType;
2603 -
2604 -// hr = SendBAMessage(pUserExperience, BOOTSTRAPPER_APPLICATION_MESSAGE_ONUNREGISTERBEGIN, &args, args.cbSize, &result);
2605 -// ExitOnFailure(hr, "BA OnUnregisterBegin failed.");
2606 -
2607 -// if (BOOTSTRAPPER_REGISTRATION_TYPE_NONE < results.registrationType && BOOTSTRAPPER_REGISTRATION_TYPE_FULL >= results.registrationType)
2608 -// {
2609 -// *pRegistrationType = results.registrationType;
2610 -// }
2611 -
2612 -// LExit:
2613 -// return hr;
2614 -// }
2615 -
2616 -// EXTERN_C BAAPI UserExperienceOnUnregisterComplete(
2617 -// __in BURN_USER_EXPERIENCE* pUserExperience,
2618 -// __in HRESULT hrStatus
2619 -// )
2620 -// {
2621 -// HRESULT hr = S_OK;
2622 -// BA_ONUNREGISTERCOMPLETE_ARGS args = { };
2623 -// BA_ONUNREGISTERCOMPLETE_RESULTS results = { };
2624 -// PIPE_RPC_RESULT result = { };
2625 -
2626 -// args.cbSize = sizeof(args);
2627 -// args.hrStatus = hrStatus;
2628 -
2629 -// results.cbSize = sizeof(results);
2630 -
2631 -// hr = SendBAMessage(pUserExperience, BOOTSTRAPPER_APPLICATION_MESSAGE_ONUNREGISTERCOMPLETE, &args, args.cbSize, &result);
2632 -// ExitOnFailure(hr, "BA OnUnregisterComplete failed.");
2633 -
2634 -// LExit:
2635 -// return hr;
2636 -// }
2637 -
2638 -// extern "C" int UserExperienceCheckExecuteResult(
2639 -// __in BURN_USER_EXPERIENCE* pUserExperience,
2640 -// __in BOOL fRollback,
2641 -// __in DWORD dwAllowedResults,
2642 -// __in int nResult
2643 -// )
2644 -// {
2645 -// // Do not allow canceling while rolling back.
2646 -// if (fRollback && (IDCANCEL == nResult || IDABORT == nResult))
2647 -// {
2648 -// nResult = IDNOACTION;
2649 -// }
2650 -// else if (FAILED(pUserExperience->hrApplyError) && !fRollback) // if we failed cancel except not during rollback.
2651 -// {
2652 -// nResult = IDCANCEL;
2653 -// }
2654 -
2655 -// nResult = FilterResult(dwAllowedResults, nResult);
2656 -// return nResult;
2657 -// }
2658 -
2659 -// extern "C" HRESULT UserExperienceInterpretExecuteResult(
2660 -// __in BURN_USER_EXPERIENCE* pUserExperience,
2661 -// __in BOOL fRollback,
2662 -// __in DWORD dwAllowedResults,
2663 -// __in int nResult
2664 -// )
2665 -// {
2666 -// HRESULT hr = S_OK;
2667 -
2668 -// // If we failed return that error unless this is rollback which should roll on.
2669 -// if (FAILED(pUserExperience->hrApplyError) && !fRollback)
2670 -// {
2671 -// hr = pUserExperience->hrApplyError;
2672 -// }
2673 -// else
2674 -// {
2675 -// int nCheckedResult = UserExperienceCheckExecuteResult(pUserExperience, fRollback, dwAllowedResults, nResult);
2676 -// hr = IDOK == nCheckedResult || IDNOACTION == nCheckedResult ? S_OK : IDCANCEL == nCheckedResult || IDABORT == nCheckedResult ? HRESULT_FROM_WIN32(ERROR_INSTALL_USEREXIT) : HRESULT_FROM_WIN32(ERROR_INSTALL_FAILURE);
2677 -// }
2678 -
2679 -// return hr;
2680 -// }
2681 -
2682 -
2683 -// // internal functions
2684 -
2685 -// static int FilterResult(
2686 -// __in DWORD dwAllowedResults,
2687 -// __in int nResult
2688 -// )
2689 -// {
2690 -// if (IDNOACTION == nResult || IDERROR == nResult) // do nothing and errors pass through.
2691 -// {
2692 -// }
2693 -// else
2694 -// {
2695 -// switch (dwAllowedResults)
2696 -// {
2697 -// case MB_OK:
2698 -// nResult = IDOK;
2699 -// break;
2700 -
2701 -// case MB_OKCANCEL:
2702 -// if (IDOK == nResult || IDYES == nResult)
2703 -// {
2704 -// nResult = IDOK;
2705 -// }
2706 -// else if (IDCANCEL == nResult || IDABORT == nResult || IDNO == nResult)
2707 -// {
2708 -// nResult = IDCANCEL;
2709 -// }
2710 -// else
2711 -// {
2712 -// nResult = IDNOACTION;
2713 -// }
2714 -// break;
2715 -
2716 -// case MB_ABORTRETRYIGNORE:
2717 -// if (IDCANCEL == nResult || IDABORT == nResult)
2718 -// {
2719 -// nResult = IDABORT;
2720 -// }
2721 -// else if (IDRETRY == nResult || IDTRYAGAIN == nResult)
2722 -// {
2723 -// nResult = IDRETRY;
2724 -// }
2725 -// else if (IDIGNORE == nResult)
2726 -// {
2727 -// nResult = IDIGNORE;
2728 -// }
2729 -// else
2730 -// {
2731 -// nResult = IDNOACTION;
2732 -// }
2733 -// break;
2734 -
2735 -// case MB_YESNO:
2736 -// if (IDOK == nResult || IDYES == nResult)
2737 -// {
2738 -// nResult = IDYES;
2739 -// }
2740 -// else if (IDCANCEL == nResult || IDABORT == nResult || IDNO == nResult)
2741 -// {
2742 -// nResult = IDNO;
2743 -// }
2744 -// else
2745 -// {
2746 -// nResult = IDNOACTION;
2747 -// }
2748 -// break;
2749 -
2750 -// case MB_YESNOCANCEL:
2751 -// if (IDOK == nResult || IDYES == nResult)
2752 -// {
2753 -// nResult = IDYES;
2754 -// }
2755 -// else if (IDNO == nResult)
2756 -// {
2757 -// nResult = IDNO;
2758 -// }
2759 -// else if (IDCANCEL == nResult || IDABORT == nResult)
2760 -// {
2761 -// nResult = IDCANCEL;
2762 -// }
2763 -// else
2764 -// {
2765 -// nResult = IDNOACTION;
2766 -// }
2767 -// break;
2768 -
2769 -// case MB_RETRYCANCEL:
2770 -// if (IDRETRY == nResult || IDTRYAGAIN == nResult)
2771 -// {
2772 -// nResult = IDRETRY;
2773 -// }
2774 -// else if (IDCANCEL == nResult || IDABORT == nResult)
2775 -// {
2776 -// nResult = IDABORT;
2777 -// }
2778 -// else
2779 -// {
2780 -// nResult = IDNOACTION;
2781 -// }
2782 -// break;
2783 -
2784 -// case MB_CANCELTRYCONTINUE:
2785 -// if (IDCANCEL == nResult || IDABORT == nResult)
2786 -// {
2787 -// nResult = IDABORT;
2788 -// }
2789 -// else if (IDRETRY == nResult || IDTRYAGAIN == nResult)
2790 -// {
2791 -// nResult = IDRETRY;
2792 -// }
2793 -// else if (IDCONTINUE == nResult || IDIGNORE == nResult)
2794 -// {
2795 -// nResult = IDCONTINUE;
2796 -// }
2797 -// else
2798 -// {
2799 -// nResult = IDNOACTION;
2800 -// }
2801 -// break;
2802 -
2803 -// case BURN_MB_RETRYTRYAGAIN: // custom return code.
2804 -// if (IDRETRY != nResult && IDTRYAGAIN != nResult)
2805 -// {
2806 -// nResult = IDNOACTION;
2807 -// }
2808 -// break;
2809 -
2810 -// default:
2811 -// AssertSz(FALSE, "Unknown allowed results.");
2812 -// break;
2813 -// }
2814 -// }
2815 -
2816 -// return nResult;
2817 -// }
2818 -
2819 -// // This filters the BA's responses to events during apply.
2820 -// // If an apply thread failed, then return its error so this thread will bail out.
2821 -// // During rollback, the BA can't cancel.
2822 -// static HRESULT FilterExecuteResult(
2823 -// __in BURN_USER_EXPERIENCE* pUserExperience,
2824 -// __in HRESULT hrStatus,
2825 -// __in BOOL fRollback,
2826 -// __in BOOL fCancel,
2827 -// __in LPCWSTR sczEventName
2828 -// )
2829 -// {
2830 -// HRESULT hr = hrStatus;
2831 -// HRESULT hrApplyError = pUserExperience->hrApplyError; // make sure to use the same value for the whole method, since it can be changed in other threads.
2832 -
2833 -// // If we failed return that error unless this is rollback which should roll on.
2834 -// if (FAILED(hrApplyError) && !fRollback)
2835 -// {
2836 -// hr = hrApplyError;
2837 -// }
2838 -// else if (fRollback)
2839 -// {
2840 -// if (fCancel)
2841 -// {
2842 -// LogId(REPORT_STANDARD, MSG_APPLY_CANCEL_IGNORED_DURING_ROLLBACK, sczEventName);
2843 -// }
2844 -// // TODO: since cancel isn't allowed, should the BA's HRESULT be ignored as well?
2845 -// // In the previous code, they could still alter rollback by returning IDERROR.
2846 -// }
2847 -// else
2848 -// {
2849 -// ExitOnFailure(hr, "BA %ls failed.", sczEventName);
2850 -
2851 -// if (fCancel)
2852 -// {
2853 -// hr = HRESULT_FROM_WIN32(ERROR_INSTALL_USEREXIT);
2854 -// }
2855 -// }
2856 -
2857 -// LExit:
2858 -// return hr;
2859 -// }
2860 -
2861 -// static HRESULT SendBAMessage(
2862 -// __in BURN_USER_EXPERIENCE* /*pUserExperience*/,
2863 -// __in BOOTSTRAPPER_APPLICATION_MESSAGE /*message*/,
2864 -// __in_bcount(cbArgs) const LPVOID /*pvArgs*/,
2865 -// __in DWORD /*cbArgs*/,
2866 -// __in PIPE_RPC_RESULT* /*pResult*/
2867 -// )
2868 -// {
2869 -// // // HRESULT hr = S_OK;
2870 -// // // // DWORD rgResultAndSize[2] = { };
2871 -// // // // DWORD cbSize = 0;
2872 -// // // // LPVOID pvData = NULL;
2873 -// // // // DWORD cbData = 0;
2874 -
2875 -// // // //if (!pUserExperience->hUXModule)
2876 -// // // if (!PipeRpcInitialized(&pUserExperience->hBARpcPipe))
2877 -// // // {
2878 -// // // ExitFunction();
2879 -// // // }
2880 -
2881 -// // // //hr = pUserExperience->pfnBAProc(message, pvArgs, pvResults, pUserExperience->pvBAProcContext);
2882 -// // // //if (hr == E_NOTIMPL)
2883 -// // // //{
2884 -// // // // hr = S_OK;
2885 -// // // //}
2886 -
2887 -// // // // Send the message.
2888 -// // // // hr = PipeWriteMessage(hPipe, message, pvArgs, cbArgs);
2889 -// // // hr = PipeRpcRequest(&pUserExperience->hBARpcPipe, message, pvArgs, cbArgs, pResult);
2890 -// // // ExitOnFailure(hr, "Failed to write message to BA.");
2891 -
2892 -// // // #if TODO_DELETE
2893 -// // // // Read the result and size of response.
2894 -// // // hr = FileReadHandle(hPipe, reinterpret_cast<LPBYTE>(rgResultAndSize), sizeof(rgResultAndSize));
2895 -// // // ExitOnFailure(hr, "Failed to read result and size of message.");
2896 -
2897 -// // // pResult->hr = rgResultAndSize[0];
2898 -// // // cbSize = rgResultAndSize[1];
2899 -
2900 -// // // // Ensure the message size isn't "too big".
2901 -// // // if (cbSize > MAX_SIZE_BA_RESPONSE)
2902 -// // // {
2903 -// // // hr = E_INVALIDDATA;
2904 -// // // ExitOnRootFailure(hr, "BA sent too much data in response.");
2905 -// // // }
2906 -// // // else if (cbSize > sizeof(DWORD)) // if there is data beyond the size of the response struct, read it.
2907 -// // // {
2908 -// // // cbData = cbSize - sizeof(DWORD);
2909 -
2910 -// // // pvData = MemAlloc(cbData, TRUE);
2911 -// // // ExitOnNull(pvData, hr, E_OUTOFMEMORY, "Failed to allocate memory for BA results.");
2912 -
2913 -// // // hr = FileReadHandle(hPipe, reinterpret_cast<LPBYTE>(pvData), cbData);
2914 -// // // ExitOnFailure(hr, "Failed to read result and size of message.");
2915 -// // // }
2916 -
2917 -// // // pResult->cbSize = cbSize;
2918 -// // // pResult->cbData = cbData;
2919 -// // // pResult->pvData = pvData;
2920 -// // // pvData = NULL;
2921 -// // // #endif
2922 -
2923 -// // // hr = pResult->hr;
2924 -// // // ExitOnFailure(hr, "BA reported failure.");
2925 -
2926 -// // // LExit:
2927 -// // // // ReleaseMem(pvData);
2928 -
2929 -// // // return hr;
2930 -// return E_NOTIMPL;
2931 -// }
2932 -
2933 -// static HRESULT SendBAMessageFromInactiveEngine(
2934 -// __in BURN_USER_EXPERIENCE* /*pUserExperience*/,
2935 -// __in BOOTSTRAPPER_APPLICATION_MESSAGE /*message*/,
2936 -// __in_bcount(cbArgs) const LPVOID /*pvArgs*/,
2937 -// __in DWORD /*cbArgs*/,
2938 -// __in PIPE_RPC_RESULT* /*pResult*/
2939 -// )
2940 -// {
2941 -// // // HRESULT hr = S_OK;
2942 -
2943 -// // // //if (!pUserExperience->hUXModule)
2944 -// // // if (!PipeRpcInitialized(&pUserExperience->hBARpcPipe))
2945 -// // // {
2946 -// // // ExitFunction();
2947 -// // // }
2948 -
2949 -// // // UserExperienceDeactivateEngine(pUserExperience);
2950 -
2951 -// // // hr = SendBAMessage(pUserExperience, message, pvArgs, cbArgs, pResult);
2952 -
2953 -// // // UserExperienceActivateEngine(pUserExperience);
2954 -
2955 -// // // LExit:
2956 -// // // return hr;
2957 -// return E_NOTIMPL;
2958 -// }
src/burn/engine/userexperience.h deleted
-539
@@ -1,539 +0,0 @@
1 -#pragma once
2 -// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
3 -
4 -#if defined(__cplusplus)
5 -extern "C" {
6 -#endif
7 -
8 -
9 -// constants
10 -
11 -
12 -// structs
13 -
14 -
15 -// functions
16 -
17 -#ifdef TODO_DELETE
18 -void UserExperienceUninitialize(
19 - __in BURN_USER_EXPERIENCE* pUserExperience
20 - );
21 -HRESULT UserExperienceLoad(
22 - __in BURN_USER_EXPERIENCE* pUserExperience,
23 - __in BOOTSTRAPPER_ENGINE_CONTEXT* pEngineContext,
24 - __in BOOTSTRAPPER_COMMAND* pCommand
25 - );
26 -HRESULT UserExperienceUnload(
27 - __in BURN_USER_EXPERIENCE* pUserExperience,
28 - __in BOOL fReload
29 - );
30 -
31 -BAAPI UserExperienceOnApplyBegin(
32 - __in BURN_USER_EXPERIENCE* pUserExperience,
33 - __in DWORD dwPhaseCount
34 - );
35 -BAAPI UserExperienceOnApplyComplete(
36 - __in BURN_USER_EXPERIENCE* pUserExperience,
37 - __in HRESULT hrStatus,
38 - __in BOOTSTRAPPER_APPLY_RESTART restart,
39 - __inout BOOTSTRAPPER_APPLYCOMPLETE_ACTION* pAction
40 - );
41 -BAAPI UserExperienceOnApplyDowngrade(
42 - __in BURN_USER_EXPERIENCE* pUserExperience,
43 - __inout HRESULT* phrStatus
44 - );
45 -BAAPI UserExperienceOnBeginMsiTransactionBegin(
46 - __in BURN_USER_EXPERIENCE* pUserExperience,
47 - __in LPCWSTR wzTransactionId
48 - );
49 -BAAPI UserExperienceOnBeginMsiTransactionComplete(
50 - __in BURN_USER_EXPERIENCE* pUserExperience,
51 - __in LPCWSTR wzTransactionId,
52 - __in HRESULT hrStatus
53 - );
54 -BAAPI UserExperienceOnCacheAcquireBegin(
55 - __in BURN_USER_EXPERIENCE* pUserExperience,
56 - __in_z_opt LPCWSTR wzPackageOrContainerId,
57 - __in_z_opt LPCWSTR wzPayloadId,
58 - __in_z LPWSTR* pwzSource,
59 - __in_z LPWSTR* pwzDownloadUrl,
60 - __in_z_opt LPCWSTR wzPayloadContainerId,
61 - __out BOOTSTRAPPER_CACHE_OPERATION* pCacheOperation
62 - );
63 -BAAPI UserExperienceOnCacheAcquireComplete(
64 - __in BURN_USER_EXPERIENCE* pUserExperience,
65 - __in_z_opt LPCWSTR wzPackageOrContainerId,
66 - __in_z_opt LPCWSTR wzPayloadId,
67 - __in HRESULT hrStatus,
68 - __inout BOOL* pfRetry
69 - );
70 -BAAPI UserExperienceOnCacheAcquireProgress(
71 - __in BURN_USER_EXPERIENCE* pUserExperience,
72 - __in_z_opt LPCWSTR wzPackageOrContainerId,
73 - __in_z_opt LPCWSTR wzPayloadId,
74 - __in DWORD64 dw64Progress,
75 - __in DWORD64 dw64Total,
76 - __in DWORD dwOverallPercentage
77 - );
78 -BAAPI UserExperienceOnCacheAcquireResolving(
79 - __in BURN_USER_EXPERIENCE* pUserExperience,
80 - __in_z_opt LPCWSTR wzPackageOrContainerId,
81 - __in_z_opt LPCWSTR wzPayloadId,
82 - __in_z LPWSTR* rgSearchPaths,
83 - __in DWORD cSearchPaths,
84 - __in BOOL fFoundLocal,
85 - __in DWORD* pdwChosenSearchPath,
86 - __in_z_opt LPWSTR* pwzDownloadUrl,
87 - __in_z_opt LPCWSTR wzPayloadContainerId,
88 - __inout BOOTSTRAPPER_CACHE_RESOLVE_OPERATION* pCacheOperation
89 - );
90 -BAAPI UserExperienceOnCacheBegin(
91 - __in BURN_USER_EXPERIENCE* pUserExperience
92 - );
93 -BAAPI UserExperienceOnCacheComplete(
94 - __in BURN_USER_EXPERIENCE* pUserExperience,
95 - __in HRESULT hrStatus
96 - );
97 -BAAPI UserExperienceOnCacheContainerOrPayloadVerifyBegin(
98 - __in BURN_USER_EXPERIENCE* pUserExperience,
99 - __in_z_opt LPCWSTR wzPackageOrContainerId,
100 - __in_z_opt LPCWSTR wzPayloadId
101 - );
102 -BAAPI UserExperienceOnCacheContainerOrPayloadVerifyComplete(
103 - __in BURN_USER_EXPERIENCE* pUserExperience,
104 - __in_z_opt LPCWSTR wzPackageOrContainerId,
105 - __in_z_opt LPCWSTR wzPayloadId,
106 - __in HRESULT hrStatus
107 - );
108 -BAAPI UserExperienceOnCacheContainerOrPayloadVerifyProgress(
109 - __in BURN_USER_EXPERIENCE* pUserExperience,
110 - __in_z_opt LPCWSTR wzPackageOrContainerId,
111 - __in_z_opt LPCWSTR wzPayloadId,
112 - __in DWORD64 dw64Progress,
113 - __in DWORD64 dw64Total,
114 - __in DWORD dwOverallPercentage
115 - );
116 -BAAPI UserExperienceOnCachePackageBegin(
117 - __in BURN_USER_EXPERIENCE* pUserExperience,
118 - __in_z LPCWSTR wzPackageId,
119 - __in DWORD cCachePayloads,
120 - __in DWORD64 dw64PackageCacheSize,
121 - __in BOOL fVital
122 - );
123 -BAAPI UserExperienceOnCachePackageNonVitalValidationFailure(
124 - __in BURN_USER_EXPERIENCE* pUserExperience,
125 - __in_z LPCWSTR wzPackageId,
126 - __in HRESULT hrStatus,
127 - __inout BOOTSTRAPPER_CACHEPACKAGENONVITALVALIDATIONFAILURE_ACTION* pAction
128 - );
129 -BAAPI UserExperienceOnCachePackageComplete(
130 - __in BURN_USER_EXPERIENCE* pUserExperience,
131 - __in_z LPCWSTR wzPackageId,
132 - __in HRESULT hrStatus,
133 - __inout BOOTSTRAPPER_CACHEPACKAGECOMPLETE_ACTION* pAction
134 - );
135 -BAAPI UserExperienceOnCachePayloadExtractBegin(
136 - __in BURN_USER_EXPERIENCE* pUserExperience,
137 - __in_z_opt LPCWSTR wzContainerId,
138 - __in_z_opt LPCWSTR wzPayloadId
139 - );
140 -BAAPI UserExperienceOnCachePayloadExtractComplete(
141 - __in BURN_USER_EXPERIENCE* pUserExperience,
142 - __in_z_opt LPCWSTR wzContainerId,
143 - __in_z_opt LPCWSTR wzPayloadId,
144 - __in HRESULT hrStatus
145 - );
146 -BAAPI UserExperienceOnCachePayloadExtractProgress(
147 - __in BURN_USER_EXPERIENCE* pUserExperience,
148 - __in_z_opt LPCWSTR wzContainerId,
149 - __in_z_opt LPCWSTR wzPayloadId,
150 - __in DWORD64 dw64Progress,
151 - __in DWORD64 dw64Total,
152 - __in DWORD dwOverallPercentage
153 - );
154 -BAAPI UserExperienceOnCacheVerifyBegin(
155 - __in BURN_USER_EXPERIENCE* pUserExperience,
156 - __in_z_opt LPCWSTR wzPackageOrContainerId,
157 - __in_z_opt LPCWSTR wzPayloadId
158 - );
159 -BAAPI UserExperienceOnCacheVerifyComplete(
160 - __in BURN_USER_EXPERIENCE* pUserExperience,
161 - __in_z_opt LPCWSTR wzPackageOrContainerId,
162 - __in_z_opt LPCWSTR wzPayloadId,
163 - __in HRESULT hrStatus,
164 - __inout BOOTSTRAPPER_CACHEVERIFYCOMPLETE_ACTION* pAction
165 - );
166 -BAAPI UserExperienceOnCacheVerifyProgress(
167 - __in BURN_USER_EXPERIENCE* pUserExperience,
168 - __in_z_opt LPCWSTR wzPackageOrContainerId,
169 - __in_z_opt LPCWSTR wzPayloadId,
170 - __in DWORD64 dw64Progress,
171 - __in DWORD64 dw64Total,
172 - __in DWORD dwOverallPercentage,
173 - __in BOOTSTRAPPER_CACHE_VERIFY_STEP verifyStep
174 - );
175 -BAAPI UserExperienceOnCommitMsiTransactionBegin(
176 - __in BURN_USER_EXPERIENCE* pUserExperience,
177 - __in LPCWSTR wzTransactionId
178 - );
179 -BAAPI UserExperienceOnCommitMsiTransactionComplete(
180 - __in BURN_USER_EXPERIENCE* pUserExperience,
181 - __in LPCWSTR wzTransactionId,
182 - __in HRESULT hrStatus,
183 - __in BOOTSTRAPPER_APPLY_RESTART restart,
184 - __inout BOOTSTRAPPER_EXECUTEMSITRANSACTIONCOMPLETE_ACTION* pAction
185 -);
186 -BAAPI UserExperienceOnDetectBegin(
187 - __in BURN_USER_EXPERIENCE* pUserExperience,
188 - __in BOOL fCached,
189 - __in BOOTSTRAPPER_REGISTRATION_TYPE registrationType,
190 - __in DWORD cPackages
191 - );
192 -BAAPI UserExperienceOnDetectCompatibleMsiPackage(
193 - __in BURN_USER_EXPERIENCE* pUserExperience,
194 - __in_z LPCWSTR wzPackageId,
195 - __in_z LPCWSTR wzCompatiblePackageId,
196 - __in VERUTIL_VERSION* pCompatiblePackageVersion
197 - );
198 -BAAPI UserExperienceOnDetectComplete(
199 - __in BURN_USER_EXPERIENCE* pUserExperience,
200 - __in HRESULT hrStatus,
201 - __in BOOL fEligibleForCleanup
202 - );
203 -BAAPI UserExperienceOnDetectForwardCompatibleBundle(
204 - __in BURN_USER_EXPERIENCE* pUserExperience,
205 - __in_z LPCWSTR wzBundleId,
206 - __in BOOTSTRAPPER_RELATION_TYPE relationType,
207 - __in_z LPCWSTR wzBundleTag,
208 - __in BOOL fPerMachine,
209 - __in VERUTIL_VERSION* pVersion,
210 - __in BOOL fMissingFromCache
211 - );
212 -BAAPI UserExperienceOnDetectMsiFeature(
213 - __in BURN_USER_EXPERIENCE* pUserExperience,
214 - __in_z LPCWSTR wzPackageId,
215 - __in_z LPCWSTR wzFeatureId,
216 - __in BOOTSTRAPPER_FEATURE_STATE state
217 - );
218 -BAAPI UserExperienceOnDetectPackageBegin(
219 - __in BURN_USER_EXPERIENCE* pUserExperience,
220 - __in_z LPCWSTR wzPackageId
221 - );
222 -BAAPI UserExperienceOnDetectPackageComplete(
223 - __in BURN_USER_EXPERIENCE* pUserExperience,
224 - __in_z LPCWSTR wzPackageId,
225 - __in HRESULT hrStatus,
226 - __in BOOTSTRAPPER_PACKAGE_STATE state,
227 - __in BOOL fCached
228 - );
229 -BAAPI UserExperienceOnDetectRelatedBundle(
230 - __in BURN_USER_EXPERIENCE* pUserExperience,
231 - __in_z LPCWSTR wzBundleId,
232 - __in BOOTSTRAPPER_RELATION_TYPE relationType,
233 - __in_z LPCWSTR wzBundleTag,
234 - __in BOOL fPerMachine,
235 - __in VERUTIL_VERSION* pVersion,
236 - __in BOOL fMissingFromCache
237 - );
238 -BAAPI UserExperienceOnDetectRelatedBundlePackage(
239 - __in BURN_USER_EXPERIENCE* pUserExperience,
240 - __in_z LPCWSTR wzPackageId,
241 - __in_z LPCWSTR wzBundleId,
242 - __in BOOTSTRAPPER_RELATION_TYPE relationType,
243 - __in BOOL fPerMachine,
244 - __in VERUTIL_VERSION* pVersion
245 - );
246 -BAAPI UserExperienceOnDetectRelatedMsiPackage(
247 - __in BURN_USER_EXPERIENCE* pUserExperience,
248 - __in_z LPCWSTR wzPackageId,
249 - __in_z LPCWSTR wzUpgradeCode,
250 - __in_z LPCWSTR wzProductCode,
251 - __in BOOL fPerMachine,
252 - __in VERUTIL_VERSION* pVersion,
253 - __in BOOTSTRAPPER_RELATED_OPERATION operation
254 - );
255 -BAAPI UserExperienceOnDetectPatchTarget(
256 - __in BURN_USER_EXPERIENCE* pUserExperience,
257 - __in_z LPCWSTR wzPackageId,
258 - __in_z LPCWSTR wzProductCode,
259 - __in BOOTSTRAPPER_PACKAGE_STATE patchState
260 - );
261 -BAAPI UserExperienceOnDetectUpdate(
262 - __in BURN_USER_EXPERIENCE* pUserExperience,
263 - __in_z_opt LPCWSTR wzUpdateLocation,
264 - __in DWORD64 dw64Size,
265 - __in_z_opt LPCWSTR wzHash,
266 - __in BOOTSTRAPPER_UPDATE_HASH_TYPE hashAlgorithm,
267 - __in VERUTIL_VERSION* pVersion,
268 - __in_z_opt LPCWSTR wzTitle,
269 - __in_z_opt LPCWSTR wzSummary,
270 - __in_z_opt LPCWSTR wzContentType,
271 - __in_z_opt LPCWSTR wzContent,
272 - __inout BOOL* pfStopProcessingUpdates
273 - );
274 -BAAPI UserExperienceOnDetectUpdateBegin(
275 - __in BURN_USER_EXPERIENCE* pUserExperience,
276 - __in_z LPCWSTR wzUpdateLocation,
277 - __inout BOOL* pfSkip
278 - );
279 -BAAPI UserExperienceOnDetectUpdateComplete(
280 - __in BURN_USER_EXPERIENCE* pUserExperience,
281 - __in HRESULT hrStatus,
282 - __inout BOOL* pfIgnoreError
283 - );
284 -BAAPI UserExperienceOnElevateBegin(
285 - __in BURN_USER_EXPERIENCE* pUserExperience
286 - );
287 -BAAPI UserExperienceOnElevateComplete(
288 - __in BURN_USER_EXPERIENCE* pUserExperience,
289 - __in HRESULT hrStatus
290 - );
291 -BAAPI UserExperienceOnError(
292 - __in BURN_USER_EXPERIENCE* pUserExperience,
293 - __in BOOTSTRAPPER_ERROR_TYPE errorType,
294 - __in_z_opt LPCWSTR wzPackageId,
295 - __in DWORD dwCode,
296 - __in_z_opt LPCWSTR wzError,
297 - __in DWORD dwUIHint,
298 - __in DWORD cData,
299 - __in_ecount_z_opt(cData) LPCWSTR* rgwzData,
300 - __inout int* pnResult
301 - );
302 -BAAPI UserExperienceOnExecuteBegin(
303 - __in BURN_USER_EXPERIENCE* pUserExperience,
304 - __in DWORD cExecutingPackages
305 - );
306 -BAAPI UserExperienceOnExecuteComplete(
307 - __in BURN_USER_EXPERIENCE* pUserExperience,
308 - __in HRESULT hrStatus
309 - );
310 -BAAPI UserExperienceOnExecuteFilesInUse(
311 - __in BURN_USER_EXPERIENCE* pUserExperience,
312 - __in_z LPCWSTR wzPackageId,
313 - __in DWORD cFiles,
314 - __in_ecount_z_opt(cFiles) LPCWSTR* rgwzFiles,
315 - __in BOOTSTRAPPER_FILES_IN_USE_TYPE source,
316 - __inout int* pnResult
317 - );
318 -BAAPI UserExperienceOnExecuteMsiMessage(
319 - __in BURN_USER_EXPERIENCE* pUserExperience,
320 - __in_z LPCWSTR wzPackageId,
321 - __in INSTALLMESSAGE messageType,
322 - __in DWORD dwUIHint,
323 - __in_z LPCWSTR wzMessage,
324 - __in DWORD cData,
325 - __in_ecount_z_opt(cData) LPCWSTR* rgwzData,
326 - __inout int* pnResult
327 - );
328 -BAAPI UserExperienceOnExecutePackageBegin(
329 - __in BURN_USER_EXPERIENCE* pUserExperience,
330 - __in_z LPCWSTR wzPackageId,
331 - __in BOOL fExecute,
332 - __in BOOTSTRAPPER_ACTION_STATE action,
333 - __in INSTALLUILEVEL uiLevel,
334 - __in BOOL fDisableExternalUiHandler
335 - );
336 -BAAPI UserExperienceOnExecutePackageComplete(
337 - __in BURN_USER_EXPERIENCE* pUserExperience,
338 - __in_z LPCWSTR wzPackageId,
339 - __in HRESULT hrStatus,
340 - __in BOOTSTRAPPER_APPLY_RESTART restart,
341 - __inout BOOTSTRAPPER_EXECUTEPACKAGECOMPLETE_ACTION* pAction
342 - );
343 -BAAPI UserExperienceOnExecutePatchTarget(
344 - __in BURN_USER_EXPERIENCE* pUserExperience,
345 - __in_z LPCWSTR wzPackageId,
346 - __in_z LPCWSTR wzTargetProductCode
347 - );
348 -BAAPI UserExperienceOnExecuteProcessCancel(
349 - __in BURN_USER_EXPERIENCE* pUserExperience,
350 - __in_z LPCWSTR wzPackageId,
351 - __in DWORD dwProcessId,
352 - __inout BOOTSTRAPPER_EXECUTEPROCESSCANCEL_ACTION* pAction
353 - );
354 -BAAPI UserExperienceOnExecuteProgress(
355 - __in BURN_USER_EXPERIENCE* pUserExperience,
356 - __in_z LPCWSTR wzPackageId,
357 - __in DWORD dwProgressPercentage,
358 - __in DWORD dwOverallPercentage,
359 - __out int* pnResult
360 - );
361 -BAAPI UserExperienceOnLaunchApprovedExeBegin(
362 - __in BURN_USER_EXPERIENCE* pUserExperience
363 - );
364 -BAAPI UserExperienceOnLaunchApprovedExeComplete(
365 - __in BURN_USER_EXPERIENCE* pUserExperience,
366 - __in HRESULT hrStatus,
367 - __in DWORD dwProcessId
368 - );
369 -BAAPI UserExperienceOnPauseAUBegin(
370 - __in BURN_USER_EXPERIENCE* pUserExperience
371 - );
372 -BAAPI UserExperienceOnPauseAUComplete(
373 - __in BURN_USER_EXPERIENCE* pUserExperience,
374 - __in HRESULT hrStatus
375 - );
376 -BAAPI UserExperienceOnPlanBegin(
377 - __in BURN_USER_EXPERIENCE* pUserExperience,
378 - __in DWORD cPackages
379 - );
380 -BAAPI UserExperienceOnPlanCompatibleMsiPackageBegin(
381 - __in BURN_USER_EXPERIENCE* pUserExperience,
382 - __in_z LPCWSTR wzPackageId,
383 - __in_z LPCWSTR wzCompatiblePackageId,
384 - __in VERUTIL_VERSION* pCompatiblePackageVersion,
385 - __inout BOOL* pfRequested
386 - );
387 -BAAPI UserExperienceOnPlanCompatibleMsiPackageComplete(
388 - __in BURN_USER_EXPERIENCE* pUserExperience,
389 - __in_z LPCWSTR wzPackageId,
390 - __in_z LPCWSTR wzCompatiblePackageId,
391 - __in HRESULT hrStatus,
392 - __in BOOL fRequested
393 - );
394 -BAAPI UserExperienceOnPlanComplete(
395 - __in BURN_USER_EXPERIENCE* pUserExperience,
396 - __in HRESULT hrStatus
397 - );
398 -BAAPI UserExperienceOnPlanForwardCompatibleBundle(
399 - __in BURN_USER_EXPERIENCE* pUserExperience,
400 - __in_z LPCWSTR wzBundleId,
401 - __in BOOTSTRAPPER_RELATION_TYPE relationType,
402 - __in_z LPCWSTR wzBundleTag,
403 - __in BOOL fPerMachine,
404 - __in VERUTIL_VERSION* pVersion,
405 - __inout BOOL* pfIgnoreBundle
406 - );
407 -BAAPI UserExperienceOnPlanMsiFeature(
408 - __in BURN_USER_EXPERIENCE* pUserExperience,
409 - __in_z LPCWSTR wzPackageId,
410 - __in_z LPCWSTR wzFeatureId,
411 - __inout BOOTSTRAPPER_FEATURE_STATE* pRequestedState
412 - );
413 -BAAPI UserExperienceOnPlanMsiPackage(
414 - __in BURN_USER_EXPERIENCE* pUserExperience,
415 - __in_z LPCWSTR wzPackageId,
416 - __in BOOL fExecute,
417 - __in BOOTSTRAPPER_ACTION_STATE action,
418 - __inout BURN_MSI_PROPERTY* pActionMsiProperty,
419 - __inout INSTALLUILEVEL* pUiLevel,
420 - __inout BOOL* pfDisableExternalUiHandler,
421 - __inout BOOTSTRAPPER_MSI_FILE_VERSIONING* pFileVersioning
422 - );
423 -BAAPI UserExperienceOnPlannedCompatiblePackage(
424 - __in BURN_USER_EXPERIENCE* pUserExperience,
425 - __in_z LPCWSTR wzPackageId,
426 - __in_z LPCWSTR wzCompatiblePackageId,
427 - __in BOOL fRemove
428 - );
429 -BAAPI UserExperienceOnPlannedPackage(
430 - __in BURN_USER_EXPERIENCE* pUserExperience,
431 - __in_z LPCWSTR wzPackageId,
432 - __in BOOTSTRAPPER_ACTION_STATE execute,
433 - __in BOOTSTRAPPER_ACTION_STATE rollback,
434 - __in BOOL fPlannedCache,
435 - __in BOOL fPlannedUncache
436 - );
437 -BAAPI UserExperienceOnPlanPackageBegin(
438 - __in BURN_USER_EXPERIENCE* pUserExperience,
439 - __in_z LPCWSTR wzPackageId,
440 - __in BOOTSTRAPPER_PACKAGE_STATE state,
441 - __in BOOL fCached,
442 - __in BOOTSTRAPPER_PACKAGE_CONDITION_RESULT installCondition,
443 - __in BOOTSTRAPPER_PACKAGE_CONDITION_RESULT repairCondition,
444 - __inout BOOTSTRAPPER_REQUEST_STATE* pRequestedState,
445 - __inout BOOTSTRAPPER_CACHE_TYPE* pRequestedCacheType
446 - );
447 -BAAPI UserExperienceOnPlanPackageComplete(
448 - __in BURN_USER_EXPERIENCE* pUserExperience,
449 - __in_z LPCWSTR wzPackageId,
450 - __in HRESULT hrStatus,
451 - __in BOOTSTRAPPER_REQUEST_STATE requested
452 - );
453 -BAAPI UserExperienceOnPlanRelatedBundle(
454 - __in BURN_USER_EXPERIENCE* pUserExperience,
455 - __in_z LPCWSTR wzBundleId,
456 - __inout BOOTSTRAPPER_REQUEST_STATE* pRequestedState
457 - );
458 -BAAPI UserExperienceOnPlanRelatedBundleType(
459 - __in BURN_USER_EXPERIENCE* pUserExperience,
460 - __in_z LPCWSTR wzBundleId,
461 - __inout BOOTSTRAPPER_RELATED_BUNDLE_PLAN_TYPE* pRequestedType
462 - );
463 -BAAPI UserExperienceOnPlanRestoreRelatedBundle(
464 - __in BURN_USER_EXPERIENCE* pUserExperience,
465 - __in_z LPCWSTR wzBundleId,
466 - __inout BOOTSTRAPPER_REQUEST_STATE* pRequestedState
467 - );
468 -BAAPI UserExperienceOnPlanRollbackBoundary(
469 - __in BURN_USER_EXPERIENCE* pUserExperience,
470 - __in_z LPCWSTR wzRollbackBoundaryId,
471 - __inout BOOL *pfTransaction
472 - );
473 -BAAPI UserExperienceOnPlanPatchTarget(
474 - __in BURN_USER_EXPERIENCE* pUserExperience,
475 - __in_z LPCWSTR wzPackageId,
476 - __in_z LPCWSTR wzProductCode,
477 - __inout BOOTSTRAPPER_REQUEST_STATE* pRequestedState
478 - );
479 -BAAPI UserExperienceOnProgress(
480 - __in BURN_USER_EXPERIENCE* pUserExperience,
481 - __in BOOL fRollback,
482 - __in DWORD dwProgressPercentage,
483 - __in DWORD dwOverallPercentage
484 - );
485 -BAAPI UserExperienceOnRegisterBegin(
486 - __in BURN_USER_EXPERIENCE* pUserExperience,
487 - __inout BOOTSTRAPPER_REGISTRATION_TYPE* pRegistrationType
488 - );
489 -BAAPI UserExperienceOnRegisterComplete(
490 - __in BURN_USER_EXPERIENCE* pUserExperience,
491 - __in HRESULT hrStatus
492 - );
493 -BAAPI UserExperienceOnRollbackMsiTransactionBegin(
494 - __in BURN_USER_EXPERIENCE* pUserExperience,
495 - __in LPCWSTR wzTransactionId
496 - );
497 -BAAPI UserExperienceOnRollbackMsiTransactionComplete(
498 - __in BURN_USER_EXPERIENCE* pUserExperience,
499 - __in LPCWSTR wzTransactionId,
500 - __in HRESULT hrStatus,
501 - __in BOOTSTRAPPER_APPLY_RESTART restart,
502 - __inout BOOTSTRAPPER_EXECUTEMSITRANSACTIONCOMPLETE_ACTION* pAction
503 -);
504 -BAAPI UserExperienceOnSetUpdateBegin(
505 - __in BURN_USER_EXPERIENCE* pUserExperience
506 - );
507 -BAAPI UserExperienceOnSetUpdateComplete(
508 - __in BURN_USER_EXPERIENCE* pUserExperience,
509 - __in HRESULT hrStatus,
510 - __in_z_opt LPCWSTR wzPreviousPackageId,
511 - __in_z_opt LPCWSTR wzNewPackageId
512 - );
513 -BAAPI UserExperienceOnShutdown(
514 - __in BURN_USER_EXPERIENCE* pUserExperience,
515 - __inout BOOTSTRAPPER_SHUTDOWN_ACTION* pAction
516 - );
517 -BAAPI UserExperienceOnStartup(
518 - __in BURN_USER_EXPERIENCE* pUserExperience
519 - );
520 -BAAPI UserExperienceOnSystemRestorePointBegin(
521 - __in BURN_USER_EXPERIENCE* pUserExperience
522 - );
523 -BAAPI UserExperienceOnSystemRestorePointComplete(
524 - __in BURN_USER_EXPERIENCE* pUserExperience,
525 - __in HRESULT hrStatus
526 - );
527 -BAAPI UserExperienceOnUnregisterBegin(
528 - __in BURN_USER_EXPERIENCE* pUserExperience,
529 - __inout BOOTSTRAPPER_REGISTRATION_TYPE* pRegistrationType
530 - );
531 -BAAPI UserExperienceOnUnregisterComplete(
532 - __in BURN_USER_EXPERIENCE* pUserExperience,
533 - __in HRESULT hrStatus
534 - );
535 -#endif
536 -
537 -#if defined(__cplusplus)
538 -}
539 -#endif
src/burn/test/BurnUnitTest/precomp.h
-1
@@ -52,7 +52,6 @@
52 #include "burnextension.h"
53 #include "search.h"
54 #include "ba.h"
55 -#include "userexperience.h"
55 #include "package.h"
56 #include "update.h"
57 #include "pseudobundle.h"