Module: wine Branch: master Commit: 4102156e0fcc159a74e300e8e62f14aee4ae19f3 URL: http://source.winehq.org/git/wine.git/?a=commit;h=4102156e0fcc159a74e300e8e6...
Author: Hans Leidekker hans@codeweavers.com Date: Wed Aug 18 11:21:18 2010 +0200
msi/tests: Fix some WoW64 test failures.
---
dlls/msi/tests/msi.c | 8 ++++---- dlls/msi/tests/package.c | 9 ++------- 2 files changed, 6 insertions(+), 11 deletions(-)
diff --git a/dlls/msi/tests/msi.c b/dlls/msi/tests/msi.c index dc023f4..e4da576 100644 --- a/dlls/msi/tests/msi.c +++ b/dlls/msi/tests/msi.c @@ -4800,7 +4800,7 @@ static void test_MsiGetProductInfoEx(void) lstrcpyA(keypath, "Software\Microsoft\Installer\Products\"); lstrcatA(keypath, prod_squashed);
- res = RegCreateKeyA(HKEY_CURRENT_USER, keypath, &prodkey); + res = RegCreateKeyExA(HKEY_CURRENT_USER, keypath, 0, NULL, 0, access, NULL, &prodkey, NULL); ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
sz = MAX_PATH; @@ -5191,7 +5191,7 @@ static void test_MsiGetProductInfoEx(void) RegDeleteValueA(prodkey, "HelpTelephone"); RegDeleteValueA(prodkey, "HelpLink"); RegDeleteValueA(prodkey, "LocalPackage"); - RegDeleteKeyA(prodkey, ""); + delete_key(prodkey, "", access & KEY_WOW64_64KEY); RegCloseKey(prodkey);
/* MSIINSTALLCONTEXT_USERMANAGED */ @@ -5604,9 +5604,9 @@ static void test_MsiGetProductInfoEx(void) RegDeleteValueA(propkey, "HelpTelephone"); RegDeleteValueA(propkey, "HelpLink"); RegDeleteValueA(propkey, "ManagedLocalPackage"); - RegDeleteKeyA(propkey, ""); + delete_key(propkey, "", access & KEY_WOW64_64KEY); RegCloseKey(propkey); - RegDeleteKeyA(localkey, ""); + delete_key(localkey, "", access & KEY_WOW64_64KEY); RegCloseKey(localkey);
lstrcpyA(keypath, "Software\Microsoft\Windows\CurrentVersion\Installer\Managed\"); diff --git a/dlls/msi/tests/package.c b/dlls/msi/tests/package.c index b326617..ce9fc2a 100644 --- a/dlls/msi/tests/package.c +++ b/dlls/msi/tests/package.c @@ -7866,11 +7866,6 @@ static void test_appsearch_reglocator(void) LPCSTR str; LONG res; UINT r; - REGSAM access = KEY_ALL_ACCESS; - BOOL wow64; - - if (pIsWow64Process && pIsWow64Process(GetCurrentProcess(), &wow64) && wow64) - access |= KEY_WOW64_64KEY;
version = TRUE; if (!create_file_with_version("test.dll", MAKELONG(2, 1), MAKELONG(4, 3))) @@ -7910,7 +7905,7 @@ static void test_appsearch_reglocator(void) ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); }
- res = RegCreateKeyExA(HKEY_LOCAL_MACHINE, "Software\Wine", 0, NULL, 0, access, NULL, &hklm, NULL); + res = RegCreateKeyA(HKEY_LOCAL_MACHINE, "Software\Wine", &hklm); ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);
res = RegSetValueA(hklm, NULL, REG_SZ, "defvalue", 8); @@ -8516,7 +8511,7 @@ static void test_appsearch_reglocator(void) RegDeleteValueA(hklm, "Value15"); RegDeleteValueA(hklm, "Value16"); RegDeleteValueA(hklm, "Value17"); - delete_key(hklm, "", access); + RegDeleteKey(hklm, ""); RegCloseKey(hklm);
RegDeleteValueA(classes, "Value1");