blob: ff7397ffd9859fea52ee4a9d83569d631e8a46b6 [file] [log] [blame] [raw]
#include <windows.h>
#include <nt.h>
unsigned long int _stdcall RtlGetVersion(RTL_OSVERSIONINFO *VersionInformation){
PROCESS_BASIC_INFORMATION pbi;
NtQueryInformationProcess((void *)-1, ProcessBasicInformation, &pbi, sizeof(pbi), NULL);
PEB *peb = pbi.PebBaseAddress;
VersionInformation->dwMajorVersion = peb->OSMajorVersion;
VersionInformation->dwMinorVersion = peb->OSMinorVersion;
VersionInformation->dwBuildNumber = peb->OSBuildNumber;
VersionInformation->dwPlatformId = peb->OSPlatformId;
return 0;
}