https://git.reactos.org/?p=reactos.git;a=commitdiff;h=63a3a2cbb8d67c1afe8b2…
commit 63a3a2cbb8d67c1afe8b283880e75e0e5b5bed01
Author: Colin Finck <colin(a)reactos.org>
AuthorDate: Wed Jan 10 09:24:22 2018 +0100
[KERNEL32] Accept all images for NT 3.1 and higher instead of bailing out at image
versions > 5.01 (#273)
Print a debug message whenever an application newer than ReactOS' internal NT
version is started.
This gets a simple "Hello World" compiled by VS' 2017 regular
"v141" toolchain to run under ReactOS.
Please retry NT6+ applications!
---
dll/win32/kernel32/client/proc.c | 26 +++++++++++++++++++-------
1 file changed, 19 insertions(+), 7 deletions(-)
diff --git a/dll/win32/kernel32/client/proc.c b/dll/win32/kernel32/client/proc.c
index 3caf28e3c3..649dcd4f41 100644
--- a/dll/win32/kernel32/client/proc.c
+++ b/dll/win32/kernel32/client/proc.c
@@ -123,13 +123,25 @@ WINAPI
BasepIsImageVersionOk(IN ULONG ImageMajorVersion,
IN ULONG ImageMinorVersion)
{
- /* Accept images for NT 3.1 or higher, as long as they're not newer than us */
- return ((ImageMajorVersion >= 3) &&
- ((ImageMajorVersion != 3) ||
- (ImageMinorVersion >= 10)) &&
- (ImageMajorVersion <= SharedUserData->NtMajorVersion) &&
- ((ImageMajorVersion != SharedUserData->NtMajorVersion) ||
- (ImageMinorVersion <= SharedUserData->NtMinorVersion)));
+ /* Accept images for NT 3.1 or higher */
+ if (ImageMajorVersion > 3 ||
+ (ImageMajorVersion == 3 && ImageMinorVersion >= 10))
+ {
+ /* ReactOS-specific: Accept images even if they are newer than our internal NT
version. */
+ if (ImageMajorVersion > SharedUserData->NtMajorVersion ||
+ (ImageMajorVersion == SharedUserData->NtMajorVersion &&
ImageMinorVersion > SharedUserData->NtMinorVersion))
+ {
+ DPRINT1("Accepting image version %lu.%lu, although ReactOS is an NT
%hu.%hu OS!\n",
+ ImageMajorVersion,
+ ImageMinorVersion,
+ SharedUserData->NtMajorVersion,
+ SharedUserData->NtMinorVersion);
+ }
+
+ return TRUE;
+ }
+
+ return FALSE;
}
NTSTATUS