3 * COPYRIGHT: See COPYING in the top level directory
4 * PROJECT: ReactOS kernel
5 * PURPOSE: Various functions
6 * FILE: lib/ntdll/rtl/misc.c
7 * PROGRAMER: Eric Kohl <ekohl@zr-online.de>
12 /* INCLUDES *****************************************************************/
15 #include <ddk/ntddk.h>
16 #include <ntdll/rtl.h>
18 /* GLOBALS ******************************************************************/
20 extern ULONG NtGlobalFlag;
22 /* FUNCTIONS ****************************************************************/
24 /**********************************************************************
29 * Retrieves the global os flags.
42 RtlGetNtGlobalFlags(VOID)
48 /**********************************************************************
53 * Retrieves the OS product type.
56 * ProductType Pointer to the product type variable.
59 * TRUE if successful, otherwise FALSE
62 * ProductType can be one of the following values:
63 * 1 Workstation (Winnt)
65 * 3 Advanced Server (Servernt)
74 RtlGetNtProductType(PNT_PRODUCT_TYPE ProductType)
76 *ProductType = SharedUserData->NtProductType;
80 /**********************************************************************
82 * RtlGetNtVersionNumbers
85 * Get the version numbers of the run time library.
88 * major [OUT] Destination for the Major version
89 * minor [OUT] Destination for the Minor version
90 * build [OUT] Destination for the Build version
96 * Introduced in Windows XP (NT5.1)
102 RtlGetNtVersionNumbers(LPDWORD major, LPDWORD minor, LPDWORD build)
104 PPEB pPeb = NtCurrentPeb();
108 /* msvcrt.dll as released with XP Home fails in DLLMain() if the
109 * major version is not 5. So, we should never set a version < 5 ...
110 * This makes sense since this call didn't exist before XP anyway.
112 *major = pPeb->OSMajorVersion < 5 ? 5 : pPeb->OSMajorVersion;
117 *minor = pPeb->OSMinorVersion;
122 /* FIXME: Does anybody know the real formula? */
123 *build = (0xF0000000 | pPeb->OSBuildNumber);