Greg Geldorp : msi/tests: Check 64-bit reg view if key not present in 32-bit view.

Alexandre Julliard julliard at winehq.org
Thu Jan 27 12:43:21 CST 2011


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

Author: Greg Geldorp <ggeldorp at vmware.com>
Date:   Thu Jan 27 11:35:36 2011 +0100

msi/tests: Check 64-bit reg view if key not present in 32-bit view.

---

 dlls/msi/tests/action.c |   16 ++++++++++++----
 1 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/dlls/msi/tests/action.c b/dlls/msi/tests/action.c
index 9d90b42..33f5620 100644
--- a/dlls/msi/tests/action.c
+++ b/dlls/msi/tests/action.c
@@ -5870,6 +5870,7 @@ static void test_publish_assemblies(void)
     LONG res;
     HKEY hkey;
     const char *path;
+    int access;
 
     if (is_process_limited())
     {
@@ -5957,24 +5958,31 @@ static void test_publish_assemblies(void)
     r = MsiInstallProductA(msifile, "ALLUSERS=1");
     ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
 
-    res = RegOpenKeyA(HKEY_CLASSES_ROOT, classes_path_dotnet, &hkey);
+    access = KEY_QUERY_VALUE;
+    res = RegOpenKeyExA(HKEY_CLASSES_ROOT, classes_path_dotnet, 0, access, &hkey);
+    if (res == ERROR_FILE_NOT_FOUND && is_wow64) /* Vista WOW64 */
+    {
+        trace("Using 64-bit registry view for HKCR\\Installer\n");
+        access = KEY_QUERY_VALUE | KEY_WOW64_64KEY;
+        res = RegOpenKeyExA(HKEY_CLASSES_ROOT, classes_path_dotnet, 0, access, &hkey);
+    }
     ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
     CHECK_REG_STR(hkey, name_dotnet, "rcHQPHq?CA at Uv-XqMI1e>Z'q,T*76M@=YEg6My?~]");
     RegCloseKey(hkey);
 
     path = (is_wow64 || is_64bit) ? classes_path_dotnet_local_wow64 : classes_path_dotnet_local;
-    res = RegOpenKeyA(HKEY_CLASSES_ROOT, path, &hkey);
+    res = RegOpenKeyExA(HKEY_CLASSES_ROOT, path, 0, access, &hkey);
     ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
     CHECK_REG_STR(hkey, name_dotnet_local, "rcHQPHq?CA at Uv-XqMI1e>LF,8A?0d.AW at vcZ$Cgox");
     RegCloseKey(hkey);
 
-    res = RegOpenKeyA(HKEY_CLASSES_ROOT, classes_path_win32, &hkey);
+    res = RegOpenKeyExA(HKEY_CLASSES_ROOT, classes_path_win32, 0, access, &hkey);
     ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
     CHECK_REG_STR(hkey, name_win32, "rcHQPHq?CA at Uv-XqMI1e>}NJjwR'%D9v1p!v{WV(%");
     RegCloseKey(hkey);
 
     path = (is_wow64 || is_64bit) ? classes_path_win32_local_wow64 : classes_path_win32_local;
-    res = RegOpenKeyA(HKEY_CLASSES_ROOT, path, &hkey);
+    res = RegOpenKeyExA(HKEY_CLASSES_ROOT, path, 0, access, &hkey);
     ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
     CHECK_REG_STR(hkey, name_win32_local, "rcHQPHq?CA at Uv-XqMI1e>C)Uvlj*53A)u(QQ9=)X!");
     RegCloseKey(hkey);




More information about the wine-cvs mailing list