Implement PsGetVersion. OSR and other sources say that the build number is a mix of high and low word, where the high represents checked or free

svn path=/trunk/; revision=14667
This commit is contained in:
Alex Ionescu 2005-04-18 05:47:13 +00:00
parent 234a011028
commit 5da996d016

View file

@ -35,6 +35,10 @@ static GENERIC_MAPPING PiThreadMapping = {
BOOLEAN DoneInitYet = FALSE; BOOLEAN DoneInitYet = FALSE;
extern ULONG NtBuildNumber;
extern ULONG NtMajorVersion;
extern ULONG NtMinorVersion;
VOID VOID
INIT_FUNCTION INIT_FUNCTION
PsInitClientIDManagment(VOID); PsInitClientIDManagment(VOID);
@ -309,29 +313,24 @@ PspPostInitSystemProcess(VOID)
* FALSE OS is a free build. * FALSE OS is a free build.
* *
* NOTES * NOTES
* The DDK docs say something about a 'CmCSDVersionString'.
* How do we determine in the build is checked or free??
* *
* @unimplemented * @implemented
*/ */
BOOLEAN BOOLEAN
STDCALL STDCALL
PsGetVersion ( PsGetVersion(PULONG MajorVersion OPTIONAL,
PULONG MajorVersion OPTIONAL,
PULONG MinorVersion OPTIONAL, PULONG MinorVersion OPTIONAL,
PULONG BuildNumber OPTIONAL, PULONG BuildNumber OPTIONAL,
PUNICODE_STRING CSDVersion OPTIONAL PUNICODE_STRING CSDVersion OPTIONAL)
)
{ {
if (MajorVersion) if (MajorVersion)
*MajorVersion = 4; *MajorVersion = NtMajorVersion;
if (MinorVersion) if (MinorVersion)
*MinorVersion = 0; *MinorVersion = NtMinorVersion;
if (BuildNumber) if (BuildNumber)
*BuildNumber = 1381; *BuildNumber = NtBuildNumber;
if (CSDVersion) if (CSDVersion)
{ {
@ -345,8 +344,8 @@ PsGetVersion (
#endif #endif
} }
/* FIXME: How do we determine if build is checked or free? */ /* Check the High word */
return FALSE; return (NtBuildNumber >> 28) == 0xC;
} }
/* EOF */ /* EOF */