[PATCH 2/2] Fix some test failures on W2K

Paul Vriens Paul.Vriens.Wine at gmail.com
Wed Nov 18 13:58:35 CST 2009


---
 dlls/rsaenh/tests/rsaenh.c |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/dlls/rsaenh/tests/rsaenh.c b/dlls/rsaenh/tests/rsaenh.c
index bf6ed0f..b56f4d4 100644
--- a/dlls/rsaenh/tests/rsaenh.c
+++ b/dlls/rsaenh/tests/rsaenh.c
@@ -72,9 +72,15 @@ static void uniquecontainer(char *unique)
     HKEY hkey;
     char guid[MAX_PATH];
     DWORD size = MAX_PATH;
+    HRESULT ret;
 
     /* Get the MachineGUID */
-    RegOpenKeyExA(HKEY_LOCAL_MACHINE, szCryptography, 0, KEY_READ | KEY_WOW64_64KEY, &hkey);
+    ret = RegOpenKeyExA(HKEY_LOCAL_MACHINE, szCryptography, 0, KEY_READ | KEY_WOW64_64KEY, &hkey);
+    if (ret == ERROR_ACCESS_DENIED)
+    {
+        /* Windows 2000 can't handle KEY_WOW64_64KEY */
+        RegOpenKeyA(HKEY_LOCAL_MACHINE, szCryptography, &hkey);
+    }
     RegQueryValueExA(hkey, szMachineGuid, NULL, NULL, (LPBYTE)guid, &size);
     RegCloseKey(hkey);
 
-- 
1.6.2.5


--------------070904000906030600050502--



More information about the wine-patches mailing list