From b02951dfa7ff416f54205dab17ae3bb98e53ce7c Mon Sep 17 00:00:00 2001 From: Dmitry Timoshkov Date: Tue, 11 Jun 2013 14:47:51 +0900 Subject: [PATCH] ole32/tests: Make sure that key "Software\\Classes" exists under HKEY_CURRENT_USER. --- dlls/ole32/tests/compobj.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/dlls/ole32/tests/compobj.c b/dlls/ole32/tests/compobj.c index f2cdf6d3ae2..470adbd6d37 100644 --- a/dlls/ole32/tests/compobj.c +++ b/dlls/ole32/tests/compobj.c @@ -444,8 +444,9 @@ static void test_CoGetClassObject(void) { IUnknown_Release(pUnk); - res = RegOpenKeyExA(HKEY_CURRENT_USER, "Software\\Classes", 0, KEY_ALL_ACCESS, &hkey); - ok(!res, "RegOpenKeyExA returned %d\n", res); + res = RegCreateKeyEx(HKEY_CURRENT_USER, "Software\\Classes", 0, NULL, 0, + KEY_ALL_ACCESS, NULL, &hkey, NULL); + ok(!res, "RegCreateKeyEx returned %d\n", res); res = pRegOverridePredefKey(HKEY_CLASSES_ROOT, hkey); ok(!res, "RegOverridePredefKey returned %d\n", res); @@ -780,8 +781,9 @@ static void test_CoGetPSClsid(void) hr = CoGetPSClsid(&IID_IClassFactory, &clsid); ok_ole_success(hr, "CoGetPSClsid"); - res = RegOpenKeyExA(HKEY_CURRENT_USER, "Software\\Classes", 0, KEY_ALL_ACCESS, &hkey); - ok(!res, "RegOpenKeyExA returned %d\n", res); + res = RegCreateKeyEx(HKEY_CURRENT_USER, "Software\\Classes", 0, NULL, 0, + KEY_ALL_ACCESS, NULL, &hkey, NULL); + ok(!res, "RegCreateKeyEx returned %d\n", res); res = pRegOverridePredefKey(HKEY_CLASSES_ROOT, hkey); ok(!res, "RegOverridePredefKey returned %d\n", res);