[PATCH 1/3] ntdll: Implement RtlGetProductInfo [try 2]

Detlef Riekenberg wine.dev at web.de
Wed May 30 11:40:33 CDT 2012


The "Games for Windows Client" installer produced a FIXME for
RtlGetProductInfo and the function is too simple to be a stub.

The installer is linked here:
http://www.xbox.com/en-GB/LIVE/PC/DownloadClient

try 2:
The wrapper in kernel32 is still needed.
(BOOL != BOOLEAN)

--
By by ... Detlef
---
 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 0185d7f..745ee5d 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 02c92e6..bed2a19 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
-- 
1.7.5.4




More information about the wine-patches mailing list