From 0f4e9ffc22f32affcd6fb92c9e1925883c208de1 Mon Sep 17 00:00:00 2001 From: Detlef Riekenberg Date: Wed, 30 May 2012 18:40:33 +0200 Subject: [PATCH] ntdll: Implement RtlGetProductInfo. --- dlls/ntdll/version.c | 18 +++++++++++++++--- include/winnt.h | 5 ++++- 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/dlls/ntdll/version.c b/dlls/ntdll/version.c index 0185d7f89f2..745ee5d0410 100644 --- a/dlls/ntdll/version.c +++ b/dlls/ntdll/version.c @@ -544,7 +544,7 @@ done: } /*********************************************************************** - * GetProductInfo (NTDLL.@) + * RtlGetProductInfo (NTDLL.@) * * Gives info about the current Windows product type, in a format compatible * with the given Windows version @@ -554,10 +554,22 @@ done: BOOLEAN WINAPI RtlGetProductInfo(DWORD dwOSMajorVersion, DWORD dwOSMinorVersion, DWORD dwSpMajorVersion, DWORD dwSpMinorVersion, PDWORD pdwReturnedProductType) { - FIXME("(%d,%d,%d,%d,%p): stub\n", dwOSMajorVersion, dwOSMinorVersion, + TRACE("(%d, %d, %d, %d, %p)\n", dwOSMajorVersion, dwOSMinorVersion, dwSpMajorVersion, dwSpMinorVersion, pdwReturnedProductType); - *pdwReturnedProductType = PRODUCT_ULTIMATE_N; + if (!pdwReturnedProductType) + return FALSE; + + if (dwOSMajorVersion < 6) + { + *pdwReturnedProductType = PRODUCT_UNDEFINED; + return FALSE; + } + + if (current_version->wProductType == VER_NT_WORKSTATION) + *pdwReturnedProductType = PRODUCT_ULTIMATE_N; + else + *pdwReturnedProductType = PRODUCT_STANDARD_SERVER; return TRUE; } diff --git a/include/winnt.h b/include/winnt.h index 02c92e62941..bed2a19568c 100644 --- a/include/winnt.h +++ b/include/winnt.h @@ -1976,7 +1976,7 @@ NTSYSAPI void WINAPI RtlCaptureContext(CONTEXT*); #define PRODUCT_DATACENTER_SERVER 0x00000008 #define PRODUCT_DATACENTER_SERVER_CORE 0x0000000C #define PRODUCT_DATACENTER_SERVER_CORE_V 0x00000027 -#define PRODUCT_SERVER_V 0x00000025 +#define PRODUCT_EMBEDDED 0x00000041 #define PRODUCT_ENTERPRISE 0x00000004 #define PRODUCT_ENTERPRISE_N 0x0000001B #define PRODUCT_ENTERPRISE_SERVER 0x0000000A @@ -1992,8 +1992,11 @@ NTSYSAPI void WINAPI RtlCaptureContext(CONTEXT*); #define PRODUCT_MEDIUMBUSINESS_SERVER_MANAGEMENT 0x0000001E #define PRODUCT_MEDIUMBUSINESS_SERVER_MESSAGING 0x00000020 #define PRODUCT_MEDIUMBUSINESS_SERVER_SECURITY 0x0000001F +#define PRODUCT_PROFESSIONAL 0x00000030 +#define PRODUCT_PROFESSIONAL_N 0x00000031 #define PRODUCT_SERVER_FOR_SMALLBUSINESS 0x00000018 #define PRODUCT_SERVER_FOR_SMALLBUSINESS_V 0x00000023 +#define PRODUCT_SERVER_V 0x00000025 #define PRODUCT_SMALLBUSINESS_SERVER 0x00000009 #define PRODUCT_STANDARD_SERVER 0x00000007 #define PRODUCT_STANDARD_SERVER_CORE 0x0000000D