Commit 0e3e2875 authored by Alexandre Julliard's avatar Alexandre Julliard

wintrust/tests: Fix the WintrustGetRegPolicyFlags to work right the first time.

parent e04fe246
...@@ -311,6 +311,8 @@ static void test_RegPolicyFlags(void) ...@@ -311,6 +311,8 @@ static void test_RegPolicyFlags(void)
if (!pGetFlags || !pSetFlags) if (!pGetFlags || !pSetFlags)
skip("Policy flags functions not present\n"); skip("Policy flags functions not present\n");
pGetFlags(&flags2);
r = RegOpenKeyExA(HKEY_CURRENT_USER, Software_Publishing, 0, KEY_ALL_ACCESS, r = RegOpenKeyExA(HKEY_CURRENT_USER, Software_Publishing, 0, KEY_ALL_ACCESS,
&key); &key);
ok(!r, "RegOpenKeyEx failed: %d\n", r); ok(!r, "RegOpenKeyEx failed: %d\n", r);
...@@ -319,7 +321,6 @@ static void test_RegPolicyFlags(void) ...@@ -319,7 +321,6 @@ static void test_RegPolicyFlags(void)
r = RegQueryValueExA(key, State, NULL, NULL, (LPBYTE)&flags1, &size); r = RegQueryValueExA(key, State, NULL, NULL, (LPBYTE)&flags1, &size);
ok(!r, "RegQueryValueEx failed: %d\n", r); ok(!r, "RegQueryValueEx failed: %d\n", r);
pGetFlags(&flags2);
ok(flags1 == flags2, "Got %08x flags instead of %08x\n", flags1, flags2); ok(flags1 == flags2, "Got %08x flags instead of %08x\n", flags1, flags2);
flags3 = flags2 | 1; flags3 = flags2 | 1;
......
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