32#define ok_ole_success(hr, func) ok(hr == S_OK, func " failed with error 0x%08x\n", hr)
36 HKEY hkey = 0, hkey2 = 0;
42 "Implemented Categories\\{deadcafe-0000-0000-0000-000000000000}",
52 "CLSID\\{deadcafe-beed-bead-dead-cafebeaddead}\\Implemented Categories\\{deadcafe-0000-0000-0000-000000000000}");
54 "CLSID\\{deadcafe-beed-bead-dead-cafebeaddead}\\Implemented Categories");
56 "CLSID\\{deadcafe-beed-bead-dead-cafebeaddead}");
62 REFCLSID rclsid = &CLSID_StdComponentCategoriesMgr;
69 static const WCHAR szCatID[] = {
71 'd',
'e',
'a',
'd',
'c',
'a',
'f',
'e',
72 '-',
'0',
'0',
'0',
'0',
'-',
'0',
'0',
'0',
'0',
74 '-',
'0',
'0',
'0',
'0',
'0',
'0',
'0',
'0',
'0',
'0',
'0',
'0',
78 'd',
'e',
'a',
'd',
'c',
'a',
'f',
'e',
'-',
82 'c',
'a',
'f',
'e',
'b',
'e',
'a',
'd',
'd',
'e',
'a',
'd',
93 &IID_ICatInformation, (
void **)&pICat);
96 hr = ICatInformation_EnumClassesOfCategories(pICat, -1,
NULL, -1,
NULL,
100 IEnumGUID_Release(pIEnum);
102 hr = ICatInformation_EnumClassesOfCategories(pICat, 1, the_cat, -1,
NULL,
106 hr = IEnumGUID_Next(pIEnum,1,the_guid, &fetched);
108 ok (fetched == 0,
"Fetched wrong number of guids %u\n",fetched);
109 IEnumGUID_Release(pIEnum);
113 hr = ICatInformation_EnumClassesOfCategories(pICat, 1, the_cat, -1,
NULL, &pIEnum);
116 hr = IEnumGUID_Next(pIEnum,1,the_guid, &fetched);
117 ok (
hr ==
S_OK,
"Expected S_OK, got 0x%08x\n",
hr);
118 ok (fetched == 1,
"Fetched wrong number of guids %u\n",fetched);
119 ok (
IsEqualGUID(the_guid,&wanted_guid),
"Guids do not match\n");
121 IEnumGUID_Release(pIEnum);
124 else skip(
"Could not register the test category\n" );
126 ICatInformation_Release(pICat);
#define RegCloseKey(hKey)
LONG WINAPI RegCreateKeyA(HKEY hKey, LPCSTR lpSubKey, PHKEY phkResult)
LONG WINAPI RegSetValueA(HKEY hKeyOriginal, LPCSTR lpSubKey, DWORD dwType, LPCSTR lpData, DWORD cbData)
LONG WINAPI RegDeleteKeyA(_In_ HKEY hKey, _In_ LPCSTR lpSubKey)
HRESULT WINAPI DECLSPEC_HOTPATCH CoCreateInstance(REFCLSID rclsid, LPUNKNOWN pUnkOuter, DWORD dwClsContext, REFIID iid, LPVOID *ppv)
HRESULT WINAPI CLSIDFromString(LPCOLESTR idstr, LPCLSID id)
HRESULT WINAPI DECLSPEC_HOTPATCH OleInitialize(LPVOID reserved)
void WINAPI DECLSPEC_HOTPATCH OleUninitialize(void)
#define ok_ole_success(hr, func)
static void unregister_testentry(void)
static void do_enum(void)
static BOOL register_testentry(void)
static const WCHAR szGuid[]
#define IsEqualGUID(rguid1, rguid2)
#define HKEY_CLASSES_ROOT