Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/kornelski/7z.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '7zip/UI/Console/ConsoleClose.cpp')
-rwxr-xr-x7zip/UI/Console/ConsoleClose.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/7zip/UI/Console/ConsoleClose.cpp b/7zip/UI/Console/ConsoleClose.cpp
index 5527ef6b..a514c12a 100755
--- a/7zip/UI/Console/ConsoleClose.cpp
+++ b/7zip/UI/Console/ConsoleClose.cpp
@@ -2,6 +2,8 @@
#include "StdAfx.h"
+#include <stdio.h>
+
#include "ConsoleClose.h"
static int g_BreakCounter = 0;
@@ -9,14 +11,20 @@ static const int kBreakAbortThreshold = 2;
namespace NConsoleClose {
-static BOOL WINAPI HandlerRoutine(DWORD aCtrlType)
+static BOOL WINAPI HandlerRoutine(DWORD ctrlType)
{
+ if (ctrlType == CTRL_LOGOFF_EVENT)
+ {
+ // printf("\nCTRL_LOGOFF_EVENT\n");
+ return TRUE;
+ }
+
g_BreakCounter++;
if (g_BreakCounter < kBreakAbortThreshold)
return TRUE;
return FALSE;
/*
- switch(aCtrlType)
+ switch(ctrlType)
{
case CTRL_C_EVENT:
case CTRL_BREAK_EVENT: