Commit 352d8570 authored by Mikołaj Zalewski's avatar Mikołaj Zalewski Committed by Alexandre Julliard

advapi32: tests: Make WOW64 test pass under Win2k, fix a flag.

parent 4c64d0cd
......@@ -953,12 +953,14 @@ static void test_reg_open_key(void)
/* WOW64 flags */
hkResult = NULL;
ret = RegOpenKeyExA(HKEY_LOCAL_MACHINE, "Software", 0, KEY_READ|KEY_WOW64_32KEY, &hkResult);
ok(ret == ERROR_SUCCESS && hkResult != NULL, "RegOpenKeyEx with KEY_WOW64_32KEY failed (err=%u)\n", ret);
ok((ret == ERROR_SUCCESS && hkResult != NULL) || broken(ret == ERROR_ACCESS_DENIED /* NT4, win2k */),
"RegOpenKeyEx with KEY_WOW64_32KEY failed (err=%u)\n", ret);
RegCloseKey(hkResult);
hkResult = NULL;
ret = RegOpenKeyExA(HKEY_LOCAL_MACHINE, "Software", 0, KEY_READ|KEY_WOW64_64KEY, &hkResult);
ok(ret == ERROR_SUCCESS && hkResult != NULL, "RegOpenKeyEx with KEY_WOW64_64KEY failed (err=%u)\n", ret);
ok((ret == ERROR_SUCCESS && hkResult != NULL) || broken(ret == ERROR_ACCESS_DENIED /* NT4, win2k */),
"RegOpenKeyEx with KEY_WOW64_64KEY failed (err=%u)\n", ret);
RegCloseKey(hkResult);
}
......@@ -989,12 +991,14 @@ static void test_reg_create_key(void)
/* WOW64 flags - open an existing key */
hkey1 = NULL;
ret = RegCreateKeyExA(HKEY_LOCAL_MACHINE, "Software", 0, NULL, 0, KEY_READ|KEY_WOW64_32KEY, NULL, &hkey1, NULL);
ok(ret == ERROR_SUCCESS && hkey1 != NULL, "RegOpenKeyEx with KEY_WOW64_32KEY failed (err=%u)\n", ret);
ok((ret == ERROR_SUCCESS && hkey1 != NULL) || broken(ret == ERROR_ACCESS_DENIED /* NT4, win2k */),
"RegOpenKeyEx with KEY_WOW64_32KEY failed (err=%u)\n", ret);
RegCloseKey(hkey1);
hkey1 = NULL;
ret = RegCreateKeyExA(HKEY_LOCAL_MACHINE, "Software", 0, NULL, 0, KEY_READ|KEY_WOW64_32KEY, NULL, &hkey1, NULL);
ok(ret == ERROR_SUCCESS && hkey1 != NULL, "RegOpenKeyEx with KEY_WOW64_64KEY failed (err=%u)\n", ret);
ret = RegCreateKeyExA(HKEY_LOCAL_MACHINE, "Software", 0, NULL, 0, KEY_READ|KEY_WOW64_64KEY, NULL, &hkey1, NULL);
ok((ret == ERROR_SUCCESS && hkey1 != NULL) || broken(ret == ERROR_ACCESS_DENIED /* NT4, win2k */),
"RegOpenKeyEx with KEY_WOW64_64KEY failed (err=%u)\n", ret);
RegCloseKey(hkey1);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment