[ACLAYERS] Fix RtlGetVersion

This commit is contained in:
Mark Jansen 2022-09-13 21:35:23 +02:00
parent 05637a5e3d
commit 815dd140c7
No known key found for this signature in database
GPG key ID: B39240EE84BEAE8B

View file

@ -31,14 +31,19 @@ BOOL WINAPI SHIM_OBJ_NAME(APIHook_GetVersionExW)(LPOSVERSIONINFOEXA lpOsVersionI
return FALSE; return FALSE;
} }
#ifndef STATUS_INVALID_PARAMETER
#define STATUS_INVALID_PARAMETER 0xC000000DL
#define STATUS_SUCCESS 0
#endif
/* We do not care about the actual type, FakeVersion will correctly handle it either way */ /* We do not care about the actual type, FakeVersion will correctly handle it either way */
BOOL WINAPI SHIM_OBJ_NAME(APIHook_RtlGetVersion)(LPOSVERSIONINFOEXA lpOsVersionInfo) DWORD WINAPI SHIM_OBJ_NAME(APIHook_RtlGetVersion)(LPOSVERSIONINFOEXA lpOsVersionInfo)
{ {
if (CALL_SHIM(3, GETVERSIONEXAPROC)(lpOsVersionInfo)) if (CALL_SHIM(3, GETVERSIONEXAPROC)(lpOsVersionInfo) == STATUS_SUCCESS)
{ {
return FakeVersion(lpOsVersionInfo, &VERSION_INFO); return FakeVersion(lpOsVersionInfo, &VERSION_INFO) ? STATUS_SUCCESS : STATUS_INVALID_PARAMETER;
} }
return FALSE; return STATUS_INVALID_PARAMETER;
} }
BOOL WINAPI SHIM_OBJ_NAME(Notify)(DWORD fdwReason, PVOID ptr) BOOL WINAPI SHIM_OBJ_NAME(Notify)(DWORD fdwReason, PVOID ptr)