Brendan Shanks : cmd: Use RtlGetVersion to fix displayed Windows version on Win8.1 or 10 prefix.

Alexandre Julliard julliard at winehq.org
Thu Apr 16 16:45:15 CDT 2020


Module: wine
Branch: master
Commit: e8f16fcbcc6a168e8f1e526beb3e07d0beeea3d0
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=e8f16fcbcc6a168e8f1e526beb3e07d0beeea3d0

Author: Brendan Shanks <bshanks at codeweavers.com>
Date:   Thu Apr 16 11:12:58 2020 -0700

cmd: Use RtlGetVersion to fix displayed Windows version on Win8.1 or 10 prefix.

Signed-off-by: Brendan Shanks <bshanks at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 programs/cmd/wcmd.h     | 1 +
 programs/cmd/wcmdmain.c | 4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/programs/cmd/wcmd.h b/programs/cmd/wcmd.h
index b0769bd839..112fc1a1ea 100644
--- a/programs/cmd/wcmd.h
+++ b/programs/cmd/wcmd.h
@@ -22,6 +22,7 @@
 #define IDI_ICON1	1
 #include <windows.h>
 #include <windef.h>
+#include <winternl.h>
 #ifndef RC_INVOKED
 #include <string.h>
 #include <stdlib.h>
diff --git a/programs/cmd/wcmdmain.c b/programs/cmd/wcmdmain.c
index 5cad22b7ee..2834986bf9 100644
--- a/programs/cmd/wcmdmain.c
+++ b/programs/cmd/wcmdmain.c
@@ -2437,7 +2437,7 @@ int __cdecl wmain (int argc, WCHAR *argvW[])
   static const WCHAR cmdW[] = {'\\','c','m','d','.','e','x','e',0};
   WCHAR comspec[MAX_PATH];
   CMD_LIST *toExecute = NULL;         /* Commands left to be executed */
-  OSVERSIONINFOW osv;
+  RTL_OSVERSIONINFOEXW osv;
   char osver[50];
   STARTUPINFOW startupInfo;
 
@@ -2452,7 +2452,7 @@ int __cdecl wmain (int argc, WCHAR *argvW[])
 
   /* Get the windows version being emulated */
   osv.dwOSVersionInfoSize = sizeof(osv);
-  GetVersionExW(&osv);
+  RtlGetVersion(&osv);
 
   /* Pre initialize some messages */
   lstrcpyW(anykey, WCMD_LoadMessage(WCMD_ANYKEY));




More information about the wine-cvs mailing list