main
h 114 lines 2.58 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
5 #ifdef __cplusplus
6 extern "C" {
7 #endif
8
9
10 enum GENERIC_EXECUTE_MESSAGE_TYPE
11 {
12 GENERIC_EXECUTE_MESSAGE_NONE,
13 GENERIC_EXECUTE_MESSAGE_ERROR,
14 GENERIC_EXECUTE_MESSAGE_PROGRESS,
15 GENERIC_EXECUTE_MESSAGE_NETFX_FILES_IN_USE,
16 GENERIC_EXECUTE_MESSAGE_PROCESS_CANCEL,
17 GENERIC_EXECUTE_MESSAGE_PROCESS_STARTED,
18 GENERIC_EXECUTE_MESSAGE_PROCESS_COMPLETED,
19 };
20
21 typedef struct _APPLY_AUTHENTICATION_REQUIRED_DATA
22 {
23 BURN_USER_EXPERIENCE* pUX;
24 LPCWSTR wzPackageOrContainerId;
25 LPCWSTR wzPayloadId;
26 } APPLY_AUTHENTICATION_REQUIRED_DATA;
27
28 typedef struct _GENERIC_EXECUTE_MESSAGE
29 {
30 GENERIC_EXECUTE_MESSAGE_TYPE type;
31 DWORD dwUIHint;
32
33 union
34 {
35 struct
36 {
37 DWORD dwErrorCode;
38 LPCWSTR wzMessage;
39 } error;
40 struct
41 {
42 DWORD dwPercentage;
43 } progress;
44 struct
45 {
46 DWORD cFiles;
47 LPCWSTR* rgwzFiles;
48 } filesInUse;
49 struct
50 {
51 DWORD dwProcessId;
52 } processCancel;
53 };
54 } GENERIC_EXECUTE_MESSAGE;
55
56
57 typedef int (*PFN_GENERICMESSAGEHANDLER)(
58 __in GENERIC_EXECUTE_MESSAGE* pMessage,
59 __in LPVOID pvContext
60 );
61
62
63 void ApplyInitialize();
64 void ApplyUninitialize();
65 HRESULT ApplySetVariables(
66 __in BURN_VARIABLES* pVariables
67 );
68 void ApplyReset(
69 __in BURN_USER_EXPERIENCE* pUX,
70 __in BURN_PACKAGES* pPackages
71 );
72 HRESULT ApplyLock(
73 __in BOOL fPerMachine,
74 __out HANDLE* phLock
75 );
76 HRESULT ApplyRegister(
77 __in BURN_ENGINE_STATE* pEngineState
78 );
79 HRESULT ApplyUnregister(
80 __in BURN_ENGINE_STATE* pEngineState,
81 __in BOOL fFailed,
82 __in BOOL fSuspend,
83 __in BOOTSTRAPPER_APPLY_RESTART restart
84 );
85 HRESULT ApplyCache(
86 __in HANDLE hSourceEngineFile,
87 __in BURN_USER_EXPERIENCE* pUX,
88 __in BURN_VARIABLES* pVariables,
89 __in BURN_PLAN* pPlan,
90 __in HANDLE hPipe,
91 __in BURN_APPLY_CONTEXT* pContext
92 );
93 void ApplyCacheRollback(
94 __in BURN_USER_EXPERIENCE* pUX,
95 __in BURN_PLAN* pPlan,
96 __in HANDLE hPipe,
97 __in BURN_APPLY_CONTEXT* pContext
98 );
99 HRESULT ApplyExecute(
100 __in BURN_ENGINE_STATE* pEngineState,
101 __in BURN_APPLY_CONTEXT* pApplyContext,
102 __out BOOL* pfSuspend,
103 __out BOOTSTRAPPER_APPLY_RESTART* pRestart
104 );
105 void ApplyClean(
106 __in BURN_USER_EXPERIENCE* pUX,
107 __in BURN_PLAN* pPlan,
108 __in HANDLE hPipe
109 );
110
111
112 #ifdef __cplusplus
113 }
114 #endif