diff --git a/reactos/lib/kernel32/misc/env.c b/reactos/lib/kernel32/misc/env.c index 9e411a65bf5..afc63d6b305 100644 --- a/reactos/lib/kernel32/misc/env.c +++ b/reactos/lib/kernel32/misc/env.c @@ -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 * PROJECT: ReactOS system libraries @@ -309,11 +309,8 @@ GetVersionExA( gives extra work to RtlUnicodeStringToAnsiString, but spares us an RtlInitUnicodeString round */ - sizeof(((LPOSVERSIONINFOW)NULL)->szCSDVersion) * - sizeof(((LPOSVERSIONINFOW)NULL)->szCSDVersion[0]) - - 1, - sizeof(((LPOSVERSIONINFOW)NULL)->szCSDVersion) * - sizeof(((LPOSVERSIONINFOW)NULL)->szCSDVersion[0]), + 0, + sizeof(((LPOSVERSIONINFOW)NULL)->szCSDVersion), oviVerInfo.szCSDVersion }; @@ -321,9 +318,7 @@ GetVersionExA( ANSI_STRING strVerStr = { 0, - sizeof(((LPOSVERSIONINFOA)NULL)->szCSDVersion) * - sizeof(((LPOSVERSIONINFOA)NULL)->szCSDVersion[0]) - - 1, + sizeof(((LPOSVERSIONINFOA)NULL)->szCSDVersion), lpVersionInformation->szCSDVersion }; @@ -355,10 +350,11 @@ GetVersionExA( /* null-terminate, just in case */ oviVerInfo.szCSDVersion [ - sizeof(((LPOSVERSIONINFOW)NULL)->szCSDVersion) * + sizeof(((LPOSVERSIONINFOW)NULL)->szCSDVersion) / sizeof(((LPOSVERSIONINFOW)NULL)->szCSDVersion[0]) - 1 ] = 0; + wstrVerStr.Length = wcslen(wstrVerStr.Buffer) * sizeof(WCHAR); /* convert the version string */ nErrCode = RtlUnicodeStringToAnsiString(&strVerStr, &wstrVerStr, FALSE); diff --git a/reactos/lib/ntdll/ldr/startup.c b/reactos/lib/ntdll/ldr/startup.c index f275b9c1d93..d98cb22fa42 100644 --- a/reactos/lib/ntdll/ldr/startup.c +++ b/reactos/lib/ntdll/ldr/startup.c @@ -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 * PROJECT: ReactOS kernel @@ -92,6 +92,11 @@ LdrInitializeThunk (ULONG Unknown1, ZwTerminateProcess(NtCurrentProcess(), STATUS_UNSUCCESSFUL); } + Peb->OSMajorVersion = 4; + Peb->OSMinorVersion = 0; + Peb->OSBuildNumber = 0; + Peb->OSPlatformId = VER_PLATFORM_WIN32_NT; + NtGlobalFlag = Peb->NtGlobalFlag; /* If MZ header exists */