Permalink
Browse files

[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!
  • Loading branch information...
ColinFinck committed Jan 10, 2018
1 parent 06c1e13 commit 63a3a2cbb8d67c1afe8b283880e75e0e5b5bed01
Showing with 19 additions and 7 deletions.
  1. +19 −7 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

0 comments on commit 63a3a2c

Please sign in to comment.