From 5f4829e678c9c5cd5e581b0075cfa4a6b263c66e Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Tue, 2 Mar 2021 15:11:58 -0600 Subject: Integrate OnUnregisterBegin changes in Burn headers. --- src/WixToolset.Mba.Core/BootstrapperApplication.cs | 6 ++--- src/WixToolset.Mba.Core/EventArgs.cs | 28 +++++++++++++++------- .../IBootstrapperApplication.cs | 6 +++-- .../IDefaultBootstrapperApplication.cs | 4 ++-- 4 files changed, 28 insertions(+), 16 deletions(-) (limited to 'src/WixToolset.Mba.Core') diff --git a/src/WixToolset.Mba.Core/BootstrapperApplication.cs b/src/WixToolset.Mba.Core/BootstrapperApplication.cs index 43e69e81..1812c80b 100644 --- a/src/WixToolset.Mba.Core/BootstrapperApplication.cs +++ b/src/WixToolset.Mba.Core/BootstrapperApplication.cs @@ -1529,12 +1529,12 @@ namespace WixToolset.Mba.Core return args.HResult; } - int IBootstrapperApplication.OnUnregisterBegin(ref bool fCancel) + int IBootstrapperApplication.OnUnregisterBegin(bool fKeepRegistration, ref bool fForceKeepRegistration) { - UnregisterBeginEventArgs args = new UnregisterBeginEventArgs(fCancel); + UnregisterBeginEventArgs args = new UnregisterBeginEventArgs(fKeepRegistration, fForceKeepRegistration); this.OnUnregisterBegin(args); - fCancel = args.Cancel; + fForceKeepRegistration = args.ForceKeepRegistration; return args.HResult; } diff --git a/src/WixToolset.Mba.Core/EventArgs.cs b/src/WixToolset.Mba.Core/EventArgs.cs index 953e31ee..56705769 100644 --- a/src/WixToolset.Mba.Core/EventArgs.cs +++ b/src/WixToolset.Mba.Core/EventArgs.cs @@ -1187,31 +1187,41 @@ namespace WixToolset.Mba.Core } /// - /// Additional arguments used when the engine has begun removing the registration for the location and visibility of the bundle. + /// Event arguments for /// [Serializable] - public class UnregisterBeginEventArgs : CancellableHResultEventArgs + public class UnregisterBeginEventArgs : HResultEventArgs { /// - /// Creates a new instance of the class. + /// /// - /// The recommendation from the engine. - public UnregisterBeginEventArgs(bool cancelRecommendation) - : base(cancelRecommendation) + /// + /// + public UnregisterBeginEventArgs(bool keepRegistration, bool forceKeepRegistration) { } + + /// + /// Indicates whether the engine will uninstall the bundle. + /// + public bool ForceKeepRegistration { get; set; } + + /// + /// If is FALSE, then this can be set to TRUE to make the engine keep the bundle installed. + /// + public bool KeepRegistration { get; private set; } } /// - /// Additional arguments used when the engine has completed removing the registration for the location and visibility of the bundle. + /// Event arguments for /// [Serializable] public class UnregisterCompleteEventArgs : StatusEventArgs { /// - /// Creates a new instance of the class. + /// /// - /// The return code of the operation. + /// public UnregisterCompleteEventArgs(int hrStatus) : base(hrStatus) { diff --git a/src/WixToolset.Mba.Core/IBootstrapperApplication.cs b/src/WixToolset.Mba.Core/IBootstrapperApplication.cs index 7ff243d2..4812c038 100644 --- a/src/WixToolset.Mba.Core/IBootstrapperApplication.cs +++ b/src/WixToolset.Mba.Core/IBootstrapperApplication.cs @@ -822,12 +822,14 @@ namespace WixToolset.Mba.Core /// /// See . /// - /// + /// + /// /// [PreserveSig] [return: MarshalAs(UnmanagedType.I4)] int OnUnregisterBegin( - [MarshalAs(UnmanagedType.Bool)] ref bool fCancel + [MarshalAs(UnmanagedType.Bool)] bool fKeepRegistration, + [MarshalAs(UnmanagedType.Bool)] ref bool fForceKeepRegistration ); /// diff --git a/src/WixToolset.Mba.Core/IDefaultBootstrapperApplication.cs b/src/WixToolset.Mba.Core/IDefaultBootstrapperApplication.cs index d0518049..5803a26a 100644 --- a/src/WixToolset.Mba.Core/IDefaultBootstrapperApplication.cs +++ b/src/WixToolset.Mba.Core/IDefaultBootstrapperApplication.cs @@ -332,12 +332,12 @@ namespace WixToolset.Mba.Core event EventHandler SystemShutdown; /// - /// Fired when the engine has begun removing the registration for the location and visibility of the bundle. + /// Fired when the engine unregisters the bundle. /// event EventHandler UnregisterBegin; /// - /// Fired when the engine has completed removing the registration for the location and visibility of the bundle. + /// Fired when the engine unregistration is complete. /// event EventHandler UnregisterComplete; } -- cgit v1.2.3-55-g6feb