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/SFXSetup/Main.cpp')
-rwxr-xr-x7zip/Bundles/SFXSetup/Main.cpp17
1 files changed, 16 insertions, 1 deletions
diff --git a/7zip/Bundles/SFXSetup/Main.cpp b/7zip/Bundles/SFXSetup/Main.cpp
index b53b4243..72cae080 100755
--- a/7zip/Bundles/SFXSetup/Main.cpp
+++ b/7zip/Bundles/SFXSetup/Main.cpp
@@ -118,14 +118,29 @@ public:
{ return BOOLToBool(::SetCurrentDirectory(m_CurrentDirectory)); }
};
+#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,
HINSTANCE hPrevInstance,
LPSTR lpCmdLine,
int nCmdShow)
{
- InitCommonControls();
g_hInstance = (HINSTANCE)hInstance;
+ #ifndef _UNICODE
+ g_IsNT = IsItWindowsNT();
+ #endif
+ InitCommonControls();
UString archiveName, switches;
NCommandLineParser::SplitCommandLine(GetCommandLineW(), archiveName, switches);