Paul Vriens : rsaenh/tests: Fix some test failures on W2K.
Alexandre Julliard
julliard at winehq.org
Thu Nov 19 10:15:18 CST 2009
Module: wine
Branch: master
Commit: 8fe8d61a627273963d9dbde1efcc49c6704361c6
URL: http://source.winehq.org/git/wine.git/?a=commit;h=8fe8d61a627273963d9dbde1efcc49c6704361c6
Author: Paul Vriens <Paul.Vriens.Wine at gmail.com>
Date: Wed Nov 18 20:58:35 2009 +0100
rsaenh/tests: Fix some test failures on W2K.
---
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);
More information about the wine-cvs
mailing list