[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!
This commit is contained in:
Colin Finck 2018-01-10 09:24:22 +01:00 committed by GitHub
parent 06c1e134e1
commit 63a3a2cbb8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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