From c2e922b3dfd2b2f27b8412a6c190aa23433ece57 Mon Sep 17 00:00:00 2001 From: Rom Walton Date: Wed, 14 Sep 2011 22:03:16 +0000 Subject: [PATCH] - client: Update Windows detection code to support Windows 8. (From: [P3D] Crashtest) client/ hostinfo_win.cpp svn path=/trunk/boinc/; revision=24208 --- checkin_notes | 7 +++++++ client/hostinfo_win.cpp | 44 ++++++++++++++++++++++++++++++++++++++++- 2 files changed, 50 insertions(+), 1 deletion(-) diff --git a/checkin_notes b/checkin_notes index 677df8c0b1..dadfe483e0 100644 --- a/checkin_notes +++ b/checkin_notes @@ -6025,3 +6025,10 @@ David 14 Sept 2011 app_ipc.cpp client/ cs_notice.cpp + +Rom 14 Sept 2011 + - client: Update Windows detection code to support Windows 8. + (From: [P3D] Crashtest) + + client/ + hostinfo_win.cpp diff --git a/client/hostinfo_win.cpp b/client/hostinfo_win.cpp index 29f889da9a..889e6fd2be 100644 --- a/client/hostinfo_win.cpp +++ b/client/hostinfo_win.cpp @@ -265,6 +265,33 @@ #ifndef PRODUCT_ULTIMATE_E #define PRODUCT_ULTIMATE_E 0x00000047 #endif +#ifndef PRODUCT_ENTERPRISE_EVALUATION +#define PRODUCT_ENTERPRISE_EVALUATION 0x00000048 +#endif +#ifndef PRODUCT_PRERELEASE +#define PRODUCT_PRERELEASE 0x0000004A +#endif +#ifndef PRODUCT_MULTIPOINT_STANDARD_SERVER +#define PRODUCT_MULTIPOINT_STANDARD_SERVER 0x0000004C +#endif +#ifndef PRODUCT_MULTIPOINT_PREMIUM_SERVER +#define PRODUCT_MULTIPOINT_PREMIUM_SERVER 0x0000004D +#endif +#ifndef PRODUCT_STANDARD_EVALUATION_SERVER +#define PRODUCT_STANDARD_EVALUATION_SERVER 0x0000004F +#endif +#ifndef PRODUCT_DATACENTER_EVALUATION_SERVER +#define PRODUCT_DATACENTER_EVALUATION_SERVER 0x00000050 +#endif +#ifndef PRODUCT_PRERELEASE_ARM +#define PRODUCT_PRERELEASE_ARM 0x00000051 +#endif +#ifndef PRODUCT_PRERELEASE_N +#define PRODUCT_PRERELEASE_N 0x00000052 +#endif +#ifndef PRODUCT_ENTERPRISE_N_EVALUATION +#define PRODUCT_ENTERPRISE_N_EVALUATION 0x00000054 +#endif // Newer suite types than what is currently defined in @@ -360,6 +387,15 @@ int get_os_information( switch (osvi.dwPlatformId) { case VER_PLATFORM_WIN32_NT: + if ( osvi.dwMajorVersion == 6 && osvi.dwMinorVersion == 2 ) { + if( osvi.wProductType == VER_NT_WORKSTATION ) { + strcat(os_name, "Windows 8"); + } else { + strcat(os_name, "Windows 8 Server "); + } + pGPI( 6, 2, 0, 0, &dwType); + } + if ( osvi.dwMajorVersion == 6 && osvi.dwMinorVersion == 1 ) { if( osvi.wProductType == VER_NT_WORKSTATION ) { strcat(os_name, "Windows 7"); @@ -499,7 +535,13 @@ int get_os_information( case PRODUCT_ENTERPRISE_E: strcat(szSKU, "Enterprise E "); break; - } + case PRODUCT_PRERELEASE: + strcat(szSKU, "Developer Preview "); + break; + case PRODUCT_PRERELEASE_N: + strcat(szSKU, "Developer Preview N "); + break; + } } else if( (osvi.dwMajorVersion == 5 && osvi.dwMinorVersion == 2) ) { if( osvi.wSuiteMask & VER_SUITE_PERSONAL ) { strcat(szSKU, "Home ");