diff options
author | Sean Hall <r.sean.hall@gmail.com> | 2019-12-21 11:23:03 +1100 |
---|---|---|
committer | Sean Hall <r.sean.hall@gmail.com> | 2019-12-22 13:19:29 +1000 |
commit | f3c383c2412e376353d64a8b744184fa1cee1c6e (patch) | |
tree | 4e092e2ce0e968e84df0e9c2ce41c13d4715bf4f /src | |
parent | 46d46435592ba779d6c8d017859c27d90b092aa6 (diff) | |
download | wix-f3c383c2412e376353d64a8b744184fa1cee1c6e.tar.gz wix-f3c383c2412e376353d64a8b744184fa1cee1c6e.tar.bz2 wix-f3c383c2412e376353d64a8b744184fa1cee1c6e.zip |
Move IBootstrapperApplication and IBootstrapperEngine into balutil.
Diffstat (limited to 'src')
-rw-r--r-- | src/WixToolset.Mba.Core/BaseBootstrapperApplicationFactory.cs | 2 | ||||
-rw-r--r-- | src/WixToolset.Mba.Core/BootstrapperApplication.cs | 5 | ||||
-rw-r--r-- | src/WixToolset.Mba.Core/BootstrapperApplicationFactory.cs | 1 | ||||
-rw-r--r-- | src/WixToolset.Mba.Core/BootstrapperCommand.cs | 1 | ||||
-rw-r--r-- | src/WixToolset.Mba.Core/Engine.cs | 1 | ||||
-rw-r--r-- | src/WixToolset.Mba.Core/EventArgs.cs | 1 | ||||
-rw-r--r-- | src/WixToolset.Mba.Core/IBootstrapperApplication.cs | 834 | ||||
-rw-r--r-- | src/WixToolset.Mba.Core/IBootstrapperApplicationFactory.cs | 1 | ||||
-rw-r--r-- | src/WixToolset.Mba.Core/IBootstrapperCommand.cs | 1 | ||||
-rw-r--r-- | src/WixToolset.Mba.Core/IBootstrapperEngine.cs | 279 | ||||
-rw-r--r-- | src/WixToolset.Mba.Core/IDefaultBootstrapperApplication.cs | 1 | ||||
-rw-r--r-- | src/WixToolset.Mba.Core/IEngine.cs | 1 | ||||
-rw-r--r-- | src/WixToolset.Mba.Core/PackageInfo.cs | 1 | ||||
-rw-r--r-- | src/WixToolset.Mba.Core/WixToolset.Mba.Core.csproj | 5 | ||||
-rw-r--r-- | src/WixToolset.Mba.Core/packages.config | 1 | ||||
-rw-r--r-- | src/balutil/inc/IBootstrapperApplication.h | 525 | ||||
-rw-r--r-- | src/balutil/inc/IBootstrapperEngine.h | 128 |
17 files changed, 1770 insertions, 18 deletions
diff --git a/src/WixToolset.Mba.Core/BaseBootstrapperApplicationFactory.cs b/src/WixToolset.Mba.Core/BaseBootstrapperApplicationFactory.cs index 08d2c4d8..20151b71 100644 --- a/src/WixToolset.Mba.Core/BaseBootstrapperApplicationFactory.cs +++ b/src/WixToolset.Mba.Core/BaseBootstrapperApplicationFactory.cs | |||
@@ -2,8 +2,6 @@ | |||
2 | 2 | ||
3 | namespace WixToolset.Mba.Core | 3 | namespace WixToolset.Mba.Core |
4 | { | 4 | { |
5 | using WixToolset.BootstrapperCore; | ||
6 | |||
7 | public abstract class BaseBootstrapperApplicationFactory : IBootstrapperApplicationFactory | 5 | public abstract class BaseBootstrapperApplicationFactory : IBootstrapperApplicationFactory |
8 | { | 6 | { |
9 | public IBootstrapperApplication Create(IBootstrapperEngine pEngine, ref Command command) | 7 | public IBootstrapperApplication Create(IBootstrapperEngine pEngine, ref Command command) |
diff --git a/src/WixToolset.Mba.Core/BootstrapperApplication.cs b/src/WixToolset.Mba.Core/BootstrapperApplication.cs index 52667923..f8ac2a1e 100644 --- a/src/WixToolset.Mba.Core/BootstrapperApplication.cs +++ b/src/WixToolset.Mba.Core/BootstrapperApplication.cs | |||
@@ -5,7 +5,6 @@ namespace WixToolset.Mba.Core | |||
5 | using System; | 5 | using System; |
6 | using System.Runtime.InteropServices; | 6 | using System.Runtime.InteropServices; |
7 | using System.Threading; | 7 | using System.Threading; |
8 | using WixToolset.BootstrapperCore; | ||
9 | 8 | ||
10 | /// <summary> | 9 | /// <summary> |
11 | /// The default bootstrapper application. | 10 | /// The default bootstrapper application. |
@@ -1574,7 +1573,7 @@ namespace WixToolset.Mba.Core | |||
1574 | return args.HResult; | 1573 | return args.HResult; |
1575 | } | 1574 | } |
1576 | 1575 | ||
1577 | int IBootstrapperApplication.BAProc(BOOTSTRAPPER_APPLICATION_MESSAGE message, IntPtr pvArgs, IntPtr pvResults, IntPtr pvContext) | 1576 | int IBootstrapperApplication.BAProc(int message, IntPtr pvArgs, IntPtr pvResults, IntPtr pvContext) |
1578 | { | 1577 | { |
1579 | switch (message) | 1578 | switch (message) |
1580 | { | 1579 | { |
@@ -1583,7 +1582,7 @@ namespace WixToolset.Mba.Core | |||
1583 | } | 1582 | } |
1584 | } | 1583 | } |
1585 | 1584 | ||
1586 | void IBootstrapperApplication.BAProcFallback(BOOTSTRAPPER_APPLICATION_MESSAGE message, IntPtr pvArgs, IntPtr pvResults, ref int phr, IntPtr pvContext) | 1585 | void IBootstrapperApplication.BAProcFallback(int message, IntPtr pvArgs, IntPtr pvResults, ref int phr, IntPtr pvContext) |
1587 | { | 1586 | { |
1588 | } | 1587 | } |
1589 | 1588 | ||
diff --git a/src/WixToolset.Mba.Core/BootstrapperApplicationFactory.cs b/src/WixToolset.Mba.Core/BootstrapperApplicationFactory.cs index de12ca17..968c6336 100644 --- a/src/WixToolset.Mba.Core/BootstrapperApplicationFactory.cs +++ b/src/WixToolset.Mba.Core/BootstrapperApplicationFactory.cs | |||
@@ -6,7 +6,6 @@ namespace WixToolset.Mba.Core | |||
6 | using System.Configuration; | 6 | using System.Configuration; |
7 | using System.Reflection; | 7 | using System.Reflection; |
8 | using System.Runtime.InteropServices; | 8 | using System.Runtime.InteropServices; |
9 | using WixToolset.BootstrapperCore; | ||
10 | 9 | ||
11 | /// <summary> | 10 | /// <summary> |
12 | /// Entry point for the MBA host to create and return the IBootstrapperApplication implementation to the engine. | 11 | /// Entry point for the MBA host to create and return the IBootstrapperApplication implementation to the engine. |
diff --git a/src/WixToolset.Mba.Core/BootstrapperCommand.cs b/src/WixToolset.Mba.Core/BootstrapperCommand.cs index 1ca64924..6854e9ae 100644 --- a/src/WixToolset.Mba.Core/BootstrapperCommand.cs +++ b/src/WixToolset.Mba.Core/BootstrapperCommand.cs | |||
@@ -5,7 +5,6 @@ namespace WixToolset.Mba.Core | |||
5 | using System; | 5 | using System; |
6 | using System.ComponentModel; | 6 | using System.ComponentModel; |
7 | using System.Runtime.InteropServices; | 7 | using System.Runtime.InteropServices; |
8 | using WixToolset.BootstrapperCore; | ||
9 | 8 | ||
10 | public sealed class BootstrapperCommand : IBootstrapperCommand | 9 | public sealed class BootstrapperCommand : IBootstrapperCommand |
11 | { | 10 | { |
diff --git a/src/WixToolset.Mba.Core/Engine.cs b/src/WixToolset.Mba.Core/Engine.cs index 2e094bb9..f2cc3947 100644 --- a/src/WixToolset.Mba.Core/Engine.cs +++ b/src/WixToolset.Mba.Core/Engine.cs | |||
@@ -7,7 +7,6 @@ namespace WixToolset.Mba.Core | |||
7 | using System.Runtime.InteropServices; | 7 | using System.Runtime.InteropServices; |
8 | using System.Security; | 8 | using System.Security; |
9 | using System.Text; | 9 | using System.Text; |
10 | using WixToolset.BootstrapperCore; | ||
11 | 10 | ||
12 | /// <summary> | 11 | /// <summary> |
13 | /// Container class for the <see cref="IBootstrapperEngine"/> interface. | 12 | /// Container class for the <see cref="IBootstrapperEngine"/> interface. |
diff --git a/src/WixToolset.Mba.Core/EventArgs.cs b/src/WixToolset.Mba.Core/EventArgs.cs index 26a3b573..83c0c96a 100644 --- a/src/WixToolset.Mba.Core/EventArgs.cs +++ b/src/WixToolset.Mba.Core/EventArgs.cs | |||
@@ -5,7 +5,6 @@ namespace WixToolset.Mba.Core | |||
5 | using System; | 5 | using System; |
6 | using System.Collections.Generic; | 6 | using System.Collections.Generic; |
7 | using System.Collections.ObjectModel; | 7 | using System.Collections.ObjectModel; |
8 | using WixToolset.BootstrapperCore; | ||
9 | 8 | ||
10 | /// <summary> | 9 | /// <summary> |
11 | /// Base class for BA <see cref="EventArgs"/> classes. | 10 | /// Base class for BA <see cref="EventArgs"/> classes. |
diff --git a/src/WixToolset.Mba.Core/IBootstrapperApplication.cs b/src/WixToolset.Mba.Core/IBootstrapperApplication.cs new file mode 100644 index 00000000..8e5d2aeb --- /dev/null +++ b/src/WixToolset.Mba.Core/IBootstrapperApplication.cs | |||
@@ -0,0 +1,834 @@ | |||
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 | namespace WixToolset.Mba.Core | ||
4 | { | ||
5 | using System; | ||
6 | using System.CodeDom.Compiler; | ||
7 | using System.Runtime.InteropServices; | ||
8 | |||
9 | /// <summary> | ||
10 | /// Allows customization of the bootstrapper application. | ||
11 | /// </summary> | ||
12 | [ComImport] | ||
13 | [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] | ||
14 | [Guid("53C31D56-49C0-426B-AB06-099D717C67FE")] | ||
15 | [GeneratedCodeAttribute("WixToolset.Bootstrapper.InteropCodeGenerator", "1.0.0.0")] | ||
16 | public interface IBootstrapperApplication | ||
17 | { | ||
18 | [PreserveSig] | ||
19 | [return: MarshalAs(UnmanagedType.I4)] | ||
20 | int OnStartup(); | ||
21 | |||
22 | [PreserveSig] | ||
23 | [return: MarshalAs(UnmanagedType.I4)] | ||
24 | int OnShutdown(ref BOOTSTRAPPER_SHUTDOWN_ACTION action); | ||
25 | |||
26 | [PreserveSig] | ||
27 | [return: MarshalAs(UnmanagedType.I4)] | ||
28 | int OnSystemShutdown( | ||
29 | [MarshalAs(UnmanagedType.U4)] EndSessionReasons dwEndSession, | ||
30 | [MarshalAs(UnmanagedType.Bool)] ref bool fCancel | ||
31 | ); | ||
32 | |||
33 | [PreserveSig] | ||
34 | [return: MarshalAs(UnmanagedType.I4)] | ||
35 | int OnDetectBegin( | ||
36 | [MarshalAs(UnmanagedType.Bool)] bool fInstalled, | ||
37 | [MarshalAs(UnmanagedType.U4)] int cPackages, | ||
38 | [MarshalAs(UnmanagedType.Bool)] ref bool fCancel | ||
39 | ); | ||
40 | |||
41 | [PreserveSig] | ||
42 | [return: MarshalAs(UnmanagedType.I4)] | ||
43 | int OnDetectForwardCompatibleBundle( | ||
44 | [MarshalAs(UnmanagedType.LPWStr)] string wzBundleId, | ||
45 | [MarshalAs(UnmanagedType.U4)] RelationType relationType, | ||
46 | [MarshalAs(UnmanagedType.LPWStr)] string wzBundleTag, | ||
47 | [MarshalAs(UnmanagedType.Bool)] bool fPerMachine, | ||
48 | [MarshalAs(UnmanagedType.U8)] long dw64Version, | ||
49 | [MarshalAs(UnmanagedType.Bool)] ref bool fCancel, | ||
50 | [MarshalAs(UnmanagedType.Bool)] ref bool fIgnoreBundle | ||
51 | ); | ||
52 | |||
53 | [PreserveSig] | ||
54 | [return: MarshalAs(UnmanagedType.I4)] | ||
55 | int OnDetectUpdateBegin( | ||
56 | [MarshalAs(UnmanagedType.LPWStr)] string wzUpdateLocation, | ||
57 | [MarshalAs(UnmanagedType.Bool)] ref bool fCancel, | ||
58 | [MarshalAs(UnmanagedType.Bool)] ref bool fSkip | ||
59 | ); | ||
60 | |||
61 | [PreserveSig] | ||
62 | [return: MarshalAs(UnmanagedType.I4)] | ||
63 | int OnDetectUpdate( | ||
64 | [MarshalAs(UnmanagedType.LPWStr)] string wzUpdateLocation, | ||
65 | [MarshalAs(UnmanagedType.U8)] long dw64Size, | ||
66 | [MarshalAs(UnmanagedType.U8)] long dw64Version, | ||
67 | [MarshalAs(UnmanagedType.LPWStr)] string wzTitle, | ||
68 | [MarshalAs(UnmanagedType.LPWStr)] string wzSummary, | ||
69 | [MarshalAs(UnmanagedType.LPWStr)] string wzContentType, | ||
70 | [MarshalAs(UnmanagedType.LPWStr)] string wzContent, | ||
71 | [MarshalAs(UnmanagedType.Bool)] ref bool fCancel, | ||
72 | [MarshalAs(UnmanagedType.Bool)] ref bool fStopProcessingUpdates | ||
73 | ); | ||
74 | |||
75 | [PreserveSig] | ||
76 | [return: MarshalAs(UnmanagedType.I4)] | ||
77 | int OnDetectUpdateComplete( | ||
78 | int hrStatus, | ||
79 | [MarshalAs(UnmanagedType.Bool)] ref bool fIgnoreError | ||
80 | ); | ||
81 | |||
82 | [PreserveSig] | ||
83 | [return: MarshalAs(UnmanagedType.I4)] | ||
84 | int OnDetectRelatedBundle( | ||
85 | [MarshalAs(UnmanagedType.LPWStr)] string wzBundleId, | ||
86 | [MarshalAs(UnmanagedType.U4)] RelationType relationType, | ||
87 | [MarshalAs(UnmanagedType.LPWStr)] string wzBundleTag, | ||
88 | [MarshalAs(UnmanagedType.Bool)] bool fPerMachine, | ||
89 | [MarshalAs(UnmanagedType.U8)] long dw64Version, | ||
90 | [MarshalAs(UnmanagedType.U4)] RelatedOperation operation, | ||
91 | [MarshalAs(UnmanagedType.Bool)] ref bool fCancel | ||
92 | ); | ||
93 | |||
94 | [PreserveSig] | ||
95 | [return: MarshalAs(UnmanagedType.I4)] | ||
96 | int OnDetectPackageBegin( | ||
97 | [MarshalAs(UnmanagedType.LPWStr)] string wzPackageId, | ||
98 | [MarshalAs(UnmanagedType.Bool)] ref bool fCancel | ||
99 | ); | ||
100 | |||
101 | [PreserveSig] | ||
102 | [return: MarshalAs(UnmanagedType.I4)] | ||
103 | int OnDetectCompatibleMsiPackage( | ||
104 | [MarshalAs(UnmanagedType.LPWStr)] string wzPackageId, | ||
105 | [MarshalAs(UnmanagedType.LPWStr)] string wzCompatiblePackageId, | ||
106 | [MarshalAs(UnmanagedType.U8)] long dw64CompatiblePackageVersion, | ||
107 | [MarshalAs(UnmanagedType.Bool)] ref bool fCancel | ||
108 | ); | ||
109 | |||
110 | [PreserveSig] | ||
111 | [return: MarshalAs(UnmanagedType.I4)] | ||
112 | int OnDetectRelatedMsiPackage( | ||
113 | [MarshalAs(UnmanagedType.LPWStr)] string wzPackageId, | ||
114 | [MarshalAs(UnmanagedType.LPWStr)] string wzUpgradeCode, | ||
115 | [MarshalAs(UnmanagedType.LPWStr)] string wzProductCode, | ||
116 | [MarshalAs(UnmanagedType.Bool)] bool fPerMachine, | ||
117 | [MarshalAs(UnmanagedType.U8)] long dw64Version, | ||
118 | [MarshalAs(UnmanagedType.U4)] RelatedOperation operation, | ||
119 | [MarshalAs(UnmanagedType.Bool)] ref bool fCancel | ||
120 | ); | ||
121 | |||
122 | [PreserveSig] | ||
123 | [return: MarshalAs(UnmanagedType.I4)] | ||
124 | int OnDetectTargetMsiPackage( | ||
125 | [MarshalAs(UnmanagedType.LPWStr)] string wzPackageId, | ||
126 | [MarshalAs(UnmanagedType.LPWStr)] string wzProductCode, | ||
127 | [MarshalAs(UnmanagedType.U4)] PackageState patchState, | ||
128 | [MarshalAs(UnmanagedType.Bool)] ref bool fCancel | ||
129 | ); | ||
130 | |||
131 | [PreserveSig] | ||
132 | [return: MarshalAs(UnmanagedType.I4)] | ||
133 | int OnDetectMsiFeature( | ||
134 | [MarshalAs(UnmanagedType.LPWStr)] string wzPackageId, | ||
135 | [MarshalAs(UnmanagedType.LPWStr)] string wzFeatureId, | ||
136 | [MarshalAs(UnmanagedType.U4)] FeatureState state, | ||
137 | [MarshalAs(UnmanagedType.Bool)] ref bool fCancel | ||
138 | ); | ||
139 | |||
140 | [PreserveSig] | ||
141 | [return: MarshalAs(UnmanagedType.I4)] | ||
142 | int OnDetectPackageComplete( | ||
143 | [MarshalAs(UnmanagedType.LPWStr)] string wzPackageId, | ||
144 | int hrStatus, | ||
145 | [MarshalAs(UnmanagedType.U4)] PackageState state | ||
146 | ); | ||
147 | |||
148 | [PreserveSig] | ||
149 | [return: MarshalAs(UnmanagedType.I4)] | ||
150 | int OnDetectComplete( | ||
151 | int hrStatus | ||
152 | ); | ||
153 | |||
154 | [PreserveSig] | ||
155 | [return: MarshalAs(UnmanagedType.I4)] | ||
156 | int OnPlanBegin( | ||
157 | [MarshalAs(UnmanagedType.U4)] int cPackages, | ||
158 | [MarshalAs(UnmanagedType.Bool)] ref bool fCancel | ||
159 | ); | ||
160 | |||
161 | [PreserveSig] | ||
162 | [return: MarshalAs(UnmanagedType.I4)] | ||
163 | int OnPlanRelatedBundle( | ||
164 | [MarshalAs(UnmanagedType.LPWStr)] string wzBundleId, | ||
165 | [MarshalAs(UnmanagedType.U4)] RequestState recommendedState, | ||
166 | [MarshalAs(UnmanagedType.U4)] ref RequestState pRequestedState, | ||
167 | [MarshalAs(UnmanagedType.Bool)] ref bool fCancel | ||
168 | ); | ||
169 | |||
170 | [PreserveSig] | ||
171 | [return: MarshalAs(UnmanagedType.I4)] | ||
172 | int OnPlanPackageBegin( | ||
173 | [MarshalAs(UnmanagedType.LPWStr)] string wzPackageId, | ||
174 | [MarshalAs(UnmanagedType.U4)] RequestState recommendedState, | ||
175 | [MarshalAs(UnmanagedType.U4)] ref RequestState pRequestedState, | ||
176 | [MarshalAs(UnmanagedType.Bool)] ref bool fCancel | ||
177 | ); | ||
178 | |||
179 | [PreserveSig] | ||
180 | [return: MarshalAs(UnmanagedType.I4)] | ||
181 | int OnPlanCompatibleMsiPackageBegin( | ||
182 | [MarshalAs(UnmanagedType.LPWStr)] string wzPackageId, | ||
183 | [MarshalAs(UnmanagedType.LPWStr)] string wzCompatiblePackageId, | ||
184 | [MarshalAs(UnmanagedType.U8)] long dw64CompatiblePackageVersion, | ||
185 | [MarshalAs(UnmanagedType.U4)] RequestState recommendedState, | ||
186 | [MarshalAs(UnmanagedType.U4)] ref RequestState pRequestedState, | ||
187 | [MarshalAs(UnmanagedType.Bool)] ref bool fCancel | ||
188 | ); | ||
189 | |||
190 | [PreserveSig] | ||
191 | [return: MarshalAs(UnmanagedType.I4)] | ||
192 | int OnPlanCompatibleMsiPackageComplete( | ||
193 | [MarshalAs(UnmanagedType.LPWStr)] string wzPackageId, | ||
194 | [MarshalAs(UnmanagedType.LPWStr)] string wzCompatiblePackageId, | ||
195 | int hrStatus, | ||
196 | [MarshalAs(UnmanagedType.U4)] PackageState state, | ||
197 | [MarshalAs(UnmanagedType.U4)] RequestState requested, | ||
198 | [MarshalAs(UnmanagedType.U4)] ActionState execute, | ||
199 | [MarshalAs(UnmanagedType.U4)] ActionState rollback | ||
200 | ); | ||
201 | |||
202 | [PreserveSig] | ||
203 | [return: MarshalAs(UnmanagedType.I4)] | ||
204 | int OnPlanTargetMsiPackage( | ||
205 | [MarshalAs(UnmanagedType.LPWStr)] string wzPackageId, | ||
206 | [MarshalAs(UnmanagedType.LPWStr)] string wzProductCode, | ||
207 | [MarshalAs(UnmanagedType.U4)] RequestState recommendedState, | ||
208 | [MarshalAs(UnmanagedType.U4)] ref RequestState pRequestedState, | ||
209 | [MarshalAs(UnmanagedType.Bool)] ref bool fCancel | ||
210 | ); | ||
211 | |||
212 | [PreserveSig] | ||
213 | [return: MarshalAs(UnmanagedType.I4)] | ||
214 | int OnPlanMsiFeature( | ||
215 | [MarshalAs(UnmanagedType.LPWStr)] string wzPackageId, | ||
216 | [MarshalAs(UnmanagedType.LPWStr)] string wzFeatureId, | ||
217 | [MarshalAs(UnmanagedType.U4)] FeatureState recommendedState, | ||
218 | [MarshalAs(UnmanagedType.U4)] ref FeatureState pRequestedState, | ||
219 | [MarshalAs(UnmanagedType.Bool)] ref bool fCancel | ||
220 | ); | ||
221 | |||
222 | [PreserveSig] | ||
223 | [return: MarshalAs(UnmanagedType.I4)] | ||
224 | int OnPlanPackageComplete( | ||
225 | [MarshalAs(UnmanagedType.LPWStr)] string wzPackageId, | ||
226 | int hrStatus, | ||
227 | [MarshalAs(UnmanagedType.U4)] PackageState state, | ||
228 | [MarshalAs(UnmanagedType.U4)] RequestState requested, | ||
229 | [MarshalAs(UnmanagedType.U4)] ActionState execute, | ||
230 | [MarshalAs(UnmanagedType.U4)] ActionState rollback | ||
231 | ); | ||
232 | |||
233 | [PreserveSig] | ||
234 | [return: MarshalAs(UnmanagedType.I4)] | ||
235 | int OnPlanComplete( | ||
236 | int hrStatus | ||
237 | ); | ||
238 | |||
239 | [PreserveSig] | ||
240 | [return: MarshalAs(UnmanagedType.I4)] | ||
241 | int OnApplyBegin( | ||
242 | [MarshalAs(UnmanagedType.U4)] int dwPhaseCount, | ||
243 | [MarshalAs(UnmanagedType.Bool)] ref bool fCancel | ||
244 | ); | ||
245 | |||
246 | [PreserveSig] | ||
247 | [return: MarshalAs(UnmanagedType.I4)] | ||
248 | int OnElevateBegin( | ||
249 | [MarshalAs(UnmanagedType.Bool)] ref bool fCancel | ||
250 | ); | ||
251 | |||
252 | [PreserveSig] | ||
253 | [return: MarshalAs(UnmanagedType.I4)] | ||
254 | int OnElevateComplete( | ||
255 | int hrStatus | ||
256 | ); | ||
257 | |||
258 | [PreserveSig] | ||
259 | [return: MarshalAs(UnmanagedType.I4)] | ||
260 | int OnProgress( | ||
261 | [MarshalAs(UnmanagedType.U4)] int dwProgressPercentage, | ||
262 | [MarshalAs(UnmanagedType.U4)] int dwOverallPercentage, | ||
263 | [MarshalAs(UnmanagedType.Bool)] ref bool fCancel | ||
264 | ); | ||
265 | |||
266 | [PreserveSig] | ||
267 | [return: MarshalAs(UnmanagedType.I4)] | ||
268 | int OnError( | ||
269 | [MarshalAs(UnmanagedType.U4)] ErrorType errorType, | ||
270 | [MarshalAs(UnmanagedType.LPWStr)] string wzPackageId, | ||
271 | [MarshalAs(UnmanagedType.U4)] int dwCode, | ||
272 | [MarshalAs(UnmanagedType.LPWStr)] string wzError, | ||
273 | [MarshalAs(UnmanagedType.I4)] int dwUIHint, | ||
274 | [MarshalAs(UnmanagedType.U4)] int cData, | ||
275 | [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 5, ArraySubType = UnmanagedType.LPWStr), In] string[] rgwzData, | ||
276 | [MarshalAs(UnmanagedType.I4)] Result nRecommendation, | ||
277 | [MarshalAs(UnmanagedType.I4)] ref Result pResult | ||
278 | ); | ||
279 | |||
280 | [PreserveSig] | ||
281 | [return: MarshalAs(UnmanagedType.I4)] | ||
282 | int OnRegisterBegin( | ||
283 | [MarshalAs(UnmanagedType.Bool)] ref bool fCancel | ||
284 | ); | ||
285 | |||
286 | [PreserveSig] | ||
287 | [return: MarshalAs(UnmanagedType.I4)] | ||
288 | int OnRegisterComplete( | ||
289 | int hrStatus | ||
290 | ); | ||
291 | |||
292 | [PreserveSig] | ||
293 | [return: MarshalAs(UnmanagedType.I4)] | ||
294 | int OnCacheBegin( | ||
295 | [MarshalAs(UnmanagedType.Bool)] ref bool fCancel | ||
296 | ); | ||
297 | |||
298 | [PreserveSig] | ||
299 | [return: MarshalAs(UnmanagedType.I4)] | ||
300 | int OnCachePackageBegin( | ||
301 | [MarshalAs(UnmanagedType.LPWStr)] string wzPackageId, | ||
302 | [MarshalAs(UnmanagedType.U4)] int cCachePayloads, | ||
303 | [MarshalAs(UnmanagedType.U8)] long dw64PackageCacheSize, | ||
304 | [MarshalAs(UnmanagedType.Bool)] ref bool fCancel | ||
305 | ); | ||
306 | |||
307 | [PreserveSig] | ||
308 | [return: MarshalAs(UnmanagedType.I4)] | ||
309 | int OnCacheAcquireBegin( | ||
310 | [MarshalAs(UnmanagedType.LPWStr)] string wzPackageOrContainerId, | ||
311 | [MarshalAs(UnmanagedType.LPWStr)] string wzPayloadId, | ||
312 | [MarshalAs(UnmanagedType.U4)] CacheOperation operation, | ||
313 | [MarshalAs(UnmanagedType.LPWStr)] string wzSource, | ||
314 | [MarshalAs(UnmanagedType.Bool)] ref bool fCancel | ||
315 | ); | ||
316 | |||
317 | [PreserveSig] | ||
318 | [return: MarshalAs(UnmanagedType.I4)] | ||
319 | int OnCacheAcquireProgress( | ||
320 | [MarshalAs(UnmanagedType.LPWStr)] string wzPackageOrContainerId, | ||
321 | [MarshalAs(UnmanagedType.LPWStr)] string wzPayloadId, | ||
322 | [MarshalAs(UnmanagedType.U8)] long dw64Progress, | ||
323 | [MarshalAs(UnmanagedType.U8)] long dw64Total, | ||
324 | [MarshalAs(UnmanagedType.U4)] int dwOverallPercentage, | ||
325 | [MarshalAs(UnmanagedType.Bool)] ref bool fCancel | ||
326 | ); | ||
327 | |||
328 | [PreserveSig] | ||
329 | [return: MarshalAs(UnmanagedType.I4)] | ||
330 | int OnResolveSource( | ||
331 | [MarshalAs(UnmanagedType.LPWStr)] string wzPackageOrContainerId, | ||
332 | [MarshalAs(UnmanagedType.LPWStr)] string wzPayloadId, | ||
333 | [MarshalAs(UnmanagedType.LPWStr)] string wzLocalSource, | ||
334 | [MarshalAs(UnmanagedType.LPWStr)] string wzDownloadSource, | ||
335 | BOOTSTRAPPER_RESOLVESOURCE_ACTION recommendation, | ||
336 | ref BOOTSTRAPPER_RESOLVESOURCE_ACTION action, | ||
337 | [MarshalAs(UnmanagedType.Bool)] ref bool fCancel | ||
338 | ); | ||
339 | |||
340 | [PreserveSig] | ||
341 | [return: MarshalAs(UnmanagedType.I4)] | ||
342 | int OnCacheAcquireComplete( | ||
343 | [MarshalAs(UnmanagedType.LPWStr)] string wzPackageOrContainerId, | ||
344 | [MarshalAs(UnmanagedType.LPWStr)] string wzPayloadId, | ||
345 | int hrStatus, | ||
346 | BOOTSTRAPPER_CACHEACQUIRECOMPLETE_ACTION recommendation, | ||
347 | ref BOOTSTRAPPER_CACHEACQUIRECOMPLETE_ACTION pAction | ||
348 | ); | ||
349 | |||
350 | [PreserveSig] | ||
351 | [return: MarshalAs(UnmanagedType.I4)] | ||
352 | int OnCacheVerifyBegin( | ||
353 | [MarshalAs(UnmanagedType.LPWStr)] string wzPackageId, | ||
354 | [MarshalAs(UnmanagedType.LPWStr)] string wzPayloadId, | ||
355 | [MarshalAs(UnmanagedType.Bool)] ref bool fCancel | ||
356 | ); | ||
357 | |||
358 | [PreserveSig] | ||
359 | [return: MarshalAs(UnmanagedType.I4)] | ||
360 | int OnCacheVerifyComplete( | ||
361 | [MarshalAs(UnmanagedType.LPWStr)] string wzPackageId, | ||
362 | [MarshalAs(UnmanagedType.LPWStr)] string wzPayloadId, | ||
363 | int hrStatus, | ||
364 | BOOTSTRAPPER_CACHEVERIFYCOMPLETE_ACTION recommendation, | ||
365 | ref BOOTSTRAPPER_CACHEVERIFYCOMPLETE_ACTION action | ||
366 | ); | ||
367 | |||
368 | [PreserveSig] | ||
369 | [return: MarshalAs(UnmanagedType.I4)] | ||
370 | int OnCachePackageComplete( | ||
371 | [MarshalAs(UnmanagedType.LPWStr)] string wzPackageId, | ||
372 | int hrStatus, | ||
373 | BOOTSTRAPPER_CACHEPACKAGECOMPLETE_ACTION recommendation, | ||
374 | ref BOOTSTRAPPER_CACHEPACKAGECOMPLETE_ACTION action | ||
375 | ); | ||
376 | |||
377 | [PreserveSig] | ||
378 | [return: MarshalAs(UnmanagedType.I4)] | ||
379 | int OnCacheComplete( | ||
380 | int hrStatus | ||
381 | ); | ||
382 | |||
383 | [PreserveSig] | ||
384 | [return: MarshalAs(UnmanagedType.I4)] | ||
385 | int OnExecuteBegin( | ||
386 | [MarshalAs(UnmanagedType.U4)] int cExecutingPackages, | ||
387 | [MarshalAs(UnmanagedType.Bool)] ref bool fCancel | ||
388 | ); | ||
389 | |||
390 | [PreserveSig] | ||
391 | [return: MarshalAs(UnmanagedType.I4)] | ||
392 | int OnExecutePackageBegin( | ||
393 | [MarshalAs(UnmanagedType.LPWStr)] string wzPackageId, | ||
394 | [MarshalAs(UnmanagedType.Bool)] bool fExecute, | ||
395 | [MarshalAs(UnmanagedType.Bool)] ref bool fCancel | ||
396 | ); | ||
397 | |||
398 | [PreserveSig] | ||
399 | [return: MarshalAs(UnmanagedType.I4)] | ||
400 | int OnExecutePatchTarget( | ||
401 | [MarshalAs(UnmanagedType.LPWStr)] string wzPackageId, | ||
402 | [MarshalAs(UnmanagedType.LPWStr)] string wzTargetProductCode, | ||
403 | [MarshalAs(UnmanagedType.Bool)] ref bool fCancel | ||
404 | ); | ||
405 | |||
406 | [PreserveSig] | ||
407 | [return: MarshalAs(UnmanagedType.I4)] | ||
408 | int OnExecuteProgress( | ||
409 | [MarshalAs(UnmanagedType.LPWStr)] string wzPackageId, | ||
410 | [MarshalAs(UnmanagedType.U4)] int dwProgressPercentage, | ||
411 | [MarshalAs(UnmanagedType.U4)] int dwOverallPercentage, | ||
412 | [MarshalAs(UnmanagedType.Bool)] ref bool fCancel | ||
413 | ); | ||
414 | |||
415 | [PreserveSig] | ||
416 | [return: MarshalAs(UnmanagedType.I4)] | ||
417 | int OnExecuteMsiMessage( | ||
418 | [MarshalAs(UnmanagedType.LPWStr)] string wzPackageId, | ||
419 | [MarshalAs(UnmanagedType.U4)] InstallMessage messageType, | ||
420 | [MarshalAs(UnmanagedType.I4)] int dwUIHint, | ||
421 | [MarshalAs(UnmanagedType.LPWStr)] string wzMessage, | ||
422 | [MarshalAs(UnmanagedType.U4)] int cData, | ||
423 | [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 4, ArraySubType = UnmanagedType.LPWStr), In] string[] rgwzData, | ||
424 | [MarshalAs(UnmanagedType.I4)] Result nRecommendation, | ||
425 | [MarshalAs(UnmanagedType.I4)] ref Result pResult | ||
426 | ); | ||
427 | |||
428 | [PreserveSig] | ||
429 | [return: MarshalAs(UnmanagedType.I4)] | ||
430 | int OnExecuteFilesInUse( | ||
431 | [MarshalAs(UnmanagedType.LPWStr)] string wzPackageId, | ||
432 | [MarshalAs(UnmanagedType.U4)] int cFiles, | ||
433 | [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1, ArraySubType = UnmanagedType.LPWStr), In] string[] rgwzFiles, | ||
434 | [MarshalAs(UnmanagedType.I4)] Result nRecommendation, | ||
435 | [MarshalAs(UnmanagedType.I4)] ref Result pResult | ||
436 | ); | ||
437 | |||
438 | [PreserveSig] | ||
439 | [return: MarshalAs(UnmanagedType.I4)] | ||
440 | int OnExecutePackageComplete( | ||
441 | [MarshalAs(UnmanagedType.LPWStr)] string wzPackageId, | ||
442 | int hrStatus, | ||
443 | [MarshalAs(UnmanagedType.U4)] ApplyRestart restart, | ||
444 | [MarshalAs(UnmanagedType.I4)] BOOTSTRAPPER_EXECUTEPACKAGECOMPLETE_ACTION recommendation, | ||
445 | [MarshalAs(UnmanagedType.I4)] ref BOOTSTRAPPER_EXECUTEPACKAGECOMPLETE_ACTION pAction | ||
446 | ); | ||
447 | |||
448 | [PreserveSig] | ||
449 | [return: MarshalAs(UnmanagedType.I4)] | ||
450 | int OnExecuteComplete( | ||
451 | int hrStatus | ||
452 | ); | ||
453 | |||
454 | [PreserveSig] | ||
455 | [return: MarshalAs(UnmanagedType.I4)] | ||
456 | int OnUnregisterBegin( | ||
457 | [MarshalAs(UnmanagedType.Bool)] ref bool fCancel | ||
458 | ); | ||
459 | |||
460 | [PreserveSig] | ||
461 | [return: MarshalAs(UnmanagedType.I4)] | ||
462 | int OnUnregisterComplete( | ||
463 | int hrStatus | ||
464 | ); | ||
465 | |||
466 | [PreserveSig] | ||
467 | [return: MarshalAs(UnmanagedType.I4)] | ||
468 | int OnApplyComplete( | ||
469 | int hrStatus, | ||
470 | [MarshalAs(UnmanagedType.U4)] ApplyRestart restart, | ||
471 | [MarshalAs(UnmanagedType.I4)] BOOTSTRAPPER_APPLYCOMPLETE_ACTION recommendation, | ||
472 | [MarshalAs(UnmanagedType.I4)] ref BOOTSTRAPPER_APPLYCOMPLETE_ACTION pAction | ||
473 | ); | ||
474 | |||
475 | [PreserveSig] | ||
476 | [return: MarshalAs(UnmanagedType.I4)] | ||
477 | int OnLaunchApprovedExeBegin( | ||
478 | [MarshalAs(UnmanagedType.Bool)] ref bool fCancel | ||
479 | ); | ||
480 | |||
481 | [PreserveSig] | ||
482 | [return: MarshalAs(UnmanagedType.I4)] | ||
483 | int OnLaunchApprovedExeComplete( | ||
484 | int hrStatus, | ||
485 | int processId | ||
486 | ); | ||
487 | |||
488 | [PreserveSig] | ||
489 | [return: MarshalAs(UnmanagedType.I4)] | ||
490 | int BAProc( | ||
491 | int message, | ||
492 | IntPtr pvArgs, | ||
493 | IntPtr pvResults, | ||
494 | IntPtr pvContext | ||
495 | ); | ||
496 | |||
497 | void BAProcFallback( | ||
498 | int message, | ||
499 | IntPtr pvArgs, | ||
500 | IntPtr pvResults, | ||
501 | ref int phr, | ||
502 | IntPtr pvContext | ||
503 | ); | ||
504 | } | ||
505 | |||
506 | /// <summary> | ||
507 | /// The display level for the BA. | ||
508 | /// </summary> | ||
509 | public enum Display | ||
510 | { | ||
511 | Unknown, | ||
512 | Embedded, | ||
513 | None, | ||
514 | Passive, | ||
515 | Full, | ||
516 | } | ||
517 | |||
518 | /// <summary> | ||
519 | /// Messages from Windows Installer. | ||
520 | /// </summary> | ||
521 | public enum InstallMessage | ||
522 | { | ||
523 | FatalExit, | ||
524 | Error = 0x01000000, | ||
525 | Warning = 0x02000000, | ||
526 | User = 0x03000000, | ||
527 | Info = 0x04000000, | ||
528 | FilesInUse = 0x05000000, | ||
529 | ResolveSource = 0x06000000, | ||
530 | OutOfDiskSpace = 0x07000000, | ||
531 | ActionStart = 0x08000000, | ||
532 | ActionData = 0x09000000, | ||
533 | Progress = 0x0a000000, | ||
534 | CommonData = 0x0b000000, | ||
535 | Initialize = 0x0c000000, | ||
536 | Terminate = 0x0d000000, | ||
537 | ShowDialog = 0x0e000000, | ||
538 | RMFilesInUse = 0x19000000, | ||
539 | } | ||
540 | |||
541 | /// <summary> | ||
542 | /// The action to perform when a reboot is necessary. | ||
543 | /// </summary> | ||
544 | public enum Restart | ||
545 | { | ||
546 | Unknown, | ||
547 | Never, | ||
548 | Prompt, | ||
549 | Automatic, | ||
550 | Always, | ||
551 | } | ||
552 | |||
553 | /// <summary> | ||
554 | /// Result codes. | ||
555 | /// </summary> | ||
556 | public enum Result | ||
557 | { | ||
558 | Error = -1, | ||
559 | None, | ||
560 | Ok, | ||
561 | Cancel, | ||
562 | Abort, | ||
563 | Retry, | ||
564 | Ignore, | ||
565 | Yes, | ||
566 | No, | ||
567 | Close, | ||
568 | Help, | ||
569 | TryAgain, | ||
570 | Continue, | ||
571 | } | ||
572 | |||
573 | /// <summary> | ||
574 | /// Describes why a bundle or packaged is being resumed. | ||
575 | /// </summary> | ||
576 | public enum ResumeType | ||
577 | { | ||
578 | None, | ||
579 | |||
580 | /// <summary> | ||
581 | /// Resume information exists but is invalid. | ||
582 | /// </summary> | ||
583 | Invalid, | ||
584 | |||
585 | /// <summary> | ||
586 | /// The bundle was re-launched after an unexpected interruption. | ||
587 | /// </summary> | ||
588 | Interrupted, | ||
589 | |||
590 | /// <summary> | ||
591 | /// A reboot is pending. | ||
592 | /// </summary> | ||
593 | RebootPending, | ||
594 | |||
595 | /// <summary> | ||
596 | /// The bundle was re-launched after a reboot. | ||
597 | /// </summary> | ||
598 | Reboot, | ||
599 | |||
600 | /// <summary> | ||
601 | /// The bundle was re-launched after being suspended. | ||
602 | /// </summary> | ||
603 | Suspend, | ||
604 | |||
605 | /// <summary> | ||
606 | /// The bundle was launched from Add/Remove Programs. | ||
607 | /// </summary> | ||
608 | Arp, | ||
609 | } | ||
610 | |||
611 | /// <summary> | ||
612 | /// Indicates what caused the error. | ||
613 | /// </summary> | ||
614 | public enum ErrorType | ||
615 | { | ||
616 | /// <summary> | ||
617 | /// The error occurred trying to elevate. | ||
618 | /// </summary> | ||
619 | Elevate, | ||
620 | |||
621 | /// <summary> | ||
622 | /// The error came from the Windows Installer. | ||
623 | /// </summary> | ||
624 | WindowsInstaller, | ||
625 | |||
626 | /// <summary> | ||
627 | /// The error came from an EXE Package. | ||
628 | /// </summary> | ||
629 | ExePackage, | ||
630 | |||
631 | /// <summary> | ||
632 | /// The error came while trying to authenticate with an HTTP server. | ||
633 | /// </summary> | ||
634 | HttpServerAuthentication, | ||
635 | |||
636 | /// <summary> | ||
637 | /// The error came while trying to authenticate with an HTTP proxy. | ||
638 | /// </summary> | ||
639 | HttpProxyAuthentication, | ||
640 | |||
641 | /// <summary> | ||
642 | /// The error occurred during apply. | ||
643 | /// </summary> | ||
644 | Apply, | ||
645 | }; | ||
646 | |||
647 | public enum RelatedOperation | ||
648 | { | ||
649 | None, | ||
650 | |||
651 | /// <summary> | ||
652 | /// The related bundle or package will be downgraded. | ||
653 | /// </summary> | ||
654 | Downgrade, | ||
655 | |||
656 | /// <summary> | ||
657 | /// The related package will be upgraded as a minor revision. | ||
658 | /// </summary> | ||
659 | MinorUpdate, | ||
660 | |||
661 | /// <summary> | ||
662 | /// The related bundle or package will be upgraded as a major revision. | ||
663 | /// </summary> | ||
664 | MajorUpgrade, | ||
665 | |||
666 | /// <summary> | ||
667 | /// The related bundle will be removed. | ||
668 | /// </summary> | ||
669 | Remove, | ||
670 | |||
671 | /// <summary> | ||
672 | /// The related bundle will be installed. | ||
673 | /// </summary> | ||
674 | Install, | ||
675 | |||
676 | /// <summary> | ||
677 | /// The related bundle will be repaired. | ||
678 | /// </summary> | ||
679 | Repair, | ||
680 | }; | ||
681 | |||
682 | /// <summary> | ||
683 | /// The cache operation used to acquire a container or payload. | ||
684 | /// </summary> | ||
685 | public enum CacheOperation | ||
686 | { | ||
687 | /// <summary> | ||
688 | /// Container or payload is being copied. | ||
689 | /// </summary> | ||
690 | Copy, | ||
691 | |||
692 | /// <summary> | ||
693 | /// Container or payload is being downloaded. | ||
694 | /// </summary> | ||
695 | Download, | ||
696 | |||
697 | /// <summary> | ||
698 | /// Container or payload is being extracted. | ||
699 | /// </summary> | ||
700 | Extract | ||
701 | } | ||
702 | |||
703 | /// <summary> | ||
704 | /// The restart state after a package or all packages were applied. | ||
705 | /// </summary> | ||
706 | public enum ApplyRestart | ||
707 | { | ||
708 | /// <summary> | ||
709 | /// Package or chain does not require a restart. | ||
710 | /// </summary> | ||
711 | None, | ||
712 | |||
713 | /// <summary> | ||
714 | /// Package or chain requires a restart but it has not been initiated yet. | ||
715 | /// </summary> | ||
716 | RestartRequired, | ||
717 | |||
718 | /// <summary> | ||
719 | /// Package or chain has already initiated the restart. | ||
720 | /// </summary> | ||
721 | RestartInitiated | ||
722 | } | ||
723 | |||
724 | /// <summary> | ||
725 | /// The relation type for related bundles. | ||
726 | /// </summary> | ||
727 | public enum RelationType | ||
728 | { | ||
729 | None, | ||
730 | Detect, | ||
731 | Upgrade, | ||
732 | Addon, | ||
733 | Patch, | ||
734 | Dependent, | ||
735 | Update, | ||
736 | } | ||
737 | |||
738 | /// <summary> | ||
739 | /// One or more reasons why the application is requested to be closed or is being closed. | ||
740 | /// </summary> | ||
741 | [Flags] | ||
742 | public enum EndSessionReasons | ||
743 | { | ||
744 | /// <summary> | ||
745 | /// The system is shutting down or restarting (it is not possible to determine which event is occurring). | ||
746 | /// </summary> | ||
747 | Unknown, | ||
748 | |||
749 | /// <summary> | ||
750 | /// The application is using a file that must be replaced, the system is being serviced, or system resources are exhausted. | ||
751 | /// </summary> | ||
752 | CloseApplication, | ||
753 | |||
754 | /// <summary> | ||
755 | /// The application is forced to shut down. | ||
756 | /// </summary> | ||
757 | Critical = 0x40000000, | ||
758 | |||
759 | /// <summary> | ||
760 | /// The user is logging off. | ||
761 | /// </summary> | ||
762 | Logoff = unchecked((int)0x80000000) | ||
763 | } | ||
764 | |||
765 | /// <summary> | ||
766 | /// The available actions for OnApplyComplete. | ||
767 | /// </summary> | ||
768 | public enum BOOTSTRAPPER_APPLYCOMPLETE_ACTION | ||
769 | { | ||
770 | None, | ||
771 | Restart, | ||
772 | } | ||
773 | |||
774 | /// <summary> | ||
775 | /// The available actions for OnCacheAcquireComplete. | ||
776 | /// </summary> | ||
777 | public enum BOOTSTRAPPER_CACHEACQUIRECOMPLETE_ACTION | ||
778 | { | ||
779 | None, | ||
780 | Retry, | ||
781 | } | ||
782 | |||
783 | /// <summary> | ||
784 | /// The available actions for OnCachePackageComplete. | ||
785 | /// </summary> | ||
786 | public enum BOOTSTRAPPER_CACHEPACKAGECOMPLETE_ACTION | ||
787 | { | ||
788 | None, | ||
789 | Ignore, | ||
790 | Retry, | ||
791 | } | ||
792 | |||
793 | /// <summary> | ||
794 | /// The available actions for OnCacheVerifyComplete. | ||
795 | /// </summary> | ||
796 | public enum BOOTSTRAPPER_CACHEVERIFYCOMPLETE_ACTION | ||
797 | { | ||
798 | None, | ||
799 | RetryVerification, | ||
800 | RetryAcquisition, | ||
801 | } | ||
802 | |||
803 | /// <summary> | ||
804 | /// The available actions for OnExecutePackageComplete. | ||
805 | /// </summary> | ||
806 | public enum BOOTSTRAPPER_EXECUTEPACKAGECOMPLETE_ACTION | ||
807 | { | ||
808 | None, | ||
809 | Ignore, | ||
810 | Retry, | ||
811 | Restart, | ||
812 | Suspend, | ||
813 | } | ||
814 | |||
815 | /// <summary> | ||
816 | /// The available actions for OnResolveSource. | ||
817 | /// </summary> | ||
818 | public enum BOOTSTRAPPER_RESOLVESOURCE_ACTION | ||
819 | { | ||
820 | None, | ||
821 | Retry, | ||
822 | Download, | ||
823 | } | ||
824 | |||
825 | /// <summary> | ||
826 | /// The available actions for OnShutdown. | ||
827 | /// </summary> | ||
828 | public enum BOOTSTRAPPER_SHUTDOWN_ACTION | ||
829 | { | ||
830 | None, | ||
831 | Restart, | ||
832 | ReloadBootstrapper, | ||
833 | } | ||
834 | } | ||
diff --git a/src/WixToolset.Mba.Core/IBootstrapperApplicationFactory.cs b/src/WixToolset.Mba.Core/IBootstrapperApplicationFactory.cs index 6dd4af72..f5d4c705 100644 --- a/src/WixToolset.Mba.Core/IBootstrapperApplicationFactory.cs +++ b/src/WixToolset.Mba.Core/IBootstrapperApplicationFactory.cs | |||
@@ -5,7 +5,6 @@ namespace WixToolset.Mba.Core | |||
5 | using System; | 5 | using System; |
6 | using System.CodeDom.Compiler; | 6 | using System.CodeDom.Compiler; |
7 | using System.Runtime.InteropServices; | 7 | using System.Runtime.InteropServices; |
8 | using WixToolset.BootstrapperCore; | ||
9 | 8 | ||
10 | [ComVisible(true)] | 9 | [ComVisible(true)] |
11 | [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] | 10 | [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] |
diff --git a/src/WixToolset.Mba.Core/IBootstrapperCommand.cs b/src/WixToolset.Mba.Core/IBootstrapperCommand.cs index fc7d1fc2..675abdf9 100644 --- a/src/WixToolset.Mba.Core/IBootstrapperCommand.cs +++ b/src/WixToolset.Mba.Core/IBootstrapperCommand.cs | |||
@@ -3,7 +3,6 @@ | |||
3 | namespace WixToolset.Mba.Core | 3 | namespace WixToolset.Mba.Core |
4 | { | 4 | { |
5 | using System; | 5 | using System; |
6 | using WixToolset.BootstrapperCore; | ||
7 | 6 | ||
8 | /// <summary> | 7 | /// <summary> |
9 | /// Command information passed from the engine for the BA to perform. | 8 | /// Command information passed from the engine for the BA to perform. |
diff --git a/src/WixToolset.Mba.Core/IBootstrapperEngine.cs b/src/WixToolset.Mba.Core/IBootstrapperEngine.cs new file mode 100644 index 00000000..d070998e --- /dev/null +++ b/src/WixToolset.Mba.Core/IBootstrapperEngine.cs | |||
@@ -0,0 +1,279 @@ | |||
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 | namespace WixToolset.Mba.Core | ||
4 | { | ||
5 | using System; | ||
6 | using System.CodeDom.Compiler; | ||
7 | using System.Runtime.InteropServices; | ||
8 | using System.Text; | ||
9 | |||
10 | /// <summary> | ||
11 | /// Allows calls into the bootstrapper engine. | ||
12 | /// </summary> | ||
13 | [ComImport] | ||
14 | [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] | ||
15 | [Guid("6480D616-27A0-44D7-905B-81512C29C2FB")] | ||
16 | [GeneratedCodeAttribute("WixToolset.Bootstrapper.InteropCodeGenerator", "1.0.0.0")] | ||
17 | public interface IBootstrapperEngine | ||
18 | { | ||
19 | void GetPackageCount( | ||
20 | [MarshalAs(UnmanagedType.U4)] out int pcPackages | ||
21 | ); | ||
22 | |||
23 | [PreserveSig] | ||
24 | int GetVariableNumeric( | ||
25 | [MarshalAs(UnmanagedType.LPWStr)] string wzVariable, | ||
26 | out long pllValue | ||
27 | ); | ||
28 | |||
29 | [PreserveSig] | ||
30 | int GetVariableString( | ||
31 | [MarshalAs(UnmanagedType.LPWStr)] string wzVariable, | ||
32 | IntPtr wzValue, | ||
33 | [MarshalAs(UnmanagedType.U4)] ref int pcchValue | ||
34 | ); | ||
35 | |||
36 | [PreserveSig] | ||
37 | int GetVariableVersion( | ||
38 | [MarshalAs(UnmanagedType.LPWStr)] string wzVariable, | ||
39 | [MarshalAs(UnmanagedType.U8)] out long pqwValue | ||
40 | ); | ||
41 | |||
42 | [PreserveSig] | ||
43 | int FormatString( | ||
44 | [MarshalAs(UnmanagedType.LPWStr)] string wzIn, | ||
45 | [MarshalAs(UnmanagedType.LPWStr), Out] StringBuilder wzOut, | ||
46 | [MarshalAs(UnmanagedType.U4)] ref int pcchOut | ||
47 | ); | ||
48 | |||
49 | [PreserveSig] | ||
50 | int EscapeString( | ||
51 | [MarshalAs(UnmanagedType.LPWStr)] string wzIn, | ||
52 | [MarshalAs(UnmanagedType.LPWStr), Out] StringBuilder wzOut, | ||
53 | [MarshalAs(UnmanagedType.U4)] ref int pcchOut | ||
54 | ); | ||
55 | |||
56 | void EvaluateCondition( | ||
57 | [MarshalAs(UnmanagedType.LPWStr)] string wzCondition, | ||
58 | [MarshalAs(UnmanagedType.Bool)] out bool pf | ||
59 | ); | ||
60 | |||
61 | void Log( | ||
62 | [MarshalAs(UnmanagedType.U4)] LogLevel level, | ||
63 | [MarshalAs(UnmanagedType.LPWStr)] string wzMessage | ||
64 | ); | ||
65 | |||
66 | void SendEmbeddedError( | ||
67 | [MarshalAs(UnmanagedType.U4)] int dwErrorCode, | ||
68 | [MarshalAs(UnmanagedType.LPWStr)] string wzMessage, | ||
69 | [MarshalAs(UnmanagedType.U4)] int dwUIHint, | ||
70 | [MarshalAs(UnmanagedType.I4)] out int pnResult | ||
71 | ); | ||
72 | |||
73 | void SendEmbeddedProgress( | ||
74 | [MarshalAs(UnmanagedType.U4)] int dwProgressPercentage, | ||
75 | [MarshalAs(UnmanagedType.U4)] int dwOverallProgressPercentage, | ||
76 | [MarshalAs(UnmanagedType.I4)] out int pnResult | ||
77 | ); | ||
78 | |||
79 | void SetUpdate( | ||
80 | [MarshalAs(UnmanagedType.LPWStr)] string wzLocalSource, | ||
81 | [MarshalAs(UnmanagedType.LPWStr)] string wzDownloadSource, | ||
82 | [MarshalAs(UnmanagedType.U8)] long qwValue, | ||
83 | [MarshalAs(UnmanagedType.U4)] UpdateHashType hashType, | ||
84 | [MarshalAs(UnmanagedType.LPArray, SizeParamIndex=4)] byte[] rgbHash, | ||
85 | [MarshalAs(UnmanagedType.U4)] int cbHash | ||
86 | ); | ||
87 | |||
88 | void SetLocalSource( | ||
89 | [MarshalAs(UnmanagedType.LPWStr)] string wzPackageOrContainerId, | ||
90 | [MarshalAs(UnmanagedType.LPWStr)] string wzPayloadId, | ||
91 | [MarshalAs(UnmanagedType.LPWStr)] string wzPath | ||
92 | ); | ||
93 | |||
94 | void SetDownloadSource( | ||
95 | [MarshalAs(UnmanagedType.LPWStr)] string wzPackageOrContainerId, | ||
96 | [MarshalAs(UnmanagedType.LPWStr)] string wzPayloadId, | ||
97 | [MarshalAs(UnmanagedType.LPWStr)] string wzUrl, | ||
98 | [MarshalAs(UnmanagedType.LPWStr)] string wzUser, | ||
99 | [MarshalAs(UnmanagedType.LPWStr)] string wzPassword | ||
100 | ); | ||
101 | |||
102 | void SetVariableNumeric( | ||
103 | [MarshalAs(UnmanagedType.LPWStr)] string wzVariable, | ||
104 | long llValue | ||
105 | ); | ||
106 | |||
107 | void SetVariableString( | ||
108 | [MarshalAs(UnmanagedType.LPWStr)] string wzVariable, | ||
109 | IntPtr wzValue | ||
110 | ); | ||
111 | |||
112 | void SetVariableVersion( | ||
113 | [MarshalAs(UnmanagedType.LPWStr)] string wzVariable, | ||
114 | [MarshalAs(UnmanagedType.U8)] long qwValue | ||
115 | ); | ||
116 | |||
117 | void CloseSplashScreen(); | ||
118 | |||
119 | void Detect( | ||
120 | IntPtr hwndParent | ||
121 | ); | ||
122 | |||
123 | void Plan( | ||
124 | [MarshalAs(UnmanagedType.U4)] LaunchAction action | ||
125 | ); | ||
126 | |||
127 | [PreserveSig] | ||
128 | int Elevate( | ||
129 | IntPtr hwndParent | ||
130 | ); | ||
131 | |||
132 | void Apply( | ||
133 | IntPtr hwndParent | ||
134 | ); | ||
135 | |||
136 | void Quit( | ||
137 | [MarshalAs(UnmanagedType.U4)] int dwExitCode | ||
138 | ); | ||
139 | |||
140 | void LaunchApprovedExe( | ||
141 | IntPtr hwndParent, | ||
142 | [MarshalAs(UnmanagedType.LPWStr)] string wzApprovedExeForElevationId, | ||
143 | [MarshalAs(UnmanagedType.LPWStr)] string wzArguments, | ||
144 | [MarshalAs(UnmanagedType.U4)] int dwWaitForInputIdleTimeout | ||
145 | ); | ||
146 | } | ||
147 | |||
148 | /// <summary> | ||
149 | /// The installation action for the bundle or current package. | ||
150 | /// </summary> | ||
151 | public enum ActionState | ||
152 | { | ||
153 | None, | ||
154 | Uninstall, | ||
155 | Install, | ||
156 | AdminInstall, | ||
157 | Modify, | ||
158 | Repair, | ||
159 | MinorUpgrade, | ||
160 | MajorUpgrade, | ||
161 | Patch, | ||
162 | } | ||
163 | |||
164 | /// <summary> | ||
165 | /// The action for the BA to perform. | ||
166 | /// </summary> | ||
167 | public enum LaunchAction | ||
168 | { | ||
169 | Unknown, | ||
170 | Help, | ||
171 | Layout, | ||
172 | Uninstall, | ||
173 | Cache, | ||
174 | Install, | ||
175 | Modify, | ||
176 | Repair, | ||
177 | UpdateReplace, | ||
178 | UpdateReplaceEmbedded, | ||
179 | } | ||
180 | |||
181 | /// <summary> | ||
182 | /// The message log level. | ||
183 | /// </summary> | ||
184 | public enum LogLevel | ||
185 | { | ||
186 | /// <summary> | ||
187 | /// No logging level (generic). | ||
188 | /// </summary> | ||
189 | None, | ||
190 | |||
191 | /// <summary> | ||
192 | /// User messages. | ||
193 | /// </summary> | ||
194 | Standard, | ||
195 | |||
196 | /// <summary> | ||
197 | /// Verbose messages. | ||
198 | /// </summary> | ||
199 | Verbose, | ||
200 | |||
201 | /// <summary> | ||
202 | /// Messages for debugging. | ||
203 | /// </summary> | ||
204 | Debug, | ||
205 | |||
206 | /// <summary> | ||
207 | /// Error messages. | ||
208 | /// </summary> | ||
209 | Error, | ||
210 | } | ||
211 | |||
212 | /// <summary> | ||
213 | /// Type of hash used for update bundle. | ||
214 | /// </summary> | ||
215 | public enum UpdateHashType | ||
216 | { | ||
217 | /// <summary> | ||
218 | /// No hash provided. | ||
219 | /// </summary> | ||
220 | None, | ||
221 | |||
222 | /// <summary> | ||
223 | /// SHA-1 based hash provided. | ||
224 | /// </summary> | ||
225 | Sha1, | ||
226 | } | ||
227 | |||
228 | /// <summary> | ||
229 | /// Describes the state of an installation package. | ||
230 | /// </summary> | ||
231 | public enum PackageState | ||
232 | { | ||
233 | Unknown, | ||
234 | Obsolete, | ||
235 | Absent, | ||
236 | Cached, | ||
237 | Present, | ||
238 | Superseded, | ||
239 | } | ||
240 | |||
241 | /// <summary> | ||
242 | /// Indicates the state desired for an installation package. | ||
243 | /// </summary> | ||
244 | public enum RequestState | ||
245 | { | ||
246 | None, | ||
247 | ForceAbsent, | ||
248 | Absent, | ||
249 | Cache, | ||
250 | Present, | ||
251 | Repair, | ||
252 | } | ||
253 | |||
254 | /// <summary> | ||
255 | /// Indicates the state of a feature. | ||
256 | /// </summary> | ||
257 | public enum FeatureState | ||
258 | { | ||
259 | Unknown, | ||
260 | Absent, | ||
261 | Advertised, | ||
262 | Local, | ||
263 | Source, | ||
264 | } | ||
265 | |||
266 | /// <summary> | ||
267 | /// Indicates the action for a feature. | ||
268 | /// </summary> | ||
269 | public enum FeatureAction | ||
270 | { | ||
271 | None, | ||
272 | AddLocal, | ||
273 | AddSource, | ||
274 | AddDefault, | ||
275 | Reinstall, | ||
276 | Advertise, | ||
277 | Remove, | ||
278 | } | ||
279 | } | ||
diff --git a/src/WixToolset.Mba.Core/IDefaultBootstrapperApplication.cs b/src/WixToolset.Mba.Core/IDefaultBootstrapperApplication.cs index ee290865..9bea6418 100644 --- a/src/WixToolset.Mba.Core/IDefaultBootstrapperApplication.cs +++ b/src/WixToolset.Mba.Core/IDefaultBootstrapperApplication.cs | |||
@@ -3,7 +3,6 @@ | |||
3 | namespace WixToolset.Mba.Core | 3 | namespace WixToolset.Mba.Core |
4 | { | 4 | { |
5 | using System; | 5 | using System; |
6 | using WixToolset.BootstrapperCore; | ||
7 | 6 | ||
8 | public interface IDefaultBootstrapperApplication : IBootstrapperApplication | 7 | public interface IDefaultBootstrapperApplication : IBootstrapperApplication |
9 | { | 8 | { |
diff --git a/src/WixToolset.Mba.Core/IEngine.cs b/src/WixToolset.Mba.Core/IEngine.cs index 6aef50b3..5ddc4176 100644 --- a/src/WixToolset.Mba.Core/IEngine.cs +++ b/src/WixToolset.Mba.Core/IEngine.cs | |||
@@ -5,7 +5,6 @@ namespace WixToolset.Mba.Core | |||
5 | using System; | 5 | using System; |
6 | using System.ComponentModel; | 6 | using System.ComponentModel; |
7 | using System.Security; | 7 | using System.Security; |
8 | using WixToolset.BootstrapperCore; | ||
9 | 8 | ||
10 | public interface IEngine | 9 | public interface IEngine |
11 | { | 10 | { |
diff --git a/src/WixToolset.Mba.Core/PackageInfo.cs b/src/WixToolset.Mba.Core/PackageInfo.cs index 9bc21923..46894d2e 100644 --- a/src/WixToolset.Mba.Core/PackageInfo.cs +++ b/src/WixToolset.Mba.Core/PackageInfo.cs | |||
@@ -6,7 +6,6 @@ namespace WixToolset.Mba.Core | |||
6 | using System.Collections.Generic; | 6 | using System.Collections.Generic; |
7 | using System.Xml; | 7 | using System.Xml; |
8 | using System.Xml.XPath; | 8 | using System.Xml.XPath; |
9 | using WixToolset.BootstrapperCore; | ||
10 | 9 | ||
11 | public enum CacheType | 10 | public enum CacheType |
12 | { | 11 | { |
diff --git a/src/WixToolset.Mba.Core/WixToolset.Mba.Core.csproj b/src/WixToolset.Mba.Core/WixToolset.Mba.Core.csproj index 16d278b0..05d042c3 100644 --- a/src/WixToolset.Mba.Core/WixToolset.Mba.Core.csproj +++ b/src/WixToolset.Mba.Core/WixToolset.Mba.Core.csproj | |||
@@ -35,9 +35,11 @@ | |||
35 | <Compile Include="EventArgs.cs" /> | 35 | <Compile Include="EventArgs.cs" /> |
36 | <Compile Include="Exceptions.cs" /> | 36 | <Compile Include="Exceptions.cs" /> |
37 | <Compile Include="HostSection.cs" /> | 37 | <Compile Include="HostSection.cs" /> |
38 | <Compile Include="IBootstrapperApplication.cs" /> | ||
38 | <Compile Include="IBootstrapperApplicationData.cs" /> | 39 | <Compile Include="IBootstrapperApplicationData.cs" /> |
39 | <Compile Include="IBootstrapperApplicationFactory.cs" /> | 40 | <Compile Include="IBootstrapperApplicationFactory.cs" /> |
40 | <Compile Include="IBootstrapperCommand.cs" /> | 41 | <Compile Include="IBootstrapperCommand.cs" /> |
42 | <Compile Include="IBootstrapperEngine.cs" /> | ||
41 | <Compile Include="IBundleInfo.cs" /> | 43 | <Compile Include="IBundleInfo.cs" /> |
42 | <Compile Include="IDefaultBootstrapperApplication.cs" /> | 44 | <Compile Include="IDefaultBootstrapperApplication.cs" /> |
43 | <Compile Include="IEngine.cs" /> | 45 | <Compile Include="IEngine.cs" /> |
@@ -62,9 +64,6 @@ | |||
62 | <Reference Include="System.Configuration" /> | 64 | <Reference Include="System.Configuration" /> |
63 | <Reference Include="System.Data" /> | 65 | <Reference Include="System.Data" /> |
64 | <Reference Include="System.Xml" /> | 66 | <Reference Include="System.Xml" /> |
65 | <Reference Include="WixToolset.BootstrapperCore"> | ||
66 | <HintPath>..\..\packages\WixToolset.BootstrapperCore.4.0.8\lib\net20\WixToolset.BootstrapperCore.dll</HintPath> | ||
67 | </Reference> | ||
68 | </ItemGroup> | 67 | </ItemGroup> |
69 | <ItemGroup> | 68 | <ItemGroup> |
70 | <HeaderPath Include="$(BaseOutputPath)$(Configuration)\$(AssemblyName).h"> | 69 | <HeaderPath Include="$(BaseOutputPath)$(Configuration)\$(AssemblyName).h"> |
diff --git a/src/WixToolset.Mba.Core/packages.config b/src/WixToolset.Mba.Core/packages.config index 3702a604..03e866cf 100644 --- a/src/WixToolset.Mba.Core/packages.config +++ b/src/WixToolset.Mba.Core/packages.config | |||
@@ -1,5 +1,4 @@ | |||
1 | <?xml version="1.0" encoding="utf-8"?> | 1 | <?xml version="1.0" encoding="utf-8"?> |
2 | <packages> | 2 | <packages> |
3 | <package id="Nerdbank.GitVersioning" version="2.1.65" targetFramework="net20" developmentDependency="true" /> | 3 | <package id="Nerdbank.GitVersioning" version="2.1.65" targetFramework="net20" developmentDependency="true" /> |
4 | <package id="WixToolset.BootstrapperCore" version="4.0.8" targetFramework="net20" /> | ||
5 | </packages> \ No newline at end of file | 4 | </packages> \ No newline at end of file |
diff --git a/src/balutil/inc/IBootstrapperApplication.h b/src/balutil/inc/IBootstrapperApplication.h new file mode 100644 index 00000000..6ab7ed20 --- /dev/null +++ b/src/balutil/inc/IBootstrapperApplication.h | |||
@@ -0,0 +1,525 @@ | |||
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 | DECLARE_INTERFACE_IID_(IBootstrapperApplication, IUnknown, "53C31D56-49C0-426B-AB06-099D717C67FE") | ||
6 | { | ||
7 | // OnStartup - called when the engine is ready for the bootstrapper application to start. | ||
8 | // | ||
9 | STDMETHOD(OnStartup)() = 0; | ||
10 | |||
11 | // OnShutdown - called after the bootstrapper application quits the engine. | ||
12 | STDMETHOD(OnShutdown)( | ||
13 | __inout BOOTSTRAPPER_SHUTDOWN_ACTION* pAction | ||
14 | ) = 0; | ||
15 | |||
16 | // OnSystemShutdown - called when the operating system is instructed to shutdown the machine. | ||
17 | STDMETHOD(OnSystemShutdown)( | ||
18 | __in DWORD dwEndSession, | ||
19 | __inout BOOL* pfCancel | ||
20 | ) = 0; | ||
21 | |||
22 | // OnDetectBegin - called when the engine begins detection. | ||
23 | STDMETHOD(OnDetectBegin)( | ||
24 | __in BOOL fInstalled, | ||
25 | __in DWORD cPackages, | ||
26 | __inout BOOL* pfCancel | ||
27 | ) = 0; | ||
28 | |||
29 | // OnDetectForwardCompatibleBundle - called when the engine detects a forward compatible bundle. | ||
30 | STDMETHOD(OnDetectForwardCompatibleBundle)( | ||
31 | __in_z LPCWSTR wzBundleId, | ||
32 | __in BOOTSTRAPPER_RELATION_TYPE relationType, | ||
33 | __in_z LPCWSTR wzBundleTag, | ||
34 | __in BOOL fPerMachine, | ||
35 | __in DWORD64 dw64Version, | ||
36 | __inout BOOL* pfCancel, | ||
37 | __inout BOOL* pfIgnoreBundle | ||
38 | ) = 0; | ||
39 | |||
40 | // OnDetectUpdateBegin - called when the engine begins detection for bundle update. | ||
41 | STDMETHOD(OnDetectUpdateBegin)( | ||
42 | __in_z LPCWSTR wzUpdateLocation, | ||
43 | __inout BOOL* pfCancel, | ||
44 | __inout BOOL* pfSkip | ||
45 | ) = 0; | ||
46 | |||
47 | // OnDetectUpdate - called when the engine has an update candidate for bundle update. | ||
48 | STDMETHOD(OnDetectUpdate)( | ||
49 | __in_z_opt LPCWSTR wzUpdateLocation, | ||
50 | __in DWORD64 dw64Size, | ||
51 | __in DWORD64 dw64Version, | ||
52 | __in_z_opt LPCWSTR wzTitle, | ||
53 | __in_z_opt LPCWSTR wzSummary, | ||
54 | __in_z_opt LPCWSTR wzContentType, | ||
55 | __in_z_opt LPCWSTR wzContent, | ||
56 | __inout BOOL* pfCancel, | ||
57 | __inout BOOL* pfStopProcessingUpdates | ||
58 | ) = 0; | ||
59 | |||
60 | // OnDetectUpdateComplete - called when the engine completes detection for bundle update. | ||
61 | STDMETHOD(OnDetectUpdateComplete)( | ||
62 | __in HRESULT hrStatus, | ||
63 | __inout BOOL* pfIgnoreError | ||
64 | ) = 0; | ||
65 | |||
66 | // OnDetectRelatedBundle - called when the engine detects a related bundle. | ||
67 | STDMETHOD(OnDetectRelatedBundle)( | ||
68 | __in_z LPCWSTR wzBundleId, | ||
69 | __in BOOTSTRAPPER_RELATION_TYPE relationType, | ||
70 | __in_z LPCWSTR wzBundleTag, | ||
71 | __in BOOL fPerMachine, | ||
72 | __in DWORD64 dw64Version, | ||
73 | __in BOOTSTRAPPER_RELATED_OPERATION operation, | ||
74 | __inout BOOL* pfCancel | ||
75 | ) = 0; | ||
76 | |||
77 | // OnDetectPackageBegin - called when the engine begins detecting a package. | ||
78 | STDMETHOD(OnDetectPackageBegin)( | ||
79 | __in_z LPCWSTR wzPackageId, | ||
80 | __inout BOOL* pfCancel | ||
81 | ) = 0; | ||
82 | |||
83 | // OnDetectCompatibleMsiPackage - called when the engine detects that a package is not installed but a newer package using the same provider key is. | ||
84 | STDMETHOD(OnDetectCompatibleMsiPackage)( | ||
85 | __in_z LPCWSTR wzPackageId, | ||
86 | __in_z LPCWSTR wzCompatiblePackageId, | ||
87 | __in DWORD64 dw64CompatiblePackageVersion, | ||
88 | __inout BOOL* pfCancel | ||
89 | ) = 0; | ||
90 | |||
91 | // OnDetectRelatedMsiPackage - called when the engine begins detects a related package. | ||
92 | STDMETHOD(OnDetectRelatedMsiPackage)( | ||
93 | __in_z LPCWSTR wzPackageId, | ||
94 | __in_z LPCWSTR wzUpgradeCode, | ||
95 | __in_z LPCWSTR wzProductCode, | ||
96 | __in BOOL fPerMachine, | ||
97 | __in DWORD64 dw64Version, | ||
98 | __in BOOTSTRAPPER_RELATED_OPERATION operation, | ||
99 | __inout BOOL* pfCancel | ||
100 | ) = 0; | ||
101 | |||
102 | // OnDetectTargetMsiPackage - called when the engine detects a target MSI package for | ||
103 | // an MSP package. | ||
104 | STDMETHOD(OnDetectTargetMsiPackage)( | ||
105 | __in_z LPCWSTR wzPackageId, | ||
106 | __in_z LPCWSTR wzProductCode, | ||
107 | __in BOOTSTRAPPER_PACKAGE_STATE patchState, | ||
108 | __inout BOOL* pfCancel | ||
109 | ) = 0; | ||
110 | |||
111 | // OnDetectMsiFeature - called when the engine detects a feature in an MSI package. | ||
112 | STDMETHOD(OnDetectMsiFeature)( | ||
113 | __in_z LPCWSTR wzPackageId, | ||
114 | __in_z LPCWSTR wzFeatureId, | ||
115 | __in BOOTSTRAPPER_FEATURE_STATE state, | ||
116 | __inout BOOL* pfCancel | ||
117 | ) = 0; | ||
118 | |||
119 | // OnDetectPackageComplete - called after the engine detects a package. | ||
120 | // | ||
121 | STDMETHOD(OnDetectPackageComplete)( | ||
122 | __in_z LPCWSTR wzPackageId, | ||
123 | __in HRESULT hrStatus, | ||
124 | __in BOOTSTRAPPER_PACKAGE_STATE state | ||
125 | ) = 0; | ||
126 | |||
127 | // OnDetectPackageComplete - called after the engine completes detection. | ||
128 | // | ||
129 | STDMETHOD(OnDetectComplete)( | ||
130 | __in HRESULT hrStatus | ||
131 | ) = 0; | ||
132 | |||
133 | // OnPlanBegin - called when the engine begins planning. | ||
134 | STDMETHOD(OnPlanBegin)( | ||
135 | __in DWORD cPackages, | ||
136 | __inout BOOL* pfCancel | ||
137 | ) = 0; | ||
138 | |||
139 | // OnPlanRelatedBundle - called when the engine begins planning a related bundle. | ||
140 | STDMETHOD(OnPlanRelatedBundle)( | ||
141 | __in_z LPCWSTR wzBundleId, | ||
142 | __in BOOTSTRAPPER_REQUEST_STATE recommendedState, | ||
143 | __inout BOOTSTRAPPER_REQUEST_STATE* pRequestedState, | ||
144 | __inout BOOL* pfCancel | ||
145 | ) = 0; | ||
146 | |||
147 | // OnPlanPackageBegin - called when the engine begins planning a package. | ||
148 | STDMETHOD(OnPlanPackageBegin)( | ||
149 | __in_z LPCWSTR wzPackageId, | ||
150 | __in BOOTSTRAPPER_REQUEST_STATE recommendedState, | ||
151 | __inout BOOTSTRAPPER_REQUEST_STATE* pRequestedState, | ||
152 | __inout BOOL* pfCancel | ||
153 | ) = 0; | ||
154 | |||
155 | // OnPlanCompatibleMsiPackageBegin - called when the engine plans a newer, compatible package using the same provider key. | ||
156 | STDMETHOD(OnPlanCompatibleMsiPackageBegin)( | ||
157 | __in_z LPCWSTR wzPackageId, | ||
158 | __in_z LPCWSTR wzCompatiblePackageId, | ||
159 | __in DWORD64 dw64CompatiblePackageVersion, | ||
160 | __in BOOTSTRAPPER_REQUEST_STATE recommendedState, | ||
161 | __inout BOOTSTRAPPER_REQUEST_STATE* pRequestedState, | ||
162 | __inout BOOL* pfCancel | ||
163 | ) = 0; | ||
164 | |||
165 | // OnPlanCompatibleMsiPackageComplete - called after the engine plans the package. | ||
166 | // | ||
167 | STDMETHOD(OnPlanCompatibleMsiPackageComplete)( | ||
168 | __in_z LPCWSTR wzPackageId, | ||
169 | __in_z LPCWSTR wzCompatiblePackageId, | ||
170 | __in HRESULT hrStatus, | ||
171 | __in BOOTSTRAPPER_PACKAGE_STATE state, | ||
172 | __in BOOTSTRAPPER_REQUEST_STATE requested, | ||
173 | __in BOOTSTRAPPER_ACTION_STATE execute, | ||
174 | __in BOOTSTRAPPER_ACTION_STATE rollback | ||
175 | ) = 0; | ||
176 | |||
177 | // OnPlanTargetMsiPackage - called when the engine plans an MSP package | ||
178 | // to apply to an MSI package. | ||
179 | STDMETHOD(OnPlanTargetMsiPackage)( | ||
180 | __in_z LPCWSTR wzPackageId, | ||
181 | __in_z LPCWSTR wzProductCode, | ||
182 | __in BOOTSTRAPPER_REQUEST_STATE recommendedState, | ||
183 | __inout BOOTSTRAPPER_REQUEST_STATE* pRequestedState, | ||
184 | __inout BOOL* pfCancel | ||
185 | ) = 0; | ||
186 | |||
187 | // OnPlanMsiFeature - called when the engine plans a feature in an | ||
188 | // MSI package. | ||
189 | STDMETHOD(OnPlanMsiFeature)( | ||
190 | __in_z LPCWSTR wzPackageId, | ||
191 | __in_z LPCWSTR wzFeatureId, | ||
192 | __in BOOTSTRAPPER_FEATURE_STATE recommendedState, | ||
193 | __inout BOOTSTRAPPER_FEATURE_STATE* pRequestedState, | ||
194 | __inout BOOL* pfCancel | ||
195 | ) = 0; | ||
196 | |||
197 | // OnPlanPackageComplete - called after the engine plans a package. | ||
198 | // | ||
199 | STDMETHOD(OnPlanPackageComplete)( | ||
200 | __in_z LPCWSTR wzPackageId, | ||
201 | __in HRESULT hrStatus, | ||
202 | __in BOOTSTRAPPER_PACKAGE_STATE state, | ||
203 | __in BOOTSTRAPPER_REQUEST_STATE requested, | ||
204 | __in BOOTSTRAPPER_ACTION_STATE execute, | ||
205 | __in BOOTSTRAPPER_ACTION_STATE rollback | ||
206 | ) = 0; | ||
207 | |||
208 | // OnPlanComplete - called when the engine completes planning. | ||
209 | // | ||
210 | STDMETHOD(OnPlanComplete)( | ||
211 | __in HRESULT hrStatus | ||
212 | ) = 0; | ||
213 | |||
214 | // OnApplyBegin - called when the engine begins applying the plan. | ||
215 | // | ||
216 | STDMETHOD(OnApplyBegin)( | ||
217 | __in DWORD dwPhaseCount, | ||
218 | __inout BOOL* pfCancel | ||
219 | ) = 0; | ||
220 | |||
221 | // OnElevateBegin - called before the engine displays an elevation prompt. | ||
222 | // Will only happen once per execution of the engine, | ||
223 | // assuming the elevation was successful. | ||
224 | STDMETHOD(OnElevateBegin)( | ||
225 | __inout BOOL* pfCancel | ||
226 | ) = 0; | ||
227 | |||
228 | // OnElevateComplete - called after the engine attempted to elevate. | ||
229 | // | ||
230 | STDMETHOD(OnElevateComplete)( | ||
231 | __in HRESULT hrStatus | ||
232 | ) = 0; | ||
233 | |||
234 | // OnProgress - called when the engine makes progress. | ||
235 | // | ||
236 | STDMETHOD(OnProgress)( | ||
237 | __in DWORD dwProgressPercentage, | ||
238 | __in DWORD dwOverallPercentage, | ||
239 | __inout BOOL* pfCancel | ||
240 | ) = 0; | ||
241 | |||
242 | // OnError - called when the engine encounters an error. | ||
243 | // | ||
244 | // nResult: | ||
245 | // uiFlags is a combination of valid ID* return values appropriate for | ||
246 | // the error. | ||
247 | // | ||
248 | // IDNOACTION instructs the engine to pass the error through to default | ||
249 | // handling which usually results in the apply failing. | ||
250 | STDMETHOD(OnError)( | ||
251 | __in BOOTSTRAPPER_ERROR_TYPE errorType, | ||
252 | __in_z_opt LPCWSTR wzPackageId, | ||
253 | __in DWORD dwCode, | ||
254 | __in_z_opt LPCWSTR wzError, | ||
255 | __in DWORD dwUIHint, | ||
256 | __in DWORD cData, | ||
257 | __in_ecount_z_opt(cData) LPCWSTR* rgwzData, | ||
258 | __in int nRecommendation, | ||
259 | __inout int* pResult | ||
260 | ) = 0; | ||
261 | |||
262 | // OnRegisterBegin - called when the engine registers the bundle. | ||
263 | // | ||
264 | STDMETHOD(OnRegisterBegin)( | ||
265 | __inout BOOL* pfCancel | ||
266 | ) = 0; | ||
267 | |||
268 | // OnRegisterComplete - called when the engine registration is | ||
269 | // complete. | ||
270 | // | ||
271 | STDMETHOD(OnRegisterComplete)( | ||
272 | __in HRESULT hrStatus | ||
273 | ) = 0; | ||
274 | |||
275 | // OnCacheBegin - called when the engine begins caching. | ||
276 | // | ||
277 | STDMETHOD(OnCacheBegin)( | ||
278 | __inout BOOL* pfCancel | ||
279 | ) = 0; | ||
280 | |||
281 | // OnCachePackageBegin - called when the engine begins caching | ||
282 | // a package. | ||
283 | // | ||
284 | STDMETHOD(OnCachePackageBegin)( | ||
285 | __in_z LPCWSTR wzPackageId, | ||
286 | __in DWORD cCachePayloads, | ||
287 | __in DWORD64 dw64PackageCacheSize, | ||
288 | __inout BOOL* pfCancel | ||
289 | ) = 0; | ||
290 | |||
291 | // OnCacheAcquireBegin - called when the engine begins copying or | ||
292 | // downloading a payload to the working folder. | ||
293 | // | ||
294 | STDMETHOD(OnCacheAcquireBegin)( | ||
295 | __in_z_opt LPCWSTR wzPackageOrContainerId, | ||
296 | __in_z_opt LPCWSTR wzPayloadId, | ||
297 | __in BOOTSTRAPPER_CACHE_OPERATION operation, | ||
298 | __in_z LPCWSTR wzSource, | ||
299 | __inout BOOL* pfCancel | ||
300 | ) = 0; | ||
301 | |||
302 | // OnCacheAcquireProgress - called when the engine makes progresss copying | ||
303 | // or downloading a payload to the working folder. | ||
304 | // | ||
305 | STDMETHOD(OnCacheAcquireProgress)( | ||
306 | __in_z_opt LPCWSTR wzPackageOrContainerId, | ||
307 | __in_z_opt LPCWSTR wzPayloadId, | ||
308 | __in DWORD64 dw64Progress, | ||
309 | __in DWORD64 dw64Total, | ||
310 | __in DWORD dwOverallPercentage, | ||
311 | __inout BOOL* pfCancel | ||
312 | ) = 0; | ||
313 | |||
314 | // OnResolveSource - called when a payload or container cannot be found locally. | ||
315 | // | ||
316 | // Parameters: | ||
317 | // wzPayloadId will be NULL when resolving a container. | ||
318 | // wzDownloadSource will be NULL if the container or payload does not provide a DownloadURL. | ||
319 | // | ||
320 | // Notes: | ||
321 | // It is expected the BA may call IBootstrapperEngine::SetLocalSource() or IBootstrapperEngine::SetDownloadSource() | ||
322 | // to update the source location before returning BOOTSTRAPPER_RESOLVESOURCE_ACTION_RETRY or BOOTSTRAPPER_RESOLVESOURCE_ACTION_DOWNLOAD. | ||
323 | STDMETHOD(OnResolveSource)( | ||
324 | __in_z LPCWSTR wzPackageOrContainerId, | ||
325 | __in_z_opt LPCWSTR wzPayloadId, | ||
326 | __in_z LPCWSTR wzLocalSource, | ||
327 | __in_z_opt LPCWSTR wzDownloadSource, | ||
328 | __in BOOTSTRAPPER_RESOLVESOURCE_ACTION recommendation, | ||
329 | __inout BOOTSTRAPPER_RESOLVESOURCE_ACTION* pAction, | ||
330 | __inout BOOL* pfCancel | ||
331 | ) = 0; | ||
332 | |||
333 | // OnCacheAcquireComplete - called after the engine copied or downloaded | ||
334 | // a payload to the working folder. | ||
335 | // | ||
336 | STDMETHOD(OnCacheAcquireComplete)( | ||
337 | __in_z_opt LPCWSTR wzPackageOrContainerId, | ||
338 | __in_z_opt LPCWSTR wzPayloadId, | ||
339 | __in HRESULT hrStatus, | ||
340 | __in BOOTSTRAPPER_CACHEACQUIRECOMPLETE_ACTION recommendation, | ||
341 | __inout BOOTSTRAPPER_CACHEACQUIRECOMPLETE_ACTION* pAction | ||
342 | ) = 0; | ||
343 | |||
344 | // OnCacheVerifyBegin - called when the engine begins to verify then copy | ||
345 | // a payload or container to the package cache folder. | ||
346 | // | ||
347 | STDMETHOD(OnCacheVerifyBegin)( | ||
348 | __in_z_opt LPCWSTR wzPackageOrContainerId, | ||
349 | __in_z_opt LPCWSTR wzPayloadId, | ||
350 | __inout BOOL* pfCancel | ||
351 | ) = 0; | ||
352 | |||
353 | // OnCacheVerifyComplete - called after the engine verifies and copies | ||
354 | // a payload or container to the package cache folder. | ||
355 | // | ||
356 | STDMETHOD(OnCacheVerifyComplete)( | ||
357 | __in_z_opt LPCWSTR wzPackageOrContainerId, | ||
358 | __in_z_opt LPCWSTR wzPayloadId, | ||
359 | __in HRESULT hrStatus, | ||
360 | __in BOOTSTRAPPER_CACHEVERIFYCOMPLETE_ACTION recommendation, | ||
361 | __inout BOOTSTRAPPER_CACHEVERIFYCOMPLETE_ACTION* pAction | ||
362 | ) = 0; | ||
363 | |||
364 | // OnCachePackageComplete - called after the engine attempts to copy or download all | ||
365 | // payloads of a package into the package cache folder. | ||
366 | // | ||
367 | STDMETHOD(OnCachePackageComplete)( | ||
368 | __in_z LPCWSTR wzPackageId, | ||
369 | __in HRESULT hrStatus, | ||
370 | __in BOOTSTRAPPER_CACHEPACKAGECOMPLETE_ACTION recommendation, | ||
371 | __inout BOOTSTRAPPER_CACHEPACKAGECOMPLETE_ACTION* pAction | ||
372 | ) = 0; | ||
373 | |||
374 | // OnCacheComplete - called when the engine caching is complete. | ||
375 | // | ||
376 | STDMETHOD(OnCacheComplete)( | ||
377 | __in HRESULT hrStatus | ||
378 | ) = 0; | ||
379 | |||
380 | // OnExecuteBegin - called when the engine begins executing the plan. | ||
381 | // | ||
382 | STDMETHOD(OnExecuteBegin)( | ||
383 | __in DWORD cExecutingPackages, | ||
384 | __inout BOOL* pfCancel | ||
385 | ) = 0; | ||
386 | |||
387 | // OnExecuteBegin - called when the engine begins executing a package. | ||
388 | // | ||
389 | STDMETHOD(OnExecutePackageBegin)( | ||
390 | __in_z LPCWSTR wzPackageId, | ||
391 | __in BOOL fExecute, | ||
392 | __inout BOOL* pfCancel | ||
393 | ) = 0; | ||
394 | |||
395 | // OnExecutePatchTarget - called for each patch in an MspPackage targeting the product | ||
396 | // when the engine begins executing the MspPackage. | ||
397 | // | ||
398 | STDMETHOD(OnExecutePatchTarget)( | ||
399 | __in_z LPCWSTR wzPackageId, | ||
400 | __in_z LPCWSTR wzTargetProductCode, | ||
401 | __inout BOOL* pfCancel | ||
402 | ) = 0; | ||
403 | |||
404 | // OnExecuteProgress - called when the engine makes progress executing a package. | ||
405 | // | ||
406 | STDMETHOD(OnExecuteProgress)( | ||
407 | __in_z LPCWSTR wzPackageId, | ||
408 | __in DWORD dwProgressPercentage, | ||
409 | __in DWORD dwOverallPercentage, | ||
410 | __inout BOOL* pfCancel | ||
411 | ) = 0; | ||
412 | |||
413 | // OnExecuteMsiMessage - called when the engine receives an MSI package message. | ||
414 | // | ||
415 | // Return: | ||
416 | // uiFlags is a combination of valid ID* return values appropriate for | ||
417 | // the message. | ||
418 | // | ||
419 | // IDNOACTION instructs the engine to pass the message through to default | ||
420 | // handling which usually results in the execution continuing. | ||
421 | STDMETHOD(OnExecuteMsiMessage)( | ||
422 | __in_z LPCWSTR wzPackageId, | ||
423 | __in INSTALLMESSAGE messageType, | ||
424 | __in DWORD dwUIHint, | ||
425 | __in_z LPCWSTR wzMessage, | ||
426 | __in DWORD cData, | ||
427 | __in_ecount_z_opt(cData) LPCWSTR* rgwzData, | ||
428 | __in int nRecommendation, | ||
429 | __inout int* pResult | ||
430 | ) = 0; | ||
431 | |||
432 | // OnExecuteFilesInUse - called when the engine encounters files in use while | ||
433 | // executing a package. | ||
434 | // | ||
435 | // Return: | ||
436 | // IDOK instructs the engine to let the Restart Manager attempt to close the | ||
437 | // applications to avoid a restart. | ||
438 | // | ||
439 | // IDCANCEL instructs the engine to abort the execution and start rollback. | ||
440 | // | ||
441 | // IDIGNORE instructs the engine to ignore the running applications. A restart will be | ||
442 | // required. | ||
443 | // | ||
444 | // IDRETRY instructs the engine to check if the applications are still running again. | ||
445 | // | ||
446 | // IDNOACTION is equivalent to ignoring the running applications. A restart will be | ||
447 | // required. | ||
448 | STDMETHOD(OnExecuteFilesInUse)( | ||
449 | __in_z LPCWSTR wzPackageId, | ||
450 | __in DWORD cFiles, | ||
451 | __in_ecount_z(cFiles) LPCWSTR* rgwzFiles, | ||
452 | __in int nRecommendation, | ||
453 | __inout int* pResult | ||
454 | ) = 0; | ||
455 | |||
456 | // OnExecutePackageComplete - called when a package execution is complete. | ||
457 | // | ||
458 | STDMETHOD(OnExecutePackageComplete)( | ||
459 | __in_z LPCWSTR wzPackageId, | ||
460 | __in HRESULT hrStatus, | ||
461 | __in BOOTSTRAPPER_APPLY_RESTART restart, | ||
462 | __in BOOTSTRAPPER_EXECUTEPACKAGECOMPLETE_ACTION recommendation, | ||
463 | __inout BOOTSTRAPPER_EXECUTEPACKAGECOMPLETE_ACTION* pAction | ||
464 | ) = 0; | ||
465 | |||
466 | // OnExecuteComplete - called when the engine execution is complete. | ||
467 | // | ||
468 | STDMETHOD(OnExecuteComplete)( | ||
469 | __in HRESULT hrStatus | ||
470 | ) = 0; | ||
471 | |||
472 | // OnUnregisterBegin - called when the engine unregisters the bundle. | ||
473 | // | ||
474 | STDMETHOD(OnUnregisterBegin)( | ||
475 | __inout BOOL* pfCancel | ||
476 | ) = 0; | ||
477 | |||
478 | // OnUnregisterComplete - called when the engine unregistration is complete. | ||
479 | // | ||
480 | STDMETHOD(OnUnregisterComplete)( | ||
481 | __in HRESULT hrStatus | ||
482 | ) = 0; | ||
483 | |||
484 | // OnApplyComplete - called after the plan has been applied. | ||
485 | // | ||
486 | STDMETHOD(OnApplyComplete)( | ||
487 | __in HRESULT hrStatus, | ||
488 | __in BOOTSTRAPPER_APPLY_RESTART restart, | ||
489 | __in BOOTSTRAPPER_APPLYCOMPLETE_ACTION recommendation, | ||
490 | __inout BOOTSTRAPPER_APPLYCOMPLETE_ACTION* pAction | ||
491 | ) = 0; | ||
492 | |||
493 | // OnLaunchApprovedExeBegin - called before trying to launch the preapproved executable. | ||
494 | // | ||
495 | STDMETHOD(OnLaunchApprovedExeBegin)( | ||
496 | __inout BOOL* pfCancel | ||
497 | ) = 0; | ||
498 | |||
499 | // OnLaunchApprovedExeComplete - called after trying to launch the preapproved executable. | ||
500 | // | ||
501 | STDMETHOD(OnLaunchApprovedExeComplete)( | ||
502 | __in HRESULT hrStatus, | ||
503 | __in DWORD dwProcessId | ||
504 | ) = 0; | ||
505 | |||
506 | // BAProc - The PFN_BOOTSTRAPPER_APPLICATION_PROC can call this method to give the BA raw access to the callback from the engine. | ||
507 | // This might be used to help the BA support more than one version of the engine. | ||
508 | STDMETHOD(BAProc)( | ||
509 | __in BOOTSTRAPPER_APPLICATION_MESSAGE message, | ||
510 | __in const LPVOID pvArgs, | ||
511 | __inout LPVOID pvResults, | ||
512 | __in_opt LPVOID pvContext | ||
513 | ) = 0; | ||
514 | |||
515 | // BAProcFallback - The PFN_BOOTSTRAPPER_APPLICATION_PROC can call this method | ||
516 | // to give the BA the ability to use default behavior | ||
517 | // and then forward the message to extensions. | ||
518 | STDMETHOD_(void, BAProcFallback)( | ||
519 | __in BOOTSTRAPPER_APPLICATION_MESSAGE message, | ||
520 | __in const LPVOID pvArgs, | ||
521 | __inout LPVOID pvResults, | ||
522 | __inout HRESULT* phr, | ||
523 | __in_opt LPVOID pvContext | ||
524 | ) = 0; | ||
525 | }; | ||
diff --git a/src/balutil/inc/IBootstrapperEngine.h b/src/balutil/inc/IBootstrapperEngine.h new file mode 100644 index 00000000..3fe3d401 --- /dev/null +++ b/src/balutil/inc/IBootstrapperEngine.h | |||
@@ -0,0 +1,128 @@ | |||
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 | DECLARE_INTERFACE_IID_(IBootstrapperEngine, IUnknown, "6480D616-27A0-44D7-905B-81512C29C2FB") | ||
6 | { | ||
7 | STDMETHOD(GetPackageCount)( | ||
8 | __out DWORD* pcPackages | ||
9 | ) = 0; | ||
10 | |||
11 | STDMETHOD(GetVariableNumeric)( | ||
12 | __in_z LPCWSTR wzVariable, | ||
13 | __out LONGLONG* pllValue | ||
14 | ) = 0; | ||
15 | |||
16 | STDMETHOD(GetVariableString)( | ||
17 | __in_z LPCWSTR wzVariable, | ||
18 | __out_ecount_opt(*pcchValue) LPWSTR wzValue, | ||
19 | __inout DWORD* pcchValue | ||
20 | ) = 0; | ||
21 | |||
22 | STDMETHOD(GetVariableVersion)( | ||
23 | __in_z LPCWSTR wzVariable, | ||
24 | __out DWORD64* pqwValue | ||
25 | ) = 0; | ||
26 | |||
27 | STDMETHOD(FormatString)( | ||
28 | __in_z LPCWSTR wzIn, | ||
29 | __out_ecount_opt(*pcchOut) LPWSTR wzOut, | ||
30 | __inout DWORD* pcchOut | ||
31 | ) = 0; | ||
32 | |||
33 | STDMETHOD(EscapeString)( | ||
34 | __in_z LPCWSTR wzIn, | ||
35 | __out_ecount_opt(*pcchOut) LPWSTR wzOut, | ||
36 | __inout DWORD* pcchOut | ||
37 | ) = 0; | ||
38 | |||
39 | STDMETHOD(EvaluateCondition)( | ||
40 | __in_z LPCWSTR wzCondition, | ||
41 | __out BOOL* pf | ||
42 | ) = 0; | ||
43 | |||
44 | STDMETHOD(Log)( | ||
45 | __in BOOTSTRAPPER_LOG_LEVEL level, | ||
46 | __in_z LPCWSTR wzMessage | ||
47 | ) = 0; | ||
48 | |||
49 | STDMETHOD(SendEmbeddedError)( | ||
50 | __in DWORD dwErrorCode, | ||
51 | __in_z_opt LPCWSTR wzMessage, | ||
52 | __in DWORD dwUIHint, | ||
53 | __out int* pnResult | ||
54 | ) = 0; | ||
55 | |||
56 | STDMETHOD(SendEmbeddedProgress)( | ||
57 | __in DWORD dwProgressPercentage, | ||
58 | __in DWORD dwOverallProgressPercentage, | ||
59 | __out int* pnResult | ||
60 | ) = 0; | ||
61 | |||
62 | STDMETHOD(SetUpdate)( | ||
63 | __in_z_opt LPCWSTR wzLocalSource, | ||
64 | __in_z_opt LPCWSTR wzDownloadSource, | ||
65 | __in DWORD64 qwSize, | ||
66 | __in BOOTSTRAPPER_UPDATE_HASH_TYPE hashType, | ||
67 | __in_bcount_opt(cbHash) BYTE* rgbHash, | ||
68 | __in DWORD cbHash | ||
69 | ) = 0; | ||
70 | |||
71 | STDMETHOD(SetLocalSource)( | ||
72 | __in_z LPCWSTR wzPackageOrContainerId, | ||
73 | __in_z_opt LPCWSTR wzPayloadId, | ||
74 | __in_z LPCWSTR wzPath | ||
75 | ) = 0; | ||
76 | |||
77 | STDMETHOD(SetDownloadSource)( | ||
78 | __in_z LPCWSTR wzPackageOrContainerId, | ||
79 | __in_z_opt LPCWSTR wzPayloadId, | ||
80 | __in_z LPCWSTR wzUrl, | ||
81 | __in_z_opt LPCWSTR wzUser, | ||
82 | __in_z_opt LPCWSTR wzPassword | ||
83 | ) = 0; | ||
84 | |||
85 | STDMETHOD(SetVariableNumeric)( | ||
86 | __in_z LPCWSTR wzVariable, | ||
87 | __in LONGLONG llValue | ||
88 | ) = 0; | ||
89 | |||
90 | STDMETHOD(SetVariableString)( | ||
91 | __in_z LPCWSTR wzVariable, | ||
92 | __in_z_opt LPCWSTR wzValue | ||
93 | ) = 0; | ||
94 | |||
95 | STDMETHOD(SetVariableVersion)( | ||
96 | __in_z LPCWSTR wzVariable, | ||
97 | __in DWORD64 qwValue | ||
98 | ) = 0; | ||
99 | |||
100 | STDMETHOD(CloseSplashScreen)() = 0; | ||
101 | |||
102 | STDMETHOD(Detect)( | ||
103 | __in_opt HWND hwndParent = NULL | ||
104 | ) = 0; | ||
105 | |||
106 | STDMETHOD(Plan)( | ||
107 | __in BOOTSTRAPPER_ACTION action | ||
108 | ) = 0; | ||
109 | |||
110 | STDMETHOD(Elevate)( | ||
111 | __in_opt HWND hwndParent | ||
112 | ) = 0; | ||
113 | |||
114 | STDMETHOD(Apply)( | ||
115 | __in_opt HWND hwndParent | ||
116 | ) = 0; | ||
117 | |||
118 | STDMETHOD(Quit)( | ||
119 | __in DWORD dwExitCode | ||
120 | ) = 0; | ||
121 | |||
122 | STDMETHOD(LaunchApprovedExe)( | ||
123 | __in_opt HWND hwndParent, | ||
124 | __in_z LPCWSTR wzApprovedExeForElevationId, | ||
125 | __in_z_opt LPCWSTR wzArguments, | ||
126 | __in DWORD dwWaitForInputIdleTimeout | ||
127 | ) = 0; | ||
128 | }; | ||