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

github.com/mpc-hc/mpc-hc.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXhmikosR <xhmikosr@users.sourceforge.net>2012-06-16 00:29:14 +0400
committerXhmikosR <xhmikosr@users.sourceforge.net>2012-06-16 00:29:14 +0400
commita3d79a0b72e55ddb2d252b9e321dcf8451fdc25e (patch)
tree68f98e7fc27fb96ccaab7ea3bf58d4fdee34e091 /src/thirdparty/unrar/isnt.cpp
parent9a444c24cfea2d07fec73dd84377c36588456902 (diff)
add unrar and use it as a static lib
git-svn-id: https://mpc-hc.svn.sourceforge.net/svnroot/mpc-hc/trunk@5142 10f7b99b-c216-0410-bff0-8a66a9350fd8
Diffstat (limited to 'src/thirdparty/unrar/isnt.cpp')
-rw-r--r--src/thirdparty/unrar/isnt.cpp24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/thirdparty/unrar/isnt.cpp b/src/thirdparty/unrar/isnt.cpp
new file mode 100644
index 000000000..53c722ab4
--- /dev/null
+++ b/src/thirdparty/unrar/isnt.cpp
@@ -0,0 +1,24 @@
+#include "rar.hpp"
+
+#ifdef _WIN_ALL
+DWORD WinNT()
+{
+ static int dwPlatformId=-1;
+ static DWORD dwMajorVersion,dwMinorVersion;
+ if (dwPlatformId==-1)
+ {
+ OSVERSIONINFO WinVer;
+ WinVer.dwOSVersionInfoSize=sizeof(WinVer);
+ GetVersionEx(&WinVer);
+ dwPlatformId=WinVer.dwPlatformId;
+ dwMajorVersion=WinVer.dwMajorVersion;
+ dwMinorVersion=WinVer.dwMinorVersion;
+ }
+ DWORD Result=0;
+ if (dwPlatformId==VER_PLATFORM_WIN32_NT)
+ Result=dwMajorVersion*0x100+dwMinorVersion;
+
+
+ return(Result);
+}
+#endif