mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 10:04:49 +00:00
[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:
parent
06c1e134e1
commit
63a3a2cbb8
1 changed files with 19 additions and 7 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue