From 2fca9b58ecdd3cc2476dd9f4bc56e85cc090871b Mon Sep 17 00:00:00 2001 From: Christoph von Wittich Date: Sun, 7 Jun 2009 11:24:37 +0000 Subject: [PATCH] fix msvcrt data winetests svn path=/trunk/; revision=41330 --- reactos/dll/win32/msvcrt/dllmain.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/reactos/dll/win32/msvcrt/dllmain.c b/reactos/dll/win32/msvcrt/dllmain.c index 92c35c93471..99822fc46a7 100644 --- a/reactos/dll/win32/msvcrt/dllmain.c +++ b/reactos/dll/win32/msvcrt/dllmain.c @@ -60,17 +60,19 @@ BOOL WINAPI DllMain(PVOID hinstDll, ULONG dwReason, PVOID reserved) { + OSVERSIONINFOW osvi; switch (dwReason) { case DLL_PROCESS_ATTACH://1 /* initialize version info */ //DPRINT1("Process Attach %d\n", nAttachCount); //DPRINT1("Process Attach\n"); - _osver = GetVersion(); - _winmajor = (_osver >> 8) & 0xFF; - _winminor = _osver & 0xFF; - _winver = (_winmajor << 8) + _winminor; - _osver = (_osver >> 16) & 0xFFFF; + osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFOW); + GetVersionExW( &osvi ); + _winver = (osvi.dwMajorVersion << 8) | osvi.dwMinorVersion; + _winmajor = osvi.dwMajorVersion; + _winminor = osvi.dwMinorVersion; + _osver = osvi.dwBuildNumber; hHeap = HeapCreate(0, 100000, 0); if (hHeap == NULL) return FALSE;