···19021902 /* Only supported on x86 */
19031903#if defined (_X86_)
19041904 Ke386SetIOPL();
19051905+#elif defined(_M_AMD64)
19061906+ /* On x64 this function isn't implemented.
19071907+ On Windows 2003 it returns success.
19081908+ On Vista+ it returns STATUS_NOT_IMPLEMENTED. */
19091909+ if ((ExGetPreviousMode() != KernelMode) &&
19101910+ (RtlRosGetAppcompatVersion() > _WIN32_WINNT_WS03))
19111911+ {
19121912+ Status = STATUS_NOT_IMPLEMENTED;
19131913+ }
19051914#else
19061915 Status = STATUS_NOT_IMPLEMENTED;
19071916#endif
+17
sdk/lib/rtl/process.c
···493493 /* Forward to kernel */
494494 return NtGetCurrentProcessorNumber();
495495}
496496+497497+_IRQL_requires_max_(APC_LEVEL)
498498+ULONG
499499+NTAPI
500500+RtlRosGetAppcompatVersion(VOID)
501501+{
502502+ /* Get the current PEB */
503503+ PPEB Peb = RtlGetCurrentPeb();
504504+ if (Peb == NULL)
505505+ {
506506+ /* Default to Server 2003 */
507507+ return _WIN32_WINNT_WS03;
508508+ }
509509+510510+ /* Calculate OS version from PEB fields */
511511+ return (Peb->OSMajorVersion << 8) | Peb->OSMinorVersion;
512512+}