mirror of
https://github.com/reactos/reactos.git
synced 2025-06-19 21:46:34 +00:00
[NTOS:PS] On x64 don't fail in NtSetInformationProcess with ProcessUserModeIOPL information class, instead just don't do anything.
For NT6+ appcompat setting return STATUS_NOT_IMPLEMENTED
This commit is contained in:
parent
26484eea9f
commit
cb22d5f697
3 changed files with 31 additions and 0 deletions
|
@ -34,4 +34,9 @@ RtlFindCharInUnicodeString(
|
||||||
_Out_ PUSHORT Position
|
_Out_ PUSHORT Position
|
||||||
);
|
);
|
||||||
|
|
||||||
|
_IRQL_requires_max_(APC_LEVEL)
|
||||||
|
ULONG
|
||||||
|
NTAPI
|
||||||
|
RtlRosGetAppcompatVersion(VOID);
|
||||||
|
|
||||||
/* EOF */
|
/* EOF */
|
||||||
|
|
|
@ -1902,6 +1902,15 @@ NtSetInformationProcess(IN HANDLE ProcessHandle,
|
||||||
/* Only supported on x86 */
|
/* Only supported on x86 */
|
||||||
#if defined (_X86_)
|
#if defined (_X86_)
|
||||||
Ke386SetIOPL();
|
Ke386SetIOPL();
|
||||||
|
#elif defined(_M_AMD64)
|
||||||
|
/* On x64 this function isn't implemented.
|
||||||
|
On Windows 2003 it returns success.
|
||||||
|
On Vista+ it returns STATUS_NOT_IMPLEMENTED. */
|
||||||
|
if ((ExGetPreviousMode() != KernelMode) &&
|
||||||
|
(RtlRosGetAppcompatVersion() > _WIN32_WINNT_WS03))
|
||||||
|
{
|
||||||
|
Status = STATUS_NOT_IMPLEMENTED;
|
||||||
|
}
|
||||||
#else
|
#else
|
||||||
Status = STATUS_NOT_IMPLEMENTED;
|
Status = STATUS_NOT_IMPLEMENTED;
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -493,3 +493,20 @@ RtlGetCurrentProcessorNumber(VOID)
|
||||||
/* Forward to kernel */
|
/* Forward to kernel */
|
||||||
return NtGetCurrentProcessorNumber();
|
return NtGetCurrentProcessorNumber();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_IRQL_requires_max_(APC_LEVEL)
|
||||||
|
ULONG
|
||||||
|
NTAPI
|
||||||
|
RtlRosGetAppcompatVersion(VOID)
|
||||||
|
{
|
||||||
|
/* Get the current PEB */
|
||||||
|
PPEB Peb = RtlGetCurrentPeb();
|
||||||
|
if (Peb == NULL)
|
||||||
|
{
|
||||||
|
/* Default to Server 2003 */
|
||||||
|
return _WIN32_WINNT_WS03;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Calculate OS version from PEB fields */
|
||||||
|
return (Peb->OSMajorVersion << 8) | Peb->OSMinorVersion;
|
||||||
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue