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/Far/Main.cpp')
-rwxr-xr-x7zip/UI/Far/Main.cpp17
1 files changed, 15 insertions, 2 deletions
diff --git a/7zip/UI/Far/Main.cpp b/7zip/UI/Far/Main.cpp
index 3f13d882..d9e7d696 100755
--- a/7zip/UI/Far/Main.cpp
+++ b/7zip/UI/Far/Main.cpp
@@ -67,11 +67,26 @@ extern "C"
};
HINSTANCE g_hInstance;
+#ifndef _UNICODE
+bool g_IsNT = false;
+static bool IsItWindowsNT()
+{
+ OSVERSIONINFO versionInfo;
+ versionInfo.dwOSVersionInfoSize = sizeof(versionInfo);
+ if (!::GetVersionEx(&versionInfo))
+ return false;
+ return (versionInfo.dwPlatformId == VER_PLATFORM_WIN32_NT);
+}
+#endif
+
BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID)
{
if (dwReason == DLL_PROCESS_ATTACH)
{
g_hInstance = hInstance;
+ #ifndef _UNICODE
+ g_IsNT = IsItWindowsNT();
+ #endif
}
return TRUE;
}
@@ -387,8 +402,6 @@ static HANDLE MyOpenFilePlugin(const char *name)
// ::OutputDebugString("before OpenArchive\n");
- // UString defaultName;
-
archiveHandler = new CAgent;
CMyComBSTR archiveType;
HRESULT result = archiveHandler->Open(