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/GUI/GUI.cpp')
-rwxr-xr-x7zip/UI/GUI/GUI.cpp25
1 files changed, 19 insertions, 6 deletions
diff --git a/7zip/UI/GUI/GUI.cpp b/7zip/UI/GUI/GUI.cpp
index 9f3ea7a4..f263601a 100755
--- a/7zip/UI/GUI/GUI.cpp
+++ b/7zip/UI/GUI/GUI.cpp
@@ -15,6 +15,9 @@
#include "Windows/Synchronization.h"
#include "Windows/Error.h"
#include "Windows/FileName.h"
+#ifdef _WIN32
+#include "Windows/MemoryLock.h"
+#endif
#include "../../IStream.h"
#include "../../IPassword.h"
@@ -33,6 +36,9 @@
using namespace NWindows;
HINSTANCE g_hInstance;
+#ifndef _UNICODE
+bool g_IsNT = false;
+#endif
static const wchar_t *kExceptionErrorMessage = L"Error:";
static const wchar_t *kUserBreak = L"Break signaled";
@@ -71,6 +77,11 @@ int Main2()
parser.Parse1(commandStrings, options);
parser.Parse2(options);
+
+ #ifdef _WIN32
+ if (options.LargePages)
+ NSecurity::EnableLockMemoryPrivilege();
+ #endif
bool isExtractGroupCommand = options.Command.IsFromExtractGroup();
@@ -157,18 +168,20 @@ static bool inline IsItWindowsNT()
int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
{
g_hInstance = hInstance;
- InitCommonControls();
-
- ReloadLang();
-
-
- #ifdef UNICODE
+ #ifdef _UNICODE
if (!IsItWindowsNT())
{
MyMessageBox(L"This program requires Windows NT/2000/XP/2003");
return NExitCode::kFatalError;
}
+ #else
+ g_IsNT = IsItWindowsNT();
#endif
+
+ InitCommonControls();
+
+ ReloadLang();
+
// setlocale(LC_COLLATE, ".ACP");
try
{