mirror of
https://github.com/hashcat/hashcat.git
synced 2024-12-24 07:28:10 +00:00
25 lines
519 B
C++
25 lines
519 B
C++
|
#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
|