main
h 753 lines 27.4 KB
Raw
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 #include "BootstrapperApplicationTypes.h"
5 #include "IBootstrapperEngine.h"
6
7 DECLARE_INTERFACE_IID_(IBootstrapperApplication, IUnknown, "53C31D56-49C0-426B-AB06-099D717C67FE")
8 {
9 // BAProc - The PFN_BOOTSTRAPPER_APPLICATION_PROC can call this method to give the BA raw access to the callback from the engine.
10 // This might be used to help the BA support more than one version of the engine.
11 STDMETHOD(BAProc)(
12 __in BOOTSTRAPPER_APPLICATION_MESSAGE message,
13 __in const LPVOID pvArgs,
14 __inout LPVOID pvResults
15 ) = 0;
16
17 // BAProcFallback - The PFN_BOOTSTRAPPER_APPLICATION_PROC can call this method
18 // to give the BA the ability to use default behavior
19 // and then forward the message to extensions.
20 STDMETHOD_(void, BAProcFallback)(
21 __in BOOTSTRAPPER_APPLICATION_MESSAGE message,
22 __in const LPVOID pvArgs,
23 __inout LPVOID pvResults,
24 __inout HRESULT* phr
25 ) = 0;
26
27 // OnCreate - called when the bootstrapper application is created.
28 //
29 virtual STDMETHODIMP OnCreate(
30 __in IBootstrapperEngine* pEngine,
31 __in BOOTSTRAPPER_COMMAND* pCommand
32 ) = 0;
33
34 // OnDestroy - called before the bootstrapper application stops.
35 //
36 STDMETHOD(OnDestroy)(
37 __in BOOL fReload
38 ) = 0;
39
40 // OnStartup - called when the engine is ready for the bootstrapper application to start.
41 //
42 STDMETHOD(OnStartup)() = 0;
43
44 // OnShutdown - called after the bootstrapper application quits the engine.
45 STDMETHOD(OnShutdown)(
46 __inout BOOTSTRAPPER_SHUTDOWN_ACTION* pAction
47 ) = 0;
48
49 // OnDetectBegin - called when the engine begins detection.
50 STDMETHOD(OnDetectBegin)(
51 __in BOOL fCached,
52 __in BOOTSTRAPPER_REGISTRATION_TYPE registrationType,
53 __in DWORD cPackages,
54 __inout BOOL* pfCancel
55 ) = 0;
56
57 // OnDetectForwardCompatibleBundle - called when the engine detects a forward compatible bundle.
58 STDMETHOD(OnDetectForwardCompatibleBundle)(
59 __in_z LPCWSTR wzBundleId,
60 __in BOOTSTRAPPER_RELATION_TYPE relationType,
61 __in_z LPCWSTR wzBundleTag,
62 __in BOOL fPerMachine,
63 __in_z LPCWSTR wzVersion,
64 __in BOOL fMissingFromCache,
65 __inout BOOL* pfCancel
66 ) = 0;
67
68 // OnDetectUpdateBegin - called when the engine begins detection for bundle update.
69 STDMETHOD(OnDetectUpdateBegin)(
70 __in_z LPCWSTR wzUpdateLocation,
71 __inout BOOL* pfCancel,
72 __inout BOOL* pfSkip
73 ) = 0;
74
75 // OnDetectUpdate - called when the engine has an update candidate for bundle update.
76 STDMETHOD(OnDetectUpdate)(
77 __in_z_opt LPCWSTR wzUpdateLocation,
78 __in DWORD64 dw64Size,
79 __in_z_opt LPCWSTR wzHash,
80 __in BOOTSTRAPPER_UPDATE_HASH_TYPE hashAlgorithm,
81 __in_z LPCWSTR wzVersion,
82 __in_z_opt LPCWSTR wzTitle,
83 __in_z_opt LPCWSTR wzSummary,
84 __in_z_opt LPCWSTR wzContentType,
85 __in_z_opt LPCWSTR wzContent,
86 __inout BOOL* pfCancel,
87 __inout BOOL* pfStopProcessingUpdates
88 ) = 0;
89
90 // OnDetectUpdateComplete - called when the engine completes detection for bundle update.
91 STDMETHOD(OnDetectUpdateComplete)(
92 __in HRESULT hrStatus,
93 __inout BOOL* pfIgnoreError
94 ) = 0;
95
96 // OnDetectRelatedBundle - called when the engine detects a related bundle.
97 STDMETHOD(OnDetectRelatedBundle)(
98 __in_z LPCWSTR wzBundleId,
99 __in BOOTSTRAPPER_RELATION_TYPE relationType,
100 __in_z LPCWSTR wzBundleTag,
101 __in BOOL fPerMachine,
102 __in_z LPCWSTR wzVersion,
103 __in BOOL fMissingFromCache,
104 __inout BOOL* pfCancel
105 ) = 0;
106
107 // OnDetectPackageBegin - called when the engine begins detecting a package.
108 STDMETHOD(OnDetectPackageBegin)(
109 __in_z LPCWSTR wzPackageId,
110 __inout BOOL* pfCancel
111 ) = 0;
112
113 // OnDetectCompatibleMsiPackage - called when the engine detects that a package is not installed but a newer package using the same provider key is.
114 STDMETHOD(OnDetectCompatibleMsiPackage)(
115 __in_z LPCWSTR wzPackageId,
116 __in_z LPCWSTR wzCompatiblePackageId,
117 __in_z LPCWSTR wzCompatiblePackageVersion,
118 __inout BOOL* pfCancel
119 ) = 0;
120
121 // OnDetectRelatedMsiPackage - called when the engine begins detects a related package.
122 STDMETHOD(OnDetectRelatedMsiPackage)(
123 __in_z LPCWSTR wzPackageId,
124 __in_z LPCWSTR wzUpgradeCode,
125 __in_z LPCWSTR wzProductCode,
126 __in BOOL fPerMachine,
127 __in_z LPCWSTR wzVersion,
128 __in BOOTSTRAPPER_RELATED_OPERATION operation,
129 __inout BOOL* pfCancel
130 ) = 0;
131
132 // OnDetectPatchTarget - called when the engine detects a target product
133 // for an MSP package.
134 STDMETHOD(OnDetectPatchTarget)(
135 __in_z LPCWSTR wzPackageId,
136 __in_z LPCWSTR wzProductCode,
137 __in BOOTSTRAPPER_PACKAGE_STATE patchState,
138 __inout BOOL* pfCancel
139 ) = 0;
140
141 // OnDetectMsiFeature - called when the engine detects a feature in an MSI package.
142 STDMETHOD(OnDetectMsiFeature)(
143 __in_z LPCWSTR wzPackageId,
144 __in_z LPCWSTR wzFeatureId,
145 __in BOOTSTRAPPER_FEATURE_STATE state,
146 __inout BOOL* pfCancel
147 ) = 0;
148
149 // OnDetectPackageComplete - called after the engine detects a package.
150 //
151 STDMETHOD(OnDetectPackageComplete)(
152 __in_z LPCWSTR wzPackageId,
153 __in HRESULT hrStatus,
154 __in BOOTSTRAPPER_PACKAGE_STATE state,
155 __in BOOL fCached
156 ) = 0;
157
158 // OnDetectPackageComplete - called after the engine completes detection.
159 //
160 STDMETHOD(OnDetectComplete)(
161 __in HRESULT hrStatus,
162 __in BOOL fEligibleForCleanup
163 ) = 0;
164
165 // OnPlanBegin - called when the engine begins planning.
166 STDMETHOD(OnPlanBegin)(
167 __in DWORD cPackages,
168 __inout BOOL* pfCancel
169 ) = 0;
170
171 // OnPlanRelatedBundle - called when the engine begins planning a related bundle.
172 STDMETHOD(OnPlanRelatedBundle)(
173 __in_z LPCWSTR wzBundleId,
174 __in BOOTSTRAPPER_REQUEST_STATE recommendedState,
175 __inout BOOTSTRAPPER_REQUEST_STATE* pRequestedState,
176 __inout BOOL* pfCancel
177 ) = 0;
178
179 // OnPlanRollbackBoundary - called when the engine is planning a rollback boundary.
180 STDMETHOD(OnPlanRollbackBoundary)(
181 __in_z LPCWSTR wzRollbackBoundaryId,
182 __in BOOL fRecommendedTransaction,
183 __inout BOOL* pfTransaction,
184 __inout BOOL* pfCancel
185 ) = 0;
186
187 // OnPlanPackageBegin - called when the engine has begun getting the BA's input
188 // for planning a package.
189 STDMETHOD(OnPlanPackageBegin)(
190 __in_z LPCWSTR wzPackageId,
191 __in BOOTSTRAPPER_PACKAGE_STATE state,
192 __in BOOL fCached,
193 __in BOOTSTRAPPER_PACKAGE_CONDITION_RESULT installCondition,
194 __in BOOTSTRAPPER_PACKAGE_CONDITION_RESULT repairCondition,
195 __in BOOTSTRAPPER_REQUEST_STATE recommendedState,
196 __in BOOTSTRAPPER_CACHE_TYPE recommendedCacheType,
197 __inout BOOTSTRAPPER_REQUEST_STATE* pRequestedState,
198 __inout BOOTSTRAPPER_CACHE_TYPE* pRequestedCacheType,
199 __inout BOOL* pfCancel
200 ) = 0;
201
202 // OnPlanCompatibleMsiPackageBegin - called when the engine plans a newer, compatible package using the same provider key.
203 STDMETHOD(OnPlanCompatibleMsiPackageBegin)(
204 __in_z LPCWSTR wzPackageId,
205 __in_z LPCWSTR wzCompatiblePackageId,
206 __in_z LPCWSTR wzCompatiblePackageVersion,
207 __in BOOL fRecommendedRemove,
208 __inout BOOL* pfRequestRemove,
209 __inout BOOL* pfCancel
210 ) = 0;
211
212 // OnPlanCompatibleMsiPackageComplete - called after the engine plans the package.
213 //
214 STDMETHOD(OnPlanCompatibleMsiPackageComplete)(
215 __in_z LPCWSTR wzPackageId,
216 __in_z LPCWSTR wzCompatiblePackageId,
217 __in HRESULT hrStatus,
218 __in BOOL fRequestedRemove
219 ) = 0;
220
221 // OnPlanPatchTarget - called when the engine is about to plan a target
222 // of an MSP package.
223 STDMETHOD(OnPlanPatchTarget)(
224 __in_z LPCWSTR wzPackageId,
225 __in_z LPCWSTR wzProductCode,
226 __in BOOTSTRAPPER_REQUEST_STATE recommendedState,
227 __inout BOOTSTRAPPER_REQUEST_STATE* pRequestedState,
228 __inout BOOL* pfCancel
229 ) = 0;
230
231 // OnPlanMsiFeature - called when the engine plans a feature in an
232 // MSI package.
233 STDMETHOD(OnPlanMsiFeature)(
234 __in_z LPCWSTR wzPackageId,
235 __in_z LPCWSTR wzFeatureId,
236 __in BOOTSTRAPPER_FEATURE_STATE recommendedState,
237 __inout BOOTSTRAPPER_FEATURE_STATE* pRequestedState,
238 __inout BOOL* pfCancel
239 ) = 0;
240
241 // OnPlanMsiPackage - called when the engine plans an MSI or MSP package.
242 //
243 STDMETHOD(OnPlanMsiPackage)(
244 __in_z LPCWSTR wzPackageId,
245 __in BOOL fExecute, // false means rollback.
246 __in BOOTSTRAPPER_ACTION_STATE action,
247 __in BOOTSTRAPPER_MSI_FILE_VERSIONING recommendedFileVersioning,
248 __inout BOOL* pfCancel,
249 __inout BURN_MSI_PROPERTY* pActionMsiProperty,
250 __inout INSTALLUILEVEL* pUiLevel,
251 __inout BOOL* pfDisableExternalUiHandler,
252 __inout BOOTSTRAPPER_MSI_FILE_VERSIONING* pFileVersioning
253 ) = 0;
254
255 // OnPlanPackageComplete - called after the engine has completed getting the BA's input
256 // for planning a package.
257 STDMETHOD(OnPlanPackageComplete)(
258 __in_z LPCWSTR wzPackageId,
259 __in HRESULT hrStatus,
260 __in BOOTSTRAPPER_REQUEST_STATE requested
261 ) = 0;
262
263 // OnPlannedCompatiblePackage - called after the engine has completed planning a compatible package.
264 STDMETHOD(OnPlannedCompatiblePackage)(
265 __in_z LPCWSTR wzPackageId,
266 __in_z LPCWSTR wzCompatiblePackageId,
267 __in BOOL fRemove
268 ) = 0;
269
270 // OnPlannedPackage - called after the engine has completed planning a package.
271 STDMETHOD(OnPlannedPackage)(
272 __in_z LPCWSTR wzPackageId,
273 __in BOOTSTRAPPER_ACTION_STATE execute,
274 __in BOOTSTRAPPER_ACTION_STATE rollback,
275 __in BOOL fPlannedCache,
276 __in BOOL fPlannedUncache
277 ) = 0;
278
279 // OnPlanComplete - called when the engine completes planning.
280 //
281 STDMETHOD(OnPlanComplete)(
282 __in HRESULT hrStatus
283 ) = 0;
284
285 // OnApplyBegin - called when the engine begins applying the plan.
286 //
287 STDMETHOD(OnApplyBegin)(
288 __in DWORD dwPhaseCount,
289 __inout BOOL* pfCancel
290 ) = 0;
291
292 // OnElevateBegin - called before the engine displays an elevation prompt.
293 // Will only happen once per execution of the engine,
294 // assuming the elevation was successful.
295 STDMETHOD(OnElevateBegin)(
296 __inout BOOL* pfCancel
297 ) = 0;
298
299 // OnElevateComplete - called after the engine attempted to elevate.
300 //
301 STDMETHOD(OnElevateComplete)(
302 __in HRESULT hrStatus
303 ) = 0;
304
305 // OnProgress - called when the engine makes progress.
306 //
307 STDMETHOD(OnProgress)(
308 __in DWORD dwProgressPercentage,
309 __in DWORD dwOverallPercentage,
310 __inout BOOL* pfCancel
311 ) = 0;
312
313 // OnError - called when the engine encounters an error.
314 //
315 // nResult:
316 // uiFlags is a combination of valid ID* return values appropriate for
317 // the error.
318 //
319 // IDNOACTION instructs the engine to pass the error through to default
320 // handling which usually results in the apply failing.
321 STDMETHOD(OnError)(
322 __in BOOTSTRAPPER_ERROR_TYPE errorType,
323 __in_z_opt LPCWSTR wzPackageId,
324 __in DWORD dwCode,
325 __in_z_opt LPCWSTR wzError,
326 __in DWORD dwUIHint,
327 __in DWORD cData,
328 __in_ecount_z_opt(cData) LPCWSTR* rgwzData,
329 __in int nRecommendation,
330 __inout int* pResult
331 ) = 0;
332
333 // OnRegisterBegin - called when the engine registers the bundle.
334 //
335 STDMETHOD(OnRegisterBegin)(
336 __in BOOTSTRAPPER_REGISTRATION_TYPE recommendedRegistrationType,
337 __inout BOOL* pfCancel,
338 __inout BOOTSTRAPPER_REGISTRATION_TYPE* pRegistrationType
339 ) = 0;
340
341 // OnRegisterComplete - called when the engine registration is
342 // complete.
343 //
344 STDMETHOD(OnRegisterComplete)(
345 __in HRESULT hrStatus
346 ) = 0;
347
348 // OnCacheBegin - called when the engine begins caching.
349 //
350 STDMETHOD(OnCacheBegin)(
351 __inout BOOL* pfCancel
352 ) = 0;
353
354 // OnCachePackageBegin - called when the engine begins caching
355 // a package.
356 //
357 STDMETHOD(OnCachePackageBegin)(
358 __in_z LPCWSTR wzPackageId,
359 __in DWORD cCachePayloads,
360 __in DWORD64 dw64PackageCacheSize,
361 __in BOOL fVital,
362 __inout BOOL* pfCancel
363 ) = 0;
364
365 // OnCacheAcquireBegin - called when the engine begins acquiring a payload or container.
366 //
367 // Notes:
368 // It is expected the BA may call IBootstrapperEngine::SetLocalSource() or IBootstrapperEngine::SetDownloadSource()
369 // to update the source location before returning.
370 //
371 STDMETHOD(OnCacheAcquireBegin)(
372 __in_z_opt LPCWSTR wzPackageOrContainerId,
373 __in_z_opt LPCWSTR wzPayloadId,
374 __in_z LPCWSTR wzSource,
375 __in_z_opt LPCWSTR wzDownloadUrl,
376 __in_z_opt LPCWSTR wzPayloadContainerId,
377 __in BOOTSTRAPPER_CACHE_OPERATION recommendation,
378 __inout BOOTSTRAPPER_CACHE_OPERATION* pAction,
379 __inout BOOL* pfCancel
380 ) = 0;
381
382 // OnCacheAcquireProgress - called when the engine makes progress acquiring the payload or container.
383 //
384 STDMETHOD(OnCacheAcquireProgress)(
385 __in_z_opt LPCWSTR wzPackageOrContainerId,
386 __in_z_opt LPCWSTR wzPayloadId,
387 __in DWORD64 dw64Progress,
388 __in DWORD64 dw64Total,
389 __in DWORD dwOverallPercentage,
390 __inout BOOL* pfCancel
391 ) = 0;
392
393 // OnCacheAcquireResolving - called to allow the BA to override the acquisition action for the payload or container.
394 //
395 // Parameters:
396 // wzPackageOrContainerId will be NULL when resolving a layout-only payload.
397 // wzPayloadId will be NULL when resolving a container.
398 // wzDownloadUrl will be NULL if the container or payload does not provide a DownloadURL.
399 // wzPayloadContainerId will not be NULL if acquiring a payload that is in a container.
400 //
401 // rgSearchPaths are the search paths used for source resolution.
402 // fFoundLocal is TRUE when dwRecommendedSearchPath indicates that the file was found.
403 // dwRecommendedSearchPath is the index into rgSearchPaths for the recommended local file.
404 //
405 STDMETHOD(OnCacheAcquireResolving)(
406 __in_z_opt LPCWSTR wzPackageOrContainerId,
407 __in_z_opt LPCWSTR wzPayloadId,
408 __in_z LPCWSTR* rgSearchPaths,
409 __in DWORD cSearchPaths,
410 __in BOOL fFoundLocal,
411 __in DWORD dwRecommendedSearchPath,
412 __in_z_opt LPCWSTR wzDownloadUrl,
413 __in_z_opt LPCWSTR wzPayloadContainerId,
414 __in BOOTSTRAPPER_CACHE_RESOLVE_OPERATION recommendation,
415 __inout DWORD* pdwChosenSearchPath,
416 __inout BOOTSTRAPPER_CACHE_RESOLVE_OPERATION* pAction,
417 __inout BOOL* pfCancel
418 ) = 0;
419
420 // OnCacheAcquireComplete - called after the engine acquired the payload or container.
421 //
422 // Notes:
423 // It is expected the BA may call IBootstrapperEngine::SetLocalSource() or IBootstrapperEngine::SetDownloadSource()
424 // to update the source location before returning BOOTSTRAPPER_CACHEACQUIRECOMPLETE_ACTION_RETRY.
425 //
426 STDMETHOD(OnCacheAcquireComplete)(
427 __in_z_opt LPCWSTR wzPackageOrContainerId,
428 __in_z_opt LPCWSTR wzPayloadId,
429 __in HRESULT hrStatus,
430 __in BOOTSTRAPPER_CACHEACQUIRECOMPLETE_ACTION recommendation,
431 __inout BOOTSTRAPPER_CACHEACQUIRECOMPLETE_ACTION* pAction
432 ) = 0;
433
434 // OnCacheVerifyBegin - called when the engine begins to verify then copy
435 // a payload or container to the package cache folder.
436 //
437 STDMETHOD(OnCacheVerifyBegin)(
438 __in_z_opt LPCWSTR wzPackageOrContainerId,
439 __in_z_opt LPCWSTR wzPayloadId,
440 __inout BOOL* pfCancel
441 ) = 0;
442
443 STDMETHOD(OnCacheVerifyProgress)(
444 __in_z_opt LPCWSTR wzPackageOrContainerId,
445 __in_z_opt LPCWSTR wzPayloadId,
446 __in DWORD64 dw64Progress,
447 __in DWORD64 dw64Total,
448 __in DWORD dwOverallPercentage,
449 __in BOOTSTRAPPER_CACHE_VERIFY_STEP verifyStep,
450 __inout BOOL* pfCancel
451 ) = 0;
452
453 // OnCacheVerifyComplete - called after the engine verifies and copies
454 // a payload or container to the package cache folder.
455 //
456 STDMETHOD(OnCacheVerifyComplete)(
457 __in_z_opt LPCWSTR wzPackageOrContainerId,
458 __in_z_opt LPCWSTR wzPayloadId,
459 __in HRESULT hrStatus,
460 __in BOOTSTRAPPER_CACHEVERIFYCOMPLETE_ACTION recommendation,
461 __inout BOOTSTRAPPER_CACHEVERIFYCOMPLETE_ACTION* pAction
462 ) = 0;
463
464 // OnCachePackageComplete - called after the engine attempts to copy or download all
465 // payloads of a package into the package cache folder.
466 //
467 STDMETHOD(OnCachePackageComplete)(
468 __in_z LPCWSTR wzPackageId,
469 __in HRESULT hrStatus,
470 __in BOOTSTRAPPER_CACHEPACKAGECOMPLETE_ACTION recommendation,
471 __inout BOOTSTRAPPER_CACHEPACKAGECOMPLETE_ACTION* pAction
472 ) = 0;
473
474 // OnCacheComplete - called when the engine caching is complete.
475 //
476 STDMETHOD(OnCacheComplete)(
477 __in HRESULT hrStatus
478 ) = 0;
479
480 // OnExecuteBegin - called when the engine begins executing the plan.
481 //
482 STDMETHOD(OnExecuteBegin)(
483 __in DWORD cExecutingPackages,
484 __inout BOOL* pfCancel
485 ) = 0;
486
487 // OnExecutePackageBegin - called when the engine begins executing a package.
488 //
489 STDMETHOD(OnExecutePackageBegin)(
490 __in_z LPCWSTR wzPackageId,
491 __in BOOL fExecute, // false means rollback.
492 __in BOOTSTRAPPER_ACTION_STATE action,
493 __in INSTALLUILEVEL uiLevel,
494 __in BOOL fDisableExternalUiHandler,
495 __inout BOOL* pfCancel
496 ) = 0;
497
498 // OnExecutePatchTarget - called for each patch in an MspPackage targeting the product
499 // when the engine begins executing the MspPackage.
500 //
501 STDMETHOD(OnExecutePatchTarget)(
502 __in_z LPCWSTR wzPackageId,
503 __in_z LPCWSTR wzTargetProductCode,
504 __inout BOOL* pfCancel
505 ) = 0;
506
507 // OnExecuteProgress - called when the engine makes progress executing a package.
508 //
509 STDMETHOD(OnExecuteProgress)(
510 __in_z LPCWSTR wzPackageId,
511 __in DWORD dwProgressPercentage,
512 __in DWORD dwOverallPercentage,
513 __inout BOOL* pfCancel
514 ) = 0;
515
516 // OnExecuteMsiMessage - called when the engine receives an MSI package message.
517 //
518 // Return:
519 // uiFlags is a combination of valid ID* return values appropriate for
520 // the message.
521 //
522 // IDNOACTION instructs the engine to pass the message through to default
523 // handling which usually results in the execution continuing.
524 STDMETHOD(OnExecuteMsiMessage)(
525 __in_z LPCWSTR wzPackageId,
526 __in INSTALLMESSAGE messageType,
527 __in DWORD dwUIHint,
528 __in_z LPCWSTR wzMessage,
529 __in DWORD cData,
530 __in_ecount_z_opt(cData) LPCWSTR* rgwzData,
531 __in int nRecommendation,
532 __inout int* pResult
533 ) = 0;
534
535 // OnExecuteFilesInUse - called when the engine receives a files in use message
536 // while executing a package.
537 //
538 // Return value depends on the source:
539 // BOOTSTRAPPER_FILES_IN_USE_TYPE_MSI: https://docs.microsoft.com/en-us/windows/win32/msi/installvalidate-action
540 // BOOTSTRAPPER_FILES_IN_USE_TYPE_MSI_RM: https://docs.microsoft.com/en-us/windows/win32/msi/using-restart-manager-with-an-external-ui-
541 // BOOTSTRAPPER_FILES_IN_USE_TYPE_NETFX: https://docs.microsoft.com/en-us/dotnet/framework/deployment/how-to-get-progress-from-the-dotnet-installer
542 STDMETHOD(OnExecuteFilesInUse)(
543 __in_z LPCWSTR wzPackageId,
544 __in DWORD cFiles,
545 __in_ecount_z(cFiles) LPCWSTR* rgwzFiles,
546 __in int nRecommendation,
547 __in BOOTSTRAPPER_FILES_IN_USE_TYPE source,
548 __inout int* pResult
549 ) = 0;
550
551 // OnExecutePackageComplete - called when a package execution is complete.
552 //
553 STDMETHOD(OnExecutePackageComplete)(
554 __in_z LPCWSTR wzPackageId,
555 __in HRESULT hrStatus,
556 __in BOOTSTRAPPER_APPLY_RESTART restart,
557 __in BOOTSTRAPPER_EXECUTEPACKAGECOMPLETE_ACTION recommendation,
558 __inout BOOTSTRAPPER_EXECUTEPACKAGECOMPLETE_ACTION* pAction
559 ) = 0;
560
561 // OnExecuteComplete - called when the engine execution is complete.
562 //
563 STDMETHOD(OnExecuteComplete)(
564 __in HRESULT hrStatus
565 ) = 0;
566
567 // OnUnregisterBegin - called when the engine unregisters the bundle.
568 //
569 STDMETHOD(OnUnregisterBegin)(
570 __in BOOTSTRAPPER_REGISTRATION_TYPE recommendedRegistrationType,
571 __inout BOOTSTRAPPER_REGISTRATION_TYPE* pRegistrationType
572 ) = 0;
573
574 // OnUnregisterComplete - called when the engine unregistration is complete.
575 //
576 STDMETHOD(OnUnregisterComplete)(
577 __in HRESULT hrStatus
578 ) = 0;
579
580 // OnApplyComplete - called after the plan has been applied.
581 //
582 STDMETHOD(OnApplyComplete)(
583 __in HRESULT hrStatus,
584 __in BOOTSTRAPPER_APPLY_RESTART restart,
585 __in BOOTSTRAPPER_APPLYCOMPLETE_ACTION recommendation,
586 __inout BOOTSTRAPPER_APPLYCOMPLETE_ACTION* pAction
587 ) = 0;
588
589 // OnLaunchApprovedExeBegin - called before trying to launch the preapproved executable.
590 //
591 STDMETHOD(OnLaunchApprovedExeBegin)(
592 __inout BOOL* pfCancel
593 ) = 0;
594
595 // OnLaunchApprovedExeComplete - called after trying to launch the preapproved executable.
596 //
597 STDMETHOD(OnLaunchApprovedExeComplete)(
598 __in HRESULT hrStatus,
599 __in DWORD dwProcessId
600 ) = 0;
601
602 STDMETHOD(OnBeginMsiTransactionBegin)(
603 __in_z LPCWSTR wzTransactionId,
604 __inout BOOL* pfCancel
605 ) = 0;
606
607 STDMETHOD(OnBeginMsiTransactionComplete)(
608 __in_z LPCWSTR wzTransactionId,
609 __in HRESULT hrStatus
610 ) = 0;
611
612 STDMETHOD(OnCommitMsiTransactionBegin)(
613 __in_z LPCWSTR wzTransactionId,
614 __inout BOOL* pfCancel
615 ) = 0;
616
617 STDMETHOD(OnCommitMsiTransactionComplete)(
618 __in_z LPCWSTR wzTransactionId,
619 __in HRESULT hrStatus,
620 __in BOOTSTRAPPER_APPLY_RESTART restart,
621 __in BOOTSTRAPPER_EXECUTEMSITRANSACTIONCOMPLETE_ACTION recommendation,
622 __inout BOOTSTRAPPER_EXECUTEMSITRANSACTIONCOMPLETE_ACTION* pAction
623 ) = 0;
624
625 STDMETHOD(OnRollbackMsiTransactionBegin)(
626 __in_z LPCWSTR wzTransactionId
627 ) = 0;
628
629 STDMETHOD(OnRollbackMsiTransactionComplete)(
630 __in_z LPCWSTR wzTransactionId,
631 __in HRESULT hrStatus,
632 __in BOOTSTRAPPER_APPLY_RESTART restart,
633 __in BOOTSTRAPPER_EXECUTEMSITRANSACTIONCOMPLETE_ACTION recommendation,
634 __inout BOOTSTRAPPER_EXECUTEMSITRANSACTIONCOMPLETE_ACTION* pAction
635 ) = 0;
636
637 STDMETHOD(OnPauseAutomaticUpdatesBegin)(
638 ) = 0;
639
640 STDMETHOD(OnPauseAutomaticUpdatesComplete)(
641 __in HRESULT hrStatus
642 ) = 0;
643
644 STDMETHOD(OnSystemRestorePointBegin)(
645 ) = 0;
646
647 STDMETHOD(OnSystemRestorePointComplete)(
648 __in HRESULT hrStatus
649 ) = 0;
650
651 STDMETHOD(OnPlanForwardCompatibleBundle)(
652 __in_z LPCWSTR wzBundleId,
653 __in BOOTSTRAPPER_RELATION_TYPE relationType,
654 __in_z LPCWSTR wzBundleTag,
655 __in BOOL fPerMachine,
656 __in_z LPCWSTR wzVersion,
657 __in BOOL fRecommendedIgnoreBundle,
658 __inout BOOL* pfCancel,
659 __inout BOOL* pfIgnoreBundle
660 ) = 0;
661
662 STDMETHOD(OnCacheContainerOrPayloadVerifyBegin)(
663 __in_z_opt LPCWSTR wzPackageOrContainerId,
664 __in_z_opt LPCWSTR wzPayloadId,
665 __inout BOOL* pfCancel
666 ) = 0;
667
668 STDMETHOD(OnCacheContainerOrPayloadVerifyProgress)(
669 __in_z_opt LPCWSTR wzPackageOrContainerId,
670 __in_z_opt LPCWSTR wzPayloadId,
671 __in DWORD64 dw64Progress,
672 __in DWORD64 dw64Total,
673 __in DWORD dwOverallPercentage,
674 __inout BOOL* pfCancel
675 ) = 0;
676
677 STDMETHOD(OnCacheContainerOrPayloadVerifyComplete)(
678 __in_z_opt LPCWSTR wzPackageOrContainerId,
679 __in_z_opt LPCWSTR wzPayloadId,
680 __in HRESULT hrStatus
681 ) = 0;
682
683 STDMETHOD(OnCachePayloadExtractBegin)(
684 __in_z_opt LPCWSTR wzContainerId,
685 __in_z_opt LPCWSTR wzPayloadId,
686 __inout BOOL* pfCancel
687 ) = 0;
688
689 STDMETHOD(OnCachePayloadExtractProgress)(
690 __in_z_opt LPCWSTR wzContainerId,
691 __in_z_opt LPCWSTR wzPayloadId,
692 __in DWORD64 dw64Progress,
693 __in DWORD64 dw64Total,
694 __in DWORD dwOverallPercentage,
695 __inout BOOL* pfCancel
696 ) = 0;
697
698 STDMETHOD(OnCachePayloadExtractComplete)(
699 __in_z_opt LPCWSTR wzContainerId,
700 __in_z_opt LPCWSTR wzPayloadId,
701 __in HRESULT hrStatus
702 ) = 0;
703
704 // OnPlanRestoreRelatedBundle - called when the engine begins planning an upgrade related bundle for restoring in case of failure.
705 STDMETHOD(OnPlanRestoreRelatedBundle)(
706 __in_z LPCWSTR wzBundleId,
707 __in BOOTSTRAPPER_REQUEST_STATE recommendedState,
708 __inout BOOTSTRAPPER_REQUEST_STATE* pRequestedState,
709 __inout BOOL* pfCancel
710 ) = 0;
711
712 // OnPlanRelatedBundleType - called when the engine begins planning the related bundle relation type.
713 STDMETHOD(OnPlanRelatedBundleType)(
714 __in_z LPCWSTR wzBundleId,
715 __in BOOTSTRAPPER_RELATED_BUNDLE_PLAN_TYPE recommendedType,
716 __inout BOOTSTRAPPER_RELATED_BUNDLE_PLAN_TYPE* pRequestedType,
717 __inout BOOL* pfCancel
718 ) = 0;
719
720 // OnApplyDowngrade - called when the plan determined that nothing should happen to prevent downgrading.
721 //
722 STDMETHOD(OnApplyDowngrade)(
723 __in HRESULT hrRecommended,
724 __inout HRESULT* phrStatus
725 ) = 0;
726
727 // OnExecuteProcessCancel - called when a package that spawned a process is cancelled.
728 //
729 STDMETHOD(OnExecuteProcessCancel)(
730 __in_z LPCWSTR wzPackageId,
731 __in DWORD dwProcessId,
732 __in BOOTSTRAPPER_EXECUTEPROCESSCANCEL_ACTION recommendation,
733 __inout BOOTSTRAPPER_EXECUTEPROCESSCANCEL_ACTION* pAction
734 ) = 0;
735
736 // OnDetectRelatedBundlePackage - called when the engine detects a related bundle for a BundlePackage.
737 STDMETHOD(OnDetectRelatedBundlePackage)(
738 __in_z LPCWSTR wzPackageId,
739 __in_z LPCWSTR wzBundleId,
740 __in BOOTSTRAPPER_RELATION_TYPE relationType,
741 __in BOOL fPerMachine,
742 __in_z LPCWSTR wzVersion,
743 __inout BOOL* pfCancel
744 ) = 0;
745
746 // OnCachePackageNonVitalValidationFailure - called when the engine failed validating a package in the package cache that is non-vital to execution.
747 STDMETHOD(OnCachePackageNonVitalValidationFailure)(
748 __in_z LPCWSTR wzPackageId,
749 __in HRESULT hrStatus,
750 __in BOOTSTRAPPER_CACHEPACKAGENONVITALVALIDATIONFAILURE_ACTION recommendation,
751 __inout BOOTSTRAPPER_CACHEPACKAGENONVITALVALIDATIONFAILURE_ACTION* pAction
752 ) = 0;
753 };