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/Bundles/SFXWin/Main.cpp')
-rwxr-xr-x7zip/Bundles/SFXWin/Main.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/7zip/Bundles/SFXWin/Main.cpp b/7zip/Bundles/SFXWin/Main.cpp
index 60807a3b..59c2d1dc 100755
--- a/7zip/Bundles/SFXWin/Main.cpp
+++ b/7zip/Bundles/SFXWin/Main.cpp
@@ -19,6 +19,17 @@
#include "../../UI/GUI/ExtractGUI.h"
HINSTANCE g_hInstance;
+#ifndef _UNICODE
+bool g_IsNT = false;
+static inline bool IsItWindowsNT()
+{
+ OSVERSIONINFO versionInfo;
+ versionInfo.dwOSVersionInfoSize = sizeof(versionInfo);
+ if (!::GetVersionEx(&versionInfo))
+ return false;
+ return (versionInfo.dwPlatformId == VER_PLATFORM_WIN32_NT);
+}
+#endif
int APIENTRY WinMain(
HINSTANCE hInstance,
@@ -27,6 +38,10 @@ int APIENTRY WinMain(
int nCmdShow)
{
g_hInstance = (HINSTANCE)hInstance;
+ #ifndef _UNICODE
+ g_IsNT = IsItWindowsNT();
+ #endif
+
UString password;
bool assumeYes = false;
bool outputFolderDefined = false;