mirror of
https://github.com/reactos/reactos.git
synced 2024-11-20 14:30:57 +00:00
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:
parent
234a011028
commit
5da996d016
1 changed files with 27 additions and 28 deletions
|
@ -34,7 +34,11 @@ static GENERIC_MAPPING PiThreadMapping = {
|
|||
THREAD_ALL_ACCESS};
|
||||
|
||||
BOOLEAN DoneInitYet = FALSE;
|
||||
|
||||
|
||||
extern ULONG NtBuildNumber;
|
||||
extern ULONG NtMajorVersion;
|
||||
extern ULONG NtMinorVersion;
|
||||
|
||||
VOID
|
||||
INIT_FUNCTION
|
||||
PsInitClientIDManagment(VOID);
|
||||
|
@ -309,44 +313,39 @@ PspPostInitSystemProcess(VOID)
|
|||
* FALSE OS is a free build.
|
||||
*
|
||||
* NOTES
|
||||
* The DDK docs say something about a 'CmCSDVersionString'.
|
||||
* How do we determine in the build is checked or free??
|
||||
*
|
||||
* @unimplemented
|
||||
* @implemented
|
||||
*/
|
||||
|
||||
BOOLEAN
|
||||
STDCALL
|
||||
PsGetVersion (
|
||||
PULONG MajorVersion OPTIONAL,
|
||||
PULONG MinorVersion OPTIONAL,
|
||||
PULONG BuildNumber OPTIONAL,
|
||||
PUNICODE_STRING CSDVersion OPTIONAL
|
||||
)
|
||||
PsGetVersion(PULONG MajorVersion OPTIONAL,
|
||||
PULONG MinorVersion OPTIONAL,
|
||||
PULONG BuildNumber OPTIONAL,
|
||||
PUNICODE_STRING CSDVersion OPTIONAL)
|
||||
{
|
||||
if (MajorVersion)
|
||||
*MajorVersion = 4;
|
||||
if (MajorVersion)
|
||||
*MajorVersion = NtMajorVersion;
|
||||
|
||||
if (MinorVersion)
|
||||
*MinorVersion = 0;
|
||||
if (MinorVersion)
|
||||
*MinorVersion = NtMinorVersion;
|
||||
|
||||
if (BuildNumber)
|
||||
*BuildNumber = 1381;
|
||||
if (BuildNumber)
|
||||
*BuildNumber = NtBuildNumber;
|
||||
|
||||
if (CSDVersion)
|
||||
{
|
||||
CSDVersion->Length = 0;
|
||||
CSDVersion->MaximumLength = 0;
|
||||
CSDVersion->Buffer = NULL;
|
||||
if (CSDVersion)
|
||||
{
|
||||
CSDVersion->Length = 0;
|
||||
CSDVersion->MaximumLength = 0;
|
||||
CSDVersion->Buffer = NULL;
|
||||
#if 0
|
||||
CSDVersion->Length = CmCSDVersionString.Length;
|
||||
CSDVersion->MaximumLength = CmCSDVersionString.Maximum;
|
||||
CSDVersion->Buffer = CmCSDVersionString.Buffer;
|
||||
CSDVersion->Length = CmCSDVersionString.Length;
|
||||
CSDVersion->MaximumLength = CmCSDVersionString.Maximum;
|
||||
CSDVersion->Buffer = CmCSDVersionString.Buffer;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
/* FIXME: How do we determine if build is checked or free? */
|
||||
return FALSE;
|
||||
/* Check the High word */
|
||||
return (NtBuildNumber >> 28) == 0xC;
|
||||
}
|
||||
|
||||
/* EOF */
|
||||
|
|
Loading…
Reference in a new issue