diff options
author | Sean Hall <r.sean.hall@gmail.com> | 2022-03-18 20:15:33 -0500 |
---|---|---|
committer | Sean Hall <r.sean.hall@gmail.com> | 2022-03-19 12:07:32 -0500 |
commit | fb54576f1d05e82ba47cd718c4c4f8b3bad624c9 (patch) | |
tree | b7d6b30bd3c9294b74874c1a48b20a8da8869a69 /src/api/burn/WixToolset.Mba.Core/BootstrapperApplication.cs | |
parent | 581c320e04949300d6c3bee71fb5fc1a557f9263 (diff) | |
download | wix-fb54576f1d05e82ba47cd718c4c4f8b3bad624c9.tar.gz wix-fb54576f1d05e82ba47cd718c4c4f8b3bad624c9.tar.bz2 wix-fb54576f1d05e82ba47cd718c4c4f8b3bad624c9.zip |
Give BA process id and option to wait for cancelled process to exit.
Diffstat (limited to 'src/api/burn/WixToolset.Mba.Core/BootstrapperApplication.cs')
-rw-r--r-- | src/api/burn/WixToolset.Mba.Core/BootstrapperApplication.cs | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/api/burn/WixToolset.Mba.Core/BootstrapperApplication.cs b/src/api/burn/WixToolset.Mba.Core/BootstrapperApplication.cs index 8a2e0e93..5ed064fa 100644 --- a/src/api/burn/WixToolset.Mba.Core/BootstrapperApplication.cs +++ b/src/api/burn/WixToolset.Mba.Core/BootstrapperApplication.cs | |||
@@ -280,6 +280,9 @@ namespace WixToolset.Mba.Core | |||
280 | /// <inheritdoc/> | 280 | /// <inheritdoc/> |
281 | public event EventHandler<PlanRestoreRelatedBundleEventArgs> PlanRestoreRelatedBundle; | 281 | public event EventHandler<PlanRestoreRelatedBundleEventArgs> PlanRestoreRelatedBundle; |
282 | 282 | ||
283 | /// <inheritdoc/> | ||
284 | public event EventHandler<ExecuteProcessCancelEventArgs> ExecuteProcessCancel; | ||
285 | |||
283 | /// <summary> | 286 | /// <summary> |
284 | /// Entry point that is called when the bootstrapper application is ready to run. | 287 | /// Entry point that is called when the bootstrapper application is ready to run. |
285 | /// </summary> | 288 | /// </summary> |
@@ -1369,6 +1372,19 @@ namespace WixToolset.Mba.Core | |||
1369 | } | 1372 | } |
1370 | } | 1373 | } |
1371 | 1374 | ||
1375 | /// <summary> | ||
1376 | /// Called by the engine, raises the <see cref="ExecuteProcessCancel"/> event. | ||
1377 | /// </summary> | ||
1378 | /// <param name="args">Additional arguments for this event.</param> | ||
1379 | protected virtual void OnExecuteProcessCancel(ExecuteProcessCancelEventArgs args) | ||
1380 | { | ||
1381 | EventHandler<ExecuteProcessCancelEventArgs> handler = this.ExecuteProcessCancel; | ||
1382 | if (null != handler) | ||
1383 | { | ||
1384 | handler(this, args); | ||
1385 | } | ||
1386 | } | ||
1387 | |||
1372 | #region IBootstrapperApplication Members | 1388 | #region IBootstrapperApplication Members |
1373 | 1389 | ||
1374 | int IBootstrapperApplication.BAProc(int message, IntPtr pvArgs, IntPtr pvResults, IntPtr pvContext) | 1390 | int IBootstrapperApplication.BAProc(int message, IntPtr pvArgs, IntPtr pvResults, IntPtr pvContext) |
@@ -2119,6 +2135,15 @@ namespace WixToolset.Mba.Core | |||
2119 | return args.HResult; | 2135 | return args.HResult; |
2120 | } | 2136 | } |
2121 | 2137 | ||
2138 | int IBootstrapperApplication.OnExecuteProcessCancel(string wzPackageId, int processId, BOOTSTRAPPER_EXECUTEPROCESSCANCEL_ACTION recommendation, ref BOOTSTRAPPER_EXECUTEPROCESSCANCEL_ACTION pAction) | ||
2139 | { | ||
2140 | ExecuteProcessCancelEventArgs args = new ExecuteProcessCancelEventArgs(wzPackageId, processId, recommendation, pAction); | ||
2141 | this.OnExecuteProcessCancel(args); | ||
2142 | |||
2143 | pAction = args.Action; | ||
2144 | return args.HResult; | ||
2145 | } | ||
2146 | |||
2122 | #endregion | 2147 | #endregion |
2123 | } | 2148 | } |
2124 | } | 2149 | } |