2008-03-09 14:11:42 +00:00
|
|
|
/*
|
2005-05-01 07:08:18 +00:00
|
|
|
* COPYRIGHT: See COPYING in the top level directory
|
|
|
|
* PROJECT: ReactOS kernel
|
|
|
|
* FILE: ntoskrnl/rtl/misc.c
|
|
|
|
* PURPOSE: Various functions
|
2005-05-09 01:38:29 +00:00
|
|
|
*
|
2007-10-19 23:21:45 +00:00
|
|
|
* PROGRAMMERS:
|
2005-05-01 07:08:18 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
/* INCLUDES *****************************************************************/
|
|
|
|
|
|
|
|
#include <ntoskrnl.h>
|
|
|
|
#define NDEBUG
|
2008-08-30 16:31:06 +00:00
|
|
|
#include <debug.h>
|
2005-05-01 07:08:18 +00:00
|
|
|
|
|
|
|
/* GLOBALS *******************************************************************/
|
|
|
|
|
|
|
|
extern ULONG NtGlobalFlag;
|
|
|
|
extern ULONG NtMajorVersion;
|
|
|
|
extern ULONG NtMinorVersion;
|
|
|
|
extern ULONG NtOSCSDVersion;
|
|
|
|
|
|
|
|
/* FUNCTIONS *****************************************************************/
|
|
|
|
|
|
|
|
/*
|
|
|
|
* @implemented
|
|
|
|
*/
|
|
|
|
ULONG
|
2008-11-29 20:47:48 +00:00
|
|
|
NTAPI
|
2005-05-01 07:08:18 +00:00
|
|
|
RtlGetNtGlobalFlags(VOID)
|
|
|
|
{
|
2012-11-01 12:52:34 +00:00
|
|
|
return NtGlobalFlag;
|
2005-05-01 07:08:18 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
2013-08-13 03:14:22 +00:00
|
|
|
* @implemented
|
|
|
|
*/
|
|
|
|
NTSTATUS
|
|
|
|
NTAPI
|
2005-05-01 07:08:18 +00:00
|
|
|
RtlGetVersion(IN OUT PRTL_OSVERSIONINFOW lpVersionInformation)
|
|
|
|
{
|
2013-08-13 03:14:22 +00:00
|
|
|
PAGED_CODE();
|
2012-11-01 12:52:34 +00:00
|
|
|
|
2013-08-13 03:14:22 +00:00
|
|
|
/* Return the basics */
|
|
|
|
lpVersionInformation->dwMajorVersion = NtMajorVersion;
|
|
|
|
lpVersionInformation->dwMinorVersion = NtMinorVersion;
|
|
|
|
lpVersionInformation->dwBuildNumber = NtBuildNumber & 0x3FFF;
|
|
|
|
lpVersionInformation->dwPlatformId = VER_PLATFORM_WIN32_NT;
|
2012-11-01 12:52:34 +00:00
|
|
|
|
2013-08-13 03:14:22 +00:00
|
|
|
/* Check if this is the extended version */
|
|
|
|
if (lpVersionInformation->dwOSVersionInfoSize == sizeof(RTL_OSVERSIONINFOEXW))
|
|
|
|
{
|
|
|
|
PRTL_OSVERSIONINFOEXW InfoEx = (PRTL_OSVERSIONINFOEXW)lpVersionInformation;
|
|
|
|
InfoEx->wServicePackMajor = (USHORT)(CmNtCSDVersion >> 8) & 0xFF;
|
|
|
|
InfoEx->wServicePackMinor = (USHORT)(CmNtCSDVersion & 0xFF);
|
|
|
|
InfoEx->wSuiteMask = (USHORT)(SharedUserData->SuiteMask & 0xFFFF);
|
|
|
|
InfoEx->wProductType = SharedUserData->NtProductType;
|
|
|
|
InfoEx->wReserved = 0;
|
2012-11-01 12:52:34 +00:00
|
|
|
}
|
2005-05-01 07:08:18 +00:00
|
|
|
|
2013-08-13 03:14:22 +00:00
|
|
|
/* Always succeed */
|
|
|
|
return STATUS_SUCCESS;
|
2005-05-01 07:08:18 +00:00
|
|
|
}
|
|
|
|
|
2015-09-01 23:45:48 +00:00
|
|
|
#if !defined(_M_IX86)
|
|
|
|
//
|
|
|
|
// Stub for architectures which don't have this implemented
|
|
|
|
//
|
|
|
|
VOID
|
|
|
|
FASTCALL
|
|
|
|
RtlPrefetchMemoryNonTemporal(IN PVOID Source,
|
|
|
|
IN SIZE_T Length)
|
|
|
|
{
|
|
|
|
//
|
|
|
|
// Do nothing
|
|
|
|
//
|
|
|
|
UNREFERENCED_PARAMETER(Source);
|
|
|
|
UNREFERENCED_PARAMETER(Length);
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2012-11-01 12:52:34 +00:00
|
|
|
/* EOF */
|