Commit b0755344 authored by Hans Leidekker's avatar Hans Leidekker Committed by Alexandre Julliard

ntdll: Fix the version reported for 64-bit Windows XP.

parent 5cdb4a27
......@@ -50,6 +50,7 @@ typedef enum
NT40, /* Windows NT 4.0 */
NT2K, /* Windows 2000 */
WINXP, /* Windows XP */
WINXP64, /* Windows XP 64-bit */
WIN2K3, /* Windows 2003 */
WINVISTA,/* Windows Vista */
WIN2K8, /* Windows 2008 */
......@@ -134,6 +135,12 @@ static const RTL_OSVERSIONINFOEXW VersionData[NB_WINDOWS_VERSIONS] =
{'S','e','r','v','i','c','e',' ','P','a','c','k',' ','3',0},
3, 0, VER_SUITE_SINGLEUSERTS, VER_NT_WORKSTATION, 30 /* FIXME: Great, a reserved field with a value! */
},
/* WINXP64 */
{
sizeof(RTL_OSVERSIONINFOEXW), 5, 2, 0xECE, VER_PLATFORM_WIN32_NT,
{'S','e','r','v','i','c','e',' ','P','a','c','k',' ','1',0},
1, 0, VER_SUITE_SINGLEUSERTS, VER_NT_WORKSTATION, 0
},
/* WIN2K3 */
{
sizeof(RTL_OSVERSIONINFOEXW), 5, 2, 0xECE, VER_PLATFORM_WIN32_NT,
......@@ -185,6 +192,7 @@ static const char * const WinVersionNames[NB_WINDOWS_VERSIONS] =
"nt40", /* NT40 */
"win2000,win2k,nt2k,nt2000", /* NT2K */
"winxp", /* WINXP */
"winxp64", /* WINXP64 */
"win2003,win2k3", /* WIN2K3 */
"vista,winvista", /* WINVISTA*/
"win2008,win2k8", /* WIN2K8 */
......@@ -468,13 +476,16 @@ void version_init( const WCHAR *appname )
{
static const WCHAR configW[] = {'S','o','f','t','w','a','r','e','\\','W','i','n','e',0};
static const WCHAR appdefaultsW[] = {'A','p','p','D','e','f','a','u','l','t','s','\\',0};
static const int is_win64 = (sizeof(void *) > sizeof(int));
OBJECT_ATTRIBUTES attr;
UNICODE_STRING nameW;
HANDLE root, hkey, config_key;
BOOL got_win_ver = FALSE;
current_version = &VersionData[WINXP]; /* default if nothing else is specified */
if (is_win64 || is_wow64)
current_version = &VersionData[WINXP64]; /* default if nothing else is specified */
else
current_version = &VersionData[WINXP];
RtlOpenCurrentUser( KEY_ALL_ACCESS, &root );
attr.Length = sizeof(attr);
......
......@@ -55,6 +55,9 @@ static const struct
{ "win2008", "Windows 2008", 6, 0, 0x1772,VER_PLATFORM_WIN32_NT, "Service Pack 2", 2, 0, "ServerNT"},
{ "vista", "Windows Vista", 6, 0, 0x1772,VER_PLATFORM_WIN32_NT, "Service Pack 2", 2, 0, "WinNT"},
{ "win2003", "Windows 2003", 5, 2, 0xECE, VER_PLATFORM_WIN32_NT, "Service Pack 2", 2, 0, "ServerNT"},
#ifdef _WIN64
{ "winxp64", "Windows XP", 5, 2, 0xECE, VER_PLATFORM_WIN32_NT, "Service Pack 1", 1, 0, "WinNT"},
#else
{ "winxp", "Windows XP", 5, 1, 0xA28, VER_PLATFORM_WIN32_NT, "Service Pack 3", 3, 0, "WinNT"},
{ "win2k", "Windows 2000", 5, 0, 0x893, VER_PLATFORM_WIN32_NT, "Service Pack 4", 4, 0, "WinNT"},
{ "winme", "Windows ME", 4, 90, 0xBB8, VER_PLATFORM_WIN32_WINDOWS, " ", 0, 0, ""},
......@@ -65,6 +68,7 @@ static const struct
{ "win31", "Windows 3.1", 3, 10, 0, VER_PLATFORM_WIN32s, "Win32s 1.3", 0, 0, ""},
{ "win30", "Windows 3.0", 3, 0, 0, VER_PLATFORM_WIN32s, "Win32s 1.3", 0, 0, ""},
{ "win20", "Windows 2.0", 2, 0, 0, VER_PLATFORM_WIN32s, "Win32s 1.3", 0, 0, ""}
#endif
};
#define NB_VERSIONS (sizeof(win_versions)/sizeof(win_versions[0]))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment