mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 18:15:11 +00:00
Fix GetVersion
svn path=/trunk/; revision=4547
This commit is contained in:
parent
bbe715ec28
commit
ff17fbcf89
2 changed files with 12 additions and 11 deletions
|
@ -1,4 +1,4 @@
|
||||||
/* $Id: env.c,v 1.20 2003/02/12 00:39:31 hyperion Exp $
|
/* $Id: env.c,v 1.21 2003/04/18 08:29:35 gvg Exp $
|
||||||
*
|
*
|
||||||
* COPYRIGHT: See COPYING in the top level directory
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT: ReactOS system libraries
|
* PROJECT: ReactOS system libraries
|
||||||
|
@ -309,11 +309,8 @@ GetVersionExA(
|
||||||
gives extra work to RtlUnicodeStringToAnsiString, but spares us an
|
gives extra work to RtlUnicodeStringToAnsiString, but spares us an
|
||||||
RtlInitUnicodeString round
|
RtlInitUnicodeString round
|
||||||
*/
|
*/
|
||||||
sizeof(((LPOSVERSIONINFOW)NULL)->szCSDVersion) *
|
0,
|
||||||
sizeof(((LPOSVERSIONINFOW)NULL)->szCSDVersion[0]) -
|
sizeof(((LPOSVERSIONINFOW)NULL)->szCSDVersion),
|
||||||
1,
|
|
||||||
sizeof(((LPOSVERSIONINFOW)NULL)->szCSDVersion) *
|
|
||||||
sizeof(((LPOSVERSIONINFOW)NULL)->szCSDVersion[0]),
|
|
||||||
oviVerInfo.szCSDVersion
|
oviVerInfo.szCSDVersion
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -321,9 +318,7 @@ GetVersionExA(
|
||||||
ANSI_STRING strVerStr =
|
ANSI_STRING strVerStr =
|
||||||
{
|
{
|
||||||
0,
|
0,
|
||||||
sizeof(((LPOSVERSIONINFOA)NULL)->szCSDVersion) *
|
sizeof(((LPOSVERSIONINFOA)NULL)->szCSDVersion),
|
||||||
sizeof(((LPOSVERSIONINFOA)NULL)->szCSDVersion[0]) -
|
|
||||||
1,
|
|
||||||
lpVersionInformation->szCSDVersion
|
lpVersionInformation->szCSDVersion
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -355,10 +350,11 @@ GetVersionExA(
|
||||||
/* null-terminate, just in case */
|
/* null-terminate, just in case */
|
||||||
oviVerInfo.szCSDVersion
|
oviVerInfo.szCSDVersion
|
||||||
[
|
[
|
||||||
sizeof(((LPOSVERSIONINFOW)NULL)->szCSDVersion) *
|
sizeof(((LPOSVERSIONINFOW)NULL)->szCSDVersion) /
|
||||||
sizeof(((LPOSVERSIONINFOW)NULL)->szCSDVersion[0]) -
|
sizeof(((LPOSVERSIONINFOW)NULL)->szCSDVersion[0]) -
|
||||||
1
|
1
|
||||||
] = 0;
|
] = 0;
|
||||||
|
wstrVerStr.Length = wcslen(wstrVerStr.Buffer) * sizeof(WCHAR);
|
||||||
|
|
||||||
/* convert the version string */
|
/* convert the version string */
|
||||||
nErrCode = RtlUnicodeStringToAnsiString(&strVerStr, &wstrVerStr, FALSE);
|
nErrCode = RtlUnicodeStringToAnsiString(&strVerStr, &wstrVerStr, FALSE);
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* $Id: startup.c,v 1.47 2002/12/08 15:57:40 robd Exp $
|
/* $Id: startup.c,v 1.48 2003/04/18 08:29:35 gvg Exp $
|
||||||
*
|
*
|
||||||
* COPYRIGHT: See COPYING in the top level directory
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT: ReactOS kernel
|
* PROJECT: ReactOS kernel
|
||||||
|
@ -92,6 +92,11 @@ LdrInitializeThunk (ULONG Unknown1,
|
||||||
ZwTerminateProcess(NtCurrentProcess(), STATUS_UNSUCCESSFUL);
|
ZwTerminateProcess(NtCurrentProcess(), STATUS_UNSUCCESSFUL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Peb->OSMajorVersion = 4;
|
||||||
|
Peb->OSMinorVersion = 0;
|
||||||
|
Peb->OSBuildNumber = 0;
|
||||||
|
Peb->OSPlatformId = VER_PLATFORM_WIN32_NT;
|
||||||
|
|
||||||
NtGlobalFlag = Peb->NtGlobalFlag;
|
NtGlobalFlag = Peb->NtGlobalFlag;
|
||||||
|
|
||||||
/* If MZ header exists */
|
/* If MZ header exists */
|
||||||
|
|
Loading…
Reference in a new issue