André Hentschel : gameux: Fix another test failure on Wine wow64.

Alexandre Julliard julliard at winehq.org
Fri Dec 24 09:26:18 CST 2010


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

Author: André Hentschel <nerv at dawncrow.de>
Date:   Fri Dec 24 00:51:41 2010 +0100

gameux: Fix another test failure on Wine wow64.

---

 dlls/gameux/gamestatistics.c |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/dlls/gameux/gamestatistics.c b/dlls/gameux/gamestatistics.c
index 5650c94..926023b 100644
--- a/dlls/gameux/gamestatistics.c
+++ b/dlls/gameux/gamestatistics.c
@@ -365,6 +365,7 @@ static HRESULT GAMEUX_getAppIdFromGDFPath(
     GAME_INSTALL_SCOPE installScope;
     GUID instanceId;
     LPWSTR lpRegistryPath;
+    HKEY hKey;
     DWORD dwLength = 49*sizeof(WCHAR);/* place for GUID */
 
     TRACE("(%s, %p)\n", debugstr_w(GDFBinaryPath), lpApplicationId);
@@ -390,11 +391,16 @@ static HRESULT GAMEUX_getAppIdFromGDFPath(
         hr = GAMEUX_buildGameRegistryPath(installScope, &instanceId, &lpRegistryPath);
 
     if(SUCCEEDED(hr))
-        hr = HRESULT_FROM_WIN32(RegGetValueW(HKEY_LOCAL_MACHINE,
-                lpRegistryPath, sApplicationId, RRF_RT_REG_SZ,
+        hr = HRESULT_FROM_WIN32(RegOpenKeyExW(HKEY_LOCAL_MACHINE,
+                lpRegistryPath, 0, KEY_READ | KEY_WOW64_64KEY, &hKey));
+
+    if(SUCCEEDED(hr))
+        hr = HRESULT_FROM_WIN32(RegGetValueW(hKey,
+                NULL, sApplicationId, RRF_RT_REG_SZ,
                 NULL, lpApplicationId, &dwLength));
 
     HeapFree(GetProcessHeap(), 0, lpRegistryPath);
+    RegCloseKey(hKey);
 
     TRACE("found app id: %s, return: %#x\n", debugstr_w(lpApplicationId), hr);
     return hr;




More information about the wine-cvs mailing list