https://git.reactos.org/?p=reactos.git;a=commitdiff;h=815dd140c77b7af9cde824e497bf04544ff8e8f0
commit 815dd140c77b7af9cde824e497bf04544ff8e8f0 Author: Mark Jansen <mark.jan...@reactos.org> AuthorDate: Tue Sep 13 21:35:23 2022 +0200 Commit: Mark Jansen <mark.jan...@reactos.org> CommitDate: Sun Sep 25 19:33:51 2022 +0200 [ACLAYERS] Fix RtlGetVersion --- dll/appcompat/shims/layer/versionlie.inl | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/dll/appcompat/shims/layer/versionlie.inl b/dll/appcompat/shims/layer/versionlie.inl index 2b3576b398a..7eb4f5c6794 100644 --- a/dll/appcompat/shims/layer/versionlie.inl +++ b/dll/appcompat/shims/layer/versionlie.inl @@ -31,14 +31,19 @@ BOOL WINAPI SHIM_OBJ_NAME(APIHook_GetVersionExW)(LPOSVERSIONINFOEXA lpOsVersionI 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 */ -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)