2009-11-10 16:48:42 +01:00
|
|
|
#include "rar.hpp"
|
|
|
|
|
2020-07-15 00:40:26 +02:00
|
|
|
#ifdef _WIN_ALL
|
|
|
|
DWORD WinNT()
|
2009-11-10 16:48:42 +01:00
|
|
|
{
|
2020-07-15 00:40:26 +02:00
|
|
|
static int dwPlatformId=-1;
|
|
|
|
static DWORD dwMajorVersion,dwMinorVersion;
|
2009-11-10 16:48:42 +01:00
|
|
|
if (dwPlatformId==-1)
|
|
|
|
{
|
|
|
|
OSVERSIONINFO WinVer;
|
|
|
|
WinVer.dwOSVersionInfoSize=sizeof(WinVer);
|
|
|
|
GetVersionEx(&WinVer);
|
|
|
|
dwPlatformId=WinVer.dwPlatformId;
|
|
|
|
dwMajorVersion=WinVer.dwMajorVersion;
|
2020-07-15 00:40:26 +02:00
|
|
|
dwMinorVersion=WinVer.dwMinorVersion;
|
2009-11-10 16:48:42 +01:00
|
|
|
}
|
2020-07-15 00:40:26 +02:00
|
|
|
DWORD Result=0;
|
|
|
|
if (dwPlatformId==VER_PLATFORM_WIN32_NT)
|
|
|
|
Result=dwMajorVersion*0x100+dwMinorVersion;
|
|
|
|
|
|
|
|
|
|
|
|
return Result;
|
2009-11-10 16:48:42 +01:00
|
|
|
}
|
|
|
|
#endif
|