60{
62 REFCLSID rclsid = &CLSID_StdComponentCategoriesMgr;
68
69 static const WCHAR szCatID[] = {
70 '{',
71 'd','e','a','d','c','a','f','e',
72 '-','0','0','0','0','-','0','0','0','0',
73 '-','0','0','0','0',
74 '-','0','0','0','0','0','0','0','0','0','0','0','0',
75 '}',0};
77 '{',
78 'd','e','a','d','c','a','f','e','-',
79 'b','e','e','d','-',
80 'b','e','a','d','-',
81 'd','e','a','d','-',
82 'c','a','f','e','b','e','a','d','d','e','a','d',
83 '}',0};
84
86
89
91
93 &IID_ICatInformation, (void **)&pICat);
95
96 hr = ICatInformation_EnumClassesOfCategories(pICat, -1,
NULL, -1,
NULL,
97 &pIEnum);
99
100 IEnumGUID_Release(pIEnum);
101
102 hr = ICatInformation_EnumClassesOfCategories(pICat, 1, the_cat, -1,
NULL,
103 &pIEnum);
105
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);
110
112 {
113 hr = ICatInformation_EnumClassesOfCategories(pICat, 1, the_cat, -1,
NULL, &pIEnum);
115
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");
120
121 IEnumGUID_Release(pIEnum);
123 }
124 else skip(
"Could not register the test category\n" );
125
126 ICatInformation_Release(pICat);
127
129}
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 BOOL register_testentry(void)
static const WCHAR szGuid[]
#define IsEqualGUID(rguid1, rguid2)