diff --git a/modules/rostests/apitests/include/apitest.h b/modules/rostests/apitests/include/apitest.h index 083925f4b6d..40a3ac0471e 100644 --- a/modules/rostests/apitests/include/apitest.h +++ b/modules/rostests/apitests/include/apitest.h @@ -12,6 +12,10 @@ #define InvalidPointer ((PVOID)0x5555555555555555ULL) // #define InvalidPointer ((PVOID)0x0123456789ABCDEFULL) +/* Magic pointers come from KUSER_SHARED_DATA; needed to get true NT version on Windows 8+ */ +#define KUSER_SHARED_DATA_UMPTR 0x7FFE0000 +#define GetNTVersion() (((*(ULONG*)(KUSER_SHARED_DATA_UMPTR + 0x026C)) << 8) | (*(ULONG*)(KUSER_SHARED_DATA_UMPTR + 0x0270))) + #include #define StartSeh() \