diff --git a/dlls/atl/tests/registrar.c b/dlls/atl/tests/registrar.c index c05b672..b6d3896 100644 --- a/dlls/atl/tests/registrar.c +++ b/dlls/atl/tests/registrar.c @@ -37,36 +37,8 @@ #include #include - -static BOOL is_process_limited(void) -{ - static BOOL (WINAPI *pOpenProcessToken)(HANDLE, DWORD, PHANDLE) = NULL; - HANDLE token; - - if (!pOpenProcessToken) - { - HMODULE hadvapi32 = GetModuleHandleA("advapi32.dll"); - pOpenProcessToken = (void*)GetProcAddress(hadvapi32, "OpenProcessToken"); - if (!pOpenProcessToken) - return FALSE; - } - - if (pOpenProcessToken(GetCurrentProcess(), TOKEN_QUERY, &token)) - { - BOOL ret; - TOKEN_ELEVATION_TYPE type = TokenElevationTypeDefault; - DWORD size; - - ret = GetTokenInformation(token, TokenElevationType, &type, sizeof(type), &size); - CloseHandle(token); - return (ret && type == TokenElevationTypeLimited); - } - return FALSE; -} - - static const char textA[] = -"HKCR \n" +"HKCU \n" "{ \n" " ForceRemove eebf73c4-50fd-478f-bbcf-db212221227a \n" " { \n" @@ -96,7 +68,7 @@ static void test_registrar(void) hr = CoCreateInstance(&CLSID_Registrar, NULL, CLSCTX_INPROC_SERVER, &IID_IRegistrar, (void**)®istrar); if (FAILED(hr)) { - skip("creating IRegistrar failed, hr = 0x%08X\n", hr); + win_skip("creating IRegistrar failed, hr = 0x%08X\n", hr); return; } @@ -112,17 +84,14 @@ static void test_registrar(void) MultiByteToWideChar(CP_ACP, 0, textA, -1, textW, count); hr = IRegistrar_StringRegister(registrar, textW); + ok(hr == S_OK, "StringRegister failed: %08x\n", hr); if (FAILED(hr)) { - BOOL is_limited = is_process_limited(); - ok(hr == DISP_E_EXCEPTION && is_limited, - "IRegistrar_StringRegister failed, hr = 0x%08X, is_limited=%d\n", hr, is_limited); - skip("Skipping registrar tests\n"); IRegistrar_Release(registrar); return; } - lret = RegOpenKeyA(HKEY_CLASSES_ROOT, "eebf73c4-50fd-478f-bbcf-db212221227a", &key); + lret = RegOpenKeyA(HKEY_CURRENT_USER, "eebf73c4-50fd-478f-bbcf-db212221227a", &key); ok(lret == ERROR_SUCCESS, "error %d opening registry key\n", lret); size = sizeof(dword); @@ -182,7 +151,6 @@ static void test_aggregation(void) "CoCreateInstance failed: %08x, expected CLASS_E_NOAGGREGATION\n", hres); ok(!unk || unk == (IUnknown*)0xdeadbeef, "unk = %p\n", unk); } - START_TEST(registrar) { CoInitialize(NULL);