Commit 485a412b authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

ole32/tests: Fix tests failing on limited account.

parent 0beb178a
......@@ -2364,17 +2364,21 @@ static void test_OleRegGetUserType(void)
StringFromGUID2(&CLSID_non_existent, clsidW, sizeof(clsidW)/sizeof(clsidW[0]));
ret = RegCreateKeyExW(HKEY_CLASSES_ROOT, clsidkeyW, 0, NULL, 0, KEY_ALL_ACCESS, NULL, &clsidhkey, &disposition);
if (!ret)
{
ret = RegCreateKeyExW(clsidhkey, clsidW, 0, NULL, 0, KEY_ALL_ACCESS, NULL, &classkey, NULL);
if (ret)
RegCloseKey(clsidhkey);
}
if (ret == ERROR_ACCESS_DENIED)
{
skip("Failed to create test key, skipping some of OleRegGetUserType() tests.\n");
win_skip("Failed to create test key, skipping some of OleRegGetUserType() tests.\n");
return;
}
ok(!ret, "failed to create a key %d, error %d\n", ret, GetLastError());
ret = RegCreateKeyExW(clsidhkey, clsidW, 0, NULL, 0, KEY_ALL_ACCESS, NULL, &classkey, NULL);
ok(!ret, "failed to create a key %d, error %d\n", ret, GetLastError());
ret = RegSetValueExW(classkey, NULL, 0, REG_SZ, (const BYTE*)defvalueW, sizeof(defvalueW));
ok(!ret, "got %d, error %d\n", ret, GetLastError());
......
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