mirror of
https://github.com/adamhathcock/sharpcompress.git
synced 2026-09-24 16:05:27 +00:00
rar: import unrarsrc-5.5.8 for reference
this will allow us to diff against newer version of unrarsrc if we wish to update our port
This commit is contained in:
24
reference/unrar/isnt.cpp
Normal file
24
reference/unrar/isnt.cpp
Normal file
@@ -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
|
||||
Reference in New Issue
Block a user