|
@ -18,9 +18,18 @@ namespace IPA.Utilities |
|
|
{ |
|
|
{ |
|
|
Logger.log.Debug("Configuring exit handlers"); |
|
|
Logger.log.Debug("Configuring exit handlers"); |
|
|
|
|
|
|
|
|
|
|
|
AppDomain.CurrentDomain.ProcessExit -= Reset; |
|
|
|
|
|
AppDomain.CurrentDomain.ProcessExit += Reset; |
|
|
|
|
|
|
|
|
ResetExitHandlers(); |
|
|
ResetExitHandlers(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private static void Reset(object sender, EventArgs e) |
|
|
|
|
|
{ |
|
|
|
|
|
Win32.SetConsoleCtrlHandler(registeredHandler, false); |
|
|
|
|
|
WinHttp.SetPeekMessageHook(null); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
#region Execute section
|
|
|
#region Execute section
|
|
|
|
|
|
|
|
|
private static readonly Win32.ConsoleCtrlDelegate registeredHandler = HandleExit; |
|
|
private static readonly Win32.ConsoleCtrlDelegate registeredHandler = HandleExit; |
|
|