diff options
| author | Sean Hall <r.sean.hall@gmail.com> | 2022-05-03 15:30:50 -0500 |
|---|---|---|
| committer | Sean Hall <r.sean.hall@gmail.com> | 2022-05-04 10:05:21 -0500 |
| commit | 29f7e00586412163a20e298fbf84505f8a917425 (patch) | |
| tree | 30257a3544f6982ded159443ebed0eb933f11a51 /src/api | |
| parent | 41d2c12d60ee84cefc26ec99abb328701883c8f5 (diff) | |
| download | wix-29f7e00586412163a20e298fbf84505f8a917425.tar.gz wix-29f7e00586412163a20e298fbf84505f8a917425.tar.bz2 wix-29f7e00586412163a20e298fbf84505f8a917425.zip | |
Only block shutdown during Apply.
Diffstat (limited to 'src/api')
11 files changed, 0 insertions, 153 deletions
diff --git a/src/api/burn/WixToolset.BootstrapperCore.Native/inc/BootstrapperApplication.h b/src/api/burn/WixToolset.BootstrapperCore.Native/inc/BootstrapperApplication.h index f0b5dad4..228cb6ff 100644 --- a/src/api/burn/WixToolset.BootstrapperCore.Native/inc/BootstrapperApplication.h +++ b/src/api/burn/WixToolset.BootstrapperCore.Native/inc/BootstrapperApplication.h | |||
| @@ -149,7 +149,6 @@ enum BOOTSTRAPPER_APPLICATION_MESSAGE | |||
| 149 | BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANCOMPLETE, | 149 | BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANCOMPLETE, |
| 150 | BOOTSTRAPPER_APPLICATION_MESSAGE_ONSTARTUP, | 150 | BOOTSTRAPPER_APPLICATION_MESSAGE_ONSTARTUP, |
| 151 | BOOTSTRAPPER_APPLICATION_MESSAGE_ONSHUTDOWN, | 151 | BOOTSTRAPPER_APPLICATION_MESSAGE_ONSHUTDOWN, |
| 152 | BOOTSTRAPPER_APPLICATION_MESSAGE_ONSYSTEMSHUTDOWN, | ||
| 153 | BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTFORWARDCOMPATIBLEBUNDLE, | 152 | BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTFORWARDCOMPATIBLEBUNDLE, |
| 154 | BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTUPDATEBEGIN, | 153 | BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTUPDATEBEGIN, |
| 155 | BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTUPDATE, | 154 | BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTUPDATE, |
| @@ -1463,18 +1462,6 @@ struct BA_ONSYSTEMRESTOREPOINTCOMPLETE_RESULTS | |||
| 1463 | DWORD cbSize; | 1462 | DWORD cbSize; |
| 1464 | }; | 1463 | }; |
| 1465 | 1464 | ||
| 1466 | struct BA_ONSYSTEMSHUTDOWN_ARGS | ||
| 1467 | { | ||
| 1468 | DWORD cbSize; | ||
| 1469 | DWORD dwEndSession; | ||
| 1470 | }; | ||
| 1471 | |||
| 1472 | struct BA_ONSYSTEMSHUTDOWN_RESULTS | ||
| 1473 | { | ||
| 1474 | DWORD cbSize; | ||
| 1475 | BOOL fCancel; | ||
| 1476 | }; | ||
| 1477 | |||
| 1478 | struct BA_ONUNREGISTERBEGIN_ARGS | 1465 | struct BA_ONUNREGISTERBEGIN_ARGS |
| 1479 | { | 1466 | { |
| 1480 | DWORD cbSize; | 1467 | DWORD cbSize; |
diff --git a/src/api/burn/WixToolset.Mba.Core/BootstrapperApplication.cs b/src/api/burn/WixToolset.Mba.Core/BootstrapperApplication.cs index 6738a4a6..bb34a33e 100644 --- a/src/api/burn/WixToolset.Mba.Core/BootstrapperApplication.cs +++ b/src/api/burn/WixToolset.Mba.Core/BootstrapperApplication.cs | |||
| @@ -22,15 +22,12 @@ namespace WixToolset.Mba.Core | |||
| 22 | /// </summary> | 22 | /// </summary> |
| 23 | protected readonly IEngine engine; | 23 | protected readonly IEngine engine; |
| 24 | 24 | ||
| 25 | private bool applying; | ||
| 26 | |||
| 27 | /// <summary> | 25 | /// <summary> |
| 28 | /// Creates a new instance of the <see cref="BootstrapperApplication"/> class. | 26 | /// Creates a new instance of the <see cref="BootstrapperApplication"/> class. |
| 29 | /// </summary> | 27 | /// </summary> |
| 30 | protected BootstrapperApplication(IEngine engine) | 28 | protected BootstrapperApplication(IEngine engine) |
| 31 | { | 29 | { |
| 32 | this.engine = engine; | 30 | this.engine = engine; |
| 33 | this.applying = false; | ||
| 34 | this.asyncExecution = true; | 31 | this.asyncExecution = true; |
| 35 | } | 32 | } |
| 36 | 33 | ||
| @@ -41,9 +38,6 @@ namespace WixToolset.Mba.Core | |||
| 41 | public event EventHandler<ShutdownEventArgs> Shutdown; | 38 | public event EventHandler<ShutdownEventArgs> Shutdown; |
| 42 | 39 | ||
| 43 | /// <inheritdoc/> | 40 | /// <inheritdoc/> |
| 44 | public event EventHandler<SystemShutdownEventArgs> SystemShutdown; | ||
| 45 | |||
| 46 | /// <inheritdoc/> | ||
| 47 | public event EventHandler<DetectBeginEventArgs> DetectBegin; | 41 | public event EventHandler<DetectBeginEventArgs> DetectBegin; |
| 48 | 42 | ||
| 49 | /// <inheritdoc/> | 43 | /// <inheritdoc/> |
| @@ -332,25 +326,6 @@ namespace WixToolset.Mba.Core | |||
| 332 | } | 326 | } |
| 333 | 327 | ||
| 334 | /// <summary> | 328 | /// <summary> |
| 335 | /// Called by the engine, raises the <see cref="SystemShutdown"/> event. | ||
| 336 | /// </summary> | ||
| 337 | /// <param name="args">Additional arguments for this event.</param> | ||
| 338 | protected virtual void OnSystemShutdown(SystemShutdownEventArgs args) | ||
| 339 | { | ||
| 340 | EventHandler<SystemShutdownEventArgs> handler = this.SystemShutdown; | ||
| 341 | if (null != handler) | ||
| 342 | { | ||
| 343 | handler(this, args); | ||
| 344 | } | ||
| 345 | else if (null != args) | ||
| 346 | { | ||
| 347 | // Allow requests to shut down when critical or not applying. | ||
| 348 | bool critical = EndSessionReasons.Critical == (EndSessionReasons.Critical & args.Reasons); | ||
| 349 | args.Cancel = !critical && this.applying; | ||
| 350 | } | ||
| 351 | } | ||
| 352 | |||
| 353 | /// <summary> | ||
| 354 | /// Called by the engine, raises the <see cref="DetectBegin"/> event. | 329 | /// Called by the engine, raises the <see cref="DetectBegin"/> event. |
| 355 | /// </summary> | 330 | /// </summary> |
| 356 | /// <param name="args">Additional arguments for this event.</param> | 331 | /// <param name="args">Additional arguments for this event.</param> |
| @@ -1433,15 +1408,6 @@ namespace WixToolset.Mba.Core | |||
| 1433 | return args.HResult; | 1408 | return args.HResult; |
| 1434 | } | 1409 | } |
| 1435 | 1410 | ||
| 1436 | int IBootstrapperApplication.OnSystemShutdown(EndSessionReasons dwEndSession, ref bool fCancel) | ||
| 1437 | { | ||
| 1438 | SystemShutdownEventArgs args = new SystemShutdownEventArgs(dwEndSession, fCancel); | ||
| 1439 | this.OnSystemShutdown(args); | ||
| 1440 | |||
| 1441 | fCancel = args.Cancel; | ||
| 1442 | return args.HResult; | ||
| 1443 | } | ||
| 1444 | |||
| 1445 | int IBootstrapperApplication.OnDetectBegin(bool fCached, RegistrationType registrationType, int cPackages, ref bool fCancel) | 1411 | int IBootstrapperApplication.OnDetectBegin(bool fCached, RegistrationType registrationType, int cPackages, ref bool fCancel) |
| 1446 | { | 1412 | { |
| 1447 | DetectBeginEventArgs args = new DetectBeginEventArgs(fCached, registrationType, cPackages, fCancel); | 1413 | DetectBeginEventArgs args = new DetectBeginEventArgs(fCached, registrationType, cPackages, fCancel); |
| @@ -1693,8 +1659,6 @@ namespace WixToolset.Mba.Core | |||
| 1693 | 1659 | ||
| 1694 | int IBootstrapperApplication.OnApplyBegin(int dwPhaseCount, ref bool fCancel) | 1660 | int IBootstrapperApplication.OnApplyBegin(int dwPhaseCount, ref bool fCancel) |
| 1695 | { | 1661 | { |
| 1696 | this.applying = true; | ||
| 1697 | |||
| 1698 | ApplyBeginEventArgs args = new ApplyBeginEventArgs(dwPhaseCount, fCancel); | 1662 | ApplyBeginEventArgs args = new ApplyBeginEventArgs(dwPhaseCount, fCancel); |
| 1699 | this.OnApplyBegin(args); | 1663 | this.OnApplyBegin(args); |
| 1700 | 1664 | ||
| @@ -1949,8 +1913,6 @@ namespace WixToolset.Mba.Core | |||
| 1949 | ApplyCompleteEventArgs args = new ApplyCompleteEventArgs(hrStatus, restart, recommendation, pAction); | 1913 | ApplyCompleteEventArgs args = new ApplyCompleteEventArgs(hrStatus, restart, recommendation, pAction); |
| 1950 | this.OnApplyComplete(args); | 1914 | this.OnApplyComplete(args); |
| 1951 | 1915 | ||
| 1952 | this.applying = false; | ||
| 1953 | |||
| 1954 | pAction = args.Action; | 1916 | pAction = args.Action; |
| 1955 | return args.HResult; | 1917 | return args.HResult; |
| 1956 | } | 1918 | } |
diff --git a/src/api/burn/WixToolset.Mba.Core/EventArgs.cs b/src/api/burn/WixToolset.Mba.Core/EventArgs.cs index d79ac402..be113700 100644 --- a/src/api/burn/WixToolset.Mba.Core/EventArgs.cs +++ b/src/api/burn/WixToolset.Mba.Core/EventArgs.cs | |||
| @@ -217,32 +217,6 @@ namespace WixToolset.Mba.Core | |||
| 217 | } | 217 | } |
| 218 | 218 | ||
| 219 | /// <summary> | 219 | /// <summary> |
| 220 | /// Event arguments for <see cref="IDefaultBootstrapperApplication.SystemShutdown"/> | ||
| 221 | /// </summary> | ||
| 222 | [Serializable] | ||
| 223 | public class SystemShutdownEventArgs : CancellableHResultEventArgs | ||
| 224 | { | ||
| 225 | /// <summary /> | ||
| 226 | public SystemShutdownEventArgs(EndSessionReasons reasons, bool cancelRecommendation) | ||
| 227 | : base(cancelRecommendation) | ||
| 228 | { | ||
| 229 | this.Reasons = reasons; | ||
| 230 | } | ||
| 231 | |||
| 232 | /// <summary> | ||
| 233 | /// Gets the reason the application is requested to close or being closed. | ||
| 234 | /// </summary> | ||
| 235 | /// <remarks> | ||
| 236 | /// <para>To prevent shutting down or logging off, set <see cref="CancellableHResultEventArgs.Cancel"/> to | ||
| 237 | /// true; otherwise, set it to false.</para> | ||
| 238 | /// <para>If <see cref="SystemShutdownEventArgs.Reasons"/> contains <see cref="EndSessionReasons.Critical"/> | ||
| 239 | /// the bootstrapper cannot prevent the shutdown and only has a few seconds to save state or perform any other | ||
| 240 | /// critical operations before being closed by the operating system.</para> | ||
| 241 | /// </remarks> | ||
| 242 | public EndSessionReasons Reasons { get; private set; } | ||
| 243 | } | ||
| 244 | |||
| 245 | /// <summary> | ||
| 246 | /// Event arguments for <see cref="IDefaultBootstrapperApplication.DetectBegin"/> | 220 | /// Event arguments for <see cref="IDefaultBootstrapperApplication.DetectBegin"/> |
| 247 | /// </summary> | 221 | /// </summary> |
| 248 | [Serializable] | 222 | [Serializable] |
diff --git a/src/api/burn/WixToolset.Mba.Core/IBootstrapperApplication.cs b/src/api/burn/WixToolset.Mba.Core/IBootstrapperApplication.cs index 2877d4de..8ce99808 100644 --- a/src/api/burn/WixToolset.Mba.Core/IBootstrapperApplication.cs +++ b/src/api/burn/WixToolset.Mba.Core/IBootstrapperApplication.cs | |||
| @@ -51,19 +51,6 @@ namespace WixToolset.Mba.Core | |||
| 51 | int OnShutdown(ref BOOTSTRAPPER_SHUTDOWN_ACTION action); | 51 | int OnShutdown(ref BOOTSTRAPPER_SHUTDOWN_ACTION action); |
| 52 | 52 | ||
| 53 | /// <summary> | 53 | /// <summary> |
| 54 | /// See <see cref="IDefaultBootstrapperApplication.SystemShutdown"/>. | ||
| 55 | /// </summary> | ||
| 56 | /// <param name="dwEndSession"></param> | ||
| 57 | /// <param name="fCancel"></param> | ||
| 58 | /// <returns></returns> | ||
| 59 | [PreserveSig] | ||
| 60 | [return: MarshalAs(UnmanagedType.I4)] | ||
| 61 | int OnSystemShutdown( | ||
| 62 | [MarshalAs(UnmanagedType.U4)] EndSessionReasons dwEndSession, | ||
| 63 | [MarshalAs(UnmanagedType.Bool)] ref bool fCancel | ||
| 64 | ); | ||
| 65 | |||
| 66 | /// <summary> | ||
| 67 | /// See <see cref="IDefaultBootstrapperApplication.DetectBegin"/>. | 54 | /// See <see cref="IDefaultBootstrapperApplication.DetectBegin"/>. |
| 68 | /// </summary> | 55 | /// </summary> |
| 69 | [PreserveSig] | 56 | [PreserveSig] |
diff --git a/src/api/burn/WixToolset.Mba.Core/IDefaultBootstrapperApplication.cs b/src/api/burn/WixToolset.Mba.Core/IDefaultBootstrapperApplication.cs index 77089e83..2535f756 100644 --- a/src/api/burn/WixToolset.Mba.Core/IDefaultBootstrapperApplication.cs +++ b/src/api/burn/WixToolset.Mba.Core/IDefaultBootstrapperApplication.cs | |||
| @@ -419,22 +419,6 @@ namespace WixToolset.Mba.Core | |||
| 419 | event EventHandler<SystemRestorePointCompleteEventArgs> SystemRestorePointComplete; | 419 | event EventHandler<SystemRestorePointCompleteEventArgs> SystemRestorePointComplete; |
| 420 | 420 | ||
| 421 | /// <summary> | 421 | /// <summary> |
| 422 | /// Fired when the system is shutting down or user is logging off. | ||
| 423 | /// </summary> | ||
| 424 | /// <remarks> | ||
| 425 | /// <para>To prevent shutting down or logging off, set <see cref="CancellableHResultEventArgs.Cancel"/> to | ||
| 426 | /// true; otherwise, set it to false.</para> | ||
| 427 | /// <para>By default setup will prevent shutting down or logging off between | ||
| 428 | /// <see cref="IDefaultBootstrapperApplication.ApplyBegin"/> and <see cref="IDefaultBootstrapperApplication.ApplyComplete"/>. | ||
| 429 | /// Derivatives can change this behavior by handling <see cref="IDefaultBootstrapperApplication.SystemShutdown"/>.</para> | ||
| 430 | /// <para>If <see cref="SystemShutdownEventArgs.Reasons"/> contains <see cref="EndSessionReasons.Critical"/> | ||
| 431 | /// the bootstrapper cannot prevent the shutdown and only has a few seconds to save state or perform any other | ||
| 432 | /// critical operations before being closed by the operating system.</para> | ||
| 433 | /// <para>This event may be fired on a different thread.</para> | ||
| 434 | /// </remarks> | ||
| 435 | event EventHandler<SystemShutdownEventArgs> SystemShutdown; | ||
| 436 | |||
| 437 | /// <summary> | ||
| 438 | /// Fired when the engine unregisters the bundle. | 422 | /// Fired when the engine unregisters the bundle. |
| 439 | /// </summary> | 423 | /// </summary> |
| 440 | event EventHandler<UnregisterBeginEventArgs> UnregisterBegin; | 424 | event EventHandler<UnregisterBeginEventArgs> UnregisterBegin; |
diff --git a/src/api/burn/balutil/inc/BAFunctions.h b/src/api/burn/balutil/inc/BAFunctions.h index 9be3f62f..c1057ab6 100644 --- a/src/api/burn/balutil/inc/BAFunctions.h +++ b/src/api/burn/balutil/inc/BAFunctions.h | |||
| @@ -15,7 +15,6 @@ enum BA_FUNCTIONS_MESSAGE | |||
| 15 | BA_FUNCTIONS_MESSAGE_ONPLANCOMPLETE = BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANCOMPLETE, | 15 | BA_FUNCTIONS_MESSAGE_ONPLANCOMPLETE = BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANCOMPLETE, |
| 16 | BA_FUNCTIONS_MESSAGE_ONSTARTUP = BOOTSTRAPPER_APPLICATION_MESSAGE_ONSTARTUP, | 16 | BA_FUNCTIONS_MESSAGE_ONSTARTUP = BOOTSTRAPPER_APPLICATION_MESSAGE_ONSTARTUP, |
| 17 | BA_FUNCTIONS_MESSAGE_ONSHUTDOWN = BOOTSTRAPPER_APPLICATION_MESSAGE_ONSHUTDOWN, | 17 | BA_FUNCTIONS_MESSAGE_ONSHUTDOWN = BOOTSTRAPPER_APPLICATION_MESSAGE_ONSHUTDOWN, |
| 18 | BA_FUNCTIONS_MESSAGE_ONSYSTEMSHUTDOWN = BOOTSTRAPPER_APPLICATION_MESSAGE_ONSYSTEMSHUTDOWN, | ||
| 19 | BA_FUNCTIONS_MESSAGE_ONDETECTFORWARDCOMPATIBLEBUNDLE = BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTFORWARDCOMPATIBLEBUNDLE, | 18 | BA_FUNCTIONS_MESSAGE_ONDETECTFORWARDCOMPATIBLEBUNDLE = BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTFORWARDCOMPATIBLEBUNDLE, |
| 20 | BA_FUNCTIONS_MESSAGE_ONDETECTUPDATEBEGIN = BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTUPDATEBEGIN, | 19 | BA_FUNCTIONS_MESSAGE_ONDETECTUPDATEBEGIN = BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTUPDATEBEGIN, |
| 21 | BA_FUNCTIONS_MESSAGE_ONDETECTUPDATE = BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTUPDATE, | 20 | BA_FUNCTIONS_MESSAGE_ONDETECTUPDATE = BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTUPDATE, |
diff --git a/src/api/burn/balutil/inc/BalBaseBAFunctions.h b/src/api/burn/balutil/inc/BalBaseBAFunctions.h index 9ff58d2b..ca070553 100644 --- a/src/api/burn/balutil/inc/BalBaseBAFunctions.h +++ b/src/api/burn/balutil/inc/BalBaseBAFunctions.h | |||
| @@ -98,14 +98,6 @@ public: // IBootstrapperApplication | |||
| 98 | return S_OK; | 98 | return S_OK; |
| 99 | } | 99 | } |
| 100 | 100 | ||
| 101 | virtual STDMETHODIMP OnSystemShutdown( | ||
| 102 | __in DWORD /*dwEndSession*/, | ||
| 103 | __inout BOOL* /*pfCancel*/ | ||
| 104 | ) | ||
| 105 | { | ||
| 106 | return S_OK; | ||
| 107 | } | ||
| 108 | |||
| 109 | virtual STDMETHODIMP OnDetectBegin( | 101 | virtual STDMETHODIMP OnDetectBegin( |
| 110 | __in BOOL /*fCached*/, | 102 | __in BOOL /*fCached*/, |
| 111 | __in BOOTSTRAPPER_REGISTRATION_TYPE /*registrationType*/, | 103 | __in BOOTSTRAPPER_REGISTRATION_TYPE /*registrationType*/, |
diff --git a/src/api/burn/balutil/inc/BalBaseBAFunctionsProc.h b/src/api/burn/balutil/inc/BalBaseBAFunctionsProc.h index 4564ad0c..ff92717d 100644 --- a/src/api/burn/balutil/inc/BalBaseBAFunctionsProc.h +++ b/src/api/burn/balutil/inc/BalBaseBAFunctionsProc.h | |||
| @@ -86,7 +86,6 @@ static HRESULT WINAPI BalBaseBAFunctionsProc( | |||
| 86 | case BA_FUNCTIONS_MESSAGE_ONPLANCOMPLETE: | 86 | case BA_FUNCTIONS_MESSAGE_ONPLANCOMPLETE: |
| 87 | case BA_FUNCTIONS_MESSAGE_ONSTARTUP: | 87 | case BA_FUNCTIONS_MESSAGE_ONSTARTUP: |
| 88 | case BA_FUNCTIONS_MESSAGE_ONSHUTDOWN: | 88 | case BA_FUNCTIONS_MESSAGE_ONSHUTDOWN: |
| 89 | case BA_FUNCTIONS_MESSAGE_ONSYSTEMSHUTDOWN: | ||
| 90 | case BA_FUNCTIONS_MESSAGE_ONDETECTFORWARDCOMPATIBLEBUNDLE: | 89 | case BA_FUNCTIONS_MESSAGE_ONDETECTFORWARDCOMPATIBLEBUNDLE: |
| 91 | case BA_FUNCTIONS_MESSAGE_ONDETECTUPDATEBEGIN: | 90 | case BA_FUNCTIONS_MESSAGE_ONDETECTUPDATEBEGIN: |
| 92 | case BA_FUNCTIONS_MESSAGE_ONDETECTUPDATE: | 91 | case BA_FUNCTIONS_MESSAGE_ONDETECTUPDATE: |
diff --git a/src/api/burn/balutil/inc/BalBaseBootstrapperApplication.h b/src/api/burn/balutil/inc/BalBaseBootstrapperApplication.h index 2e848df7..fc9c4dd7 100644 --- a/src/api/burn/balutil/inc/BalBaseBootstrapperApplication.h +++ b/src/api/burn/balutil/inc/BalBaseBootstrapperApplication.h | |||
| @@ -94,19 +94,6 @@ public: // IBootstrapperApplication | |||
| 94 | return S_OK; | 94 | return S_OK; |
| 95 | } | 95 | } |
| 96 | 96 | ||
| 97 | virtual STDMETHODIMP OnSystemShutdown( | ||
| 98 | __in DWORD dwEndSession, | ||
| 99 | __inout BOOL* pfCancel | ||
| 100 | ) | ||
| 101 | { | ||
| 102 | HRESULT hr = S_OK; | ||
| 103 | |||
| 104 | // Allow requests to shut down when critical or not applying. | ||
| 105 | *pfCancel = !(ENDSESSION_CRITICAL & dwEndSession || !m_fApplying); | ||
| 106 | |||
| 107 | return hr; | ||
| 108 | } | ||
| 109 | |||
| 110 | virtual STDMETHODIMP OnDetectBegin( | 97 | virtual STDMETHODIMP OnDetectBegin( |
| 111 | __in BOOL /*fCached*/, | 98 | __in BOOL /*fCached*/, |
| 112 | __in BOOTSTRAPPER_REGISTRATION_TYPE /*registrationType*/, | 99 | __in BOOTSTRAPPER_REGISTRATION_TYPE /*registrationType*/, |
| @@ -406,8 +393,6 @@ public: // IBootstrapperApplication | |||
| 406 | __inout BOOL* pfCancel | 393 | __inout BOOL* pfCancel |
| 407 | ) | 394 | ) |
| 408 | { | 395 | { |
| 409 | m_fApplying = TRUE; | ||
| 410 | |||
| 411 | m_dwProgressPercentage = 0; | 396 | m_dwProgressPercentage = 0; |
| 412 | m_dwOverallProgressPercentage = 0; | 397 | m_dwOverallProgressPercentage = 0; |
| 413 | 398 | ||
| @@ -859,8 +844,6 @@ public: // IBootstrapperApplication | |||
| 859 | *pAction = BOOTSTRAPPER_APPLYCOMPLETE_ACTION_RESTART; | 844 | *pAction = BOOTSTRAPPER_APPLYCOMPLETE_ACTION_RESTART; |
| 860 | } | 845 | } |
| 861 | 846 | ||
| 862 | m_fApplying = FALSE; | ||
| 863 | |||
| 864 | return hr; | 847 | return hr; |
| 865 | } | 848 | } |
| 866 | 849 | ||
| @@ -1183,7 +1166,6 @@ protected: | |||
| 1183 | ::InitializeCriticalSection(&m_csCanceled); | 1166 | ::InitializeCriticalSection(&m_csCanceled); |
| 1184 | m_fCanceled = FALSE; | 1167 | m_fCanceled = FALSE; |
| 1185 | m_BalInfoCommand = { }; | 1168 | m_BalInfoCommand = { }; |
| 1186 | m_fApplying = FALSE; | ||
| 1187 | m_fRollingBack = FALSE; | 1169 | m_fRollingBack = FALSE; |
| 1188 | 1170 | ||
| 1189 | m_dwProgressPercentage = 0; | 1171 | m_dwProgressPercentage = 0; |
| @@ -1212,7 +1194,6 @@ private: | |||
| 1212 | BOOTSTRAPPER_DISPLAY m_display; | 1194 | BOOTSTRAPPER_DISPLAY m_display; |
| 1213 | IBootstrapperEngine* m_pEngine; | 1195 | IBootstrapperEngine* m_pEngine; |
| 1214 | 1196 | ||
| 1215 | BOOL m_fApplying; | ||
| 1216 | BOOL m_fRollingBack; | 1197 | BOOL m_fRollingBack; |
| 1217 | 1198 | ||
| 1218 | DWORD m_dwProgressPercentage; | 1199 | DWORD m_dwProgressPercentage; |
diff --git a/src/api/burn/balutil/inc/BalBaseBootstrapperApplicationProc.h b/src/api/burn/balutil/inc/BalBaseBootstrapperApplicationProc.h index e35678ad..92243540 100644 --- a/src/api/burn/balutil/inc/BalBaseBootstrapperApplicationProc.h +++ b/src/api/burn/balutil/inc/BalBaseBootstrapperApplicationProc.h | |||
| @@ -63,15 +63,6 @@ static HRESULT BalBaseBAProcOnShutdown( | |||
| 63 | return pBA->OnShutdown(&pResults->action); | 63 | return pBA->OnShutdown(&pResults->action); |
| 64 | } | 64 | } |
| 65 | 65 | ||
| 66 | static HRESULT BalBaseBAProcOnSystemShutdown( | ||
| 67 | __in IBootstrapperApplication* pBA, | ||
| 68 | __in BA_ONSYSTEMSHUTDOWN_ARGS* pArgs, | ||
| 69 | __inout BA_ONSYSTEMSHUTDOWN_RESULTS* pResults | ||
| 70 | ) | ||
| 71 | { | ||
| 72 | return pBA->OnSystemShutdown(pArgs->dwEndSession, &pResults->fCancel); | ||
| 73 | } | ||
| 74 | |||
| 75 | static HRESULT BalBaseBAProcOnDetectForwardCompatibleBundle( | 66 | static HRESULT BalBaseBAProcOnDetectForwardCompatibleBundle( |
| 76 | __in IBootstrapperApplication* pBA, | 67 | __in IBootstrapperApplication* pBA, |
| 77 | __in BA_ONDETECTFORWARDCOMPATIBLEBUNDLE_ARGS* pArgs, | 68 | __in BA_ONDETECTFORWARDCOMPATIBLEBUNDLE_ARGS* pArgs, |
| @@ -803,9 +794,6 @@ static HRESULT WINAPI BalBaseBootstrapperApplicationProc( | |||
| 803 | case BOOTSTRAPPER_APPLICATION_MESSAGE_ONSHUTDOWN: | 794 | case BOOTSTRAPPER_APPLICATION_MESSAGE_ONSHUTDOWN: |
| 804 | hr = BalBaseBAProcOnShutdown(pBA, reinterpret_cast<BA_ONSHUTDOWN_ARGS*>(pvArgs), reinterpret_cast<BA_ONSHUTDOWN_RESULTS*>(pvResults)); | 795 | hr = BalBaseBAProcOnShutdown(pBA, reinterpret_cast<BA_ONSHUTDOWN_ARGS*>(pvArgs), reinterpret_cast<BA_ONSHUTDOWN_RESULTS*>(pvResults)); |
| 805 | break; | 796 | break; |
| 806 | case BOOTSTRAPPER_APPLICATION_MESSAGE_ONSYSTEMSHUTDOWN: | ||
| 807 | hr = BalBaseBAProcOnSystemShutdown(pBA, reinterpret_cast<BA_ONSYSTEMSHUTDOWN_ARGS*>(pvArgs), reinterpret_cast<BA_ONSYSTEMSHUTDOWN_RESULTS*>(pvResults)); | ||
| 808 | break; | ||
| 809 | case BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTFORWARDCOMPATIBLEBUNDLE: | 797 | case BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTFORWARDCOMPATIBLEBUNDLE: |
| 810 | hr = BalBaseBAProcOnDetectForwardCompatibleBundle(pBA, reinterpret_cast<BA_ONDETECTFORWARDCOMPATIBLEBUNDLE_ARGS*>(pvArgs), reinterpret_cast<BA_ONDETECTFORWARDCOMPATIBLEBUNDLE_RESULTS*>(pvResults)); | 798 | hr = BalBaseBAProcOnDetectForwardCompatibleBundle(pBA, reinterpret_cast<BA_ONDETECTFORWARDCOMPATIBLEBUNDLE_ARGS*>(pvArgs), reinterpret_cast<BA_ONDETECTFORWARDCOMPATIBLEBUNDLE_RESULTS*>(pvResults)); |
| 811 | break; | 799 | break; |
diff --git a/src/api/burn/balutil/inc/IBootstrapperApplication.h b/src/api/burn/balutil/inc/IBootstrapperApplication.h index 6eca90fa..382d5aad 100644 --- a/src/api/burn/balutil/inc/IBootstrapperApplication.h +++ b/src/api/burn/balutil/inc/IBootstrapperApplication.h | |||
| @@ -33,12 +33,6 @@ DECLARE_INTERFACE_IID_(IBootstrapperApplication, IUnknown, "53C31D56-49C0-426B-A | |||
| 33 | __inout BOOTSTRAPPER_SHUTDOWN_ACTION* pAction | 33 | __inout BOOTSTRAPPER_SHUTDOWN_ACTION* pAction |
| 34 | ) = 0; | 34 | ) = 0; |
| 35 | 35 | ||
| 36 | // OnSystemShutdown - called when the operating system is instructed to shutdown the machine. | ||
| 37 | STDMETHOD(OnSystemShutdown)( | ||
| 38 | __in DWORD dwEndSession, | ||
| 39 | __inout BOOL* pfCancel | ||
| 40 | ) = 0; | ||
| 41 | |||
| 42 | // OnDetectBegin - called when the engine begins detection. | 36 | // OnDetectBegin - called when the engine begins detection. |
| 43 | STDMETHOD(OnDetectBegin)( | 37 | STDMETHOD(OnDetectBegin)( |
| 44 | __in BOOL fCached, | 38 | __in BOOL fCached, |
