/********************************************************************** * COMCAT_ICatInformation_EnumClassesOfCategories */ static HRESULT WINAPI COMCAT_ICatInformation_EnumClassesOfCategories( LPCATINFORMATION iface, ULONG cImplemented, CATID *rgcatidImpl, ULONG cRequired, CATID *rgcatidReq, LPENUMCLSID *ppenumCLSID) { struct class_categories *categories; TRACE("\n"); if (cImplemented == (ULONG)-1) cImplemented = 0; if (cRequired == (ULONG)-1) cRequired = 0; if (ppenumCLSID == NULL || (cImplemented && rgcatidImpl == NULL) || (cRequired && rgcatidReq == NULL)) return E_POINTER; categories = COMCAT_PrepareClassCategories(cImplemented, rgcatidImpl, cRequired, rgcatidReq); if (categories == NULL) return E_OUTOFMEMORY; *ppenumCLSID = COMCAT_CLSID_IEnumGUID_Construct(categories); if (*ppenumCLSID == NULL) { HeapFree(GetProcessHeap(), 0, categories); return E_OUTOFMEMORY; } IEnumGUID_AddRef(*ppenumCLSID); return S_OK; }
static HRESULT WINAPI CLSIDEnumGUID_QueryInterface( IEnumGUID *iface, REFIID riid, LPVOID *ppvObj) { TRACE("%s\n",debugstr_guid(riid)); if (ppvObj == NULL) return E_POINTER; if (IsEqualGUID(riid, &IID_IUnknown) || IsEqualGUID(riid, &IID_IEnumGUID)) { *ppvObj = iface; IEnumGUID_AddRef(iface); return S_OK; } return E_NOINTERFACE; }