static HRESULT WINAPI ConnectionPointContainer_FindConnectionPoint(IConnectionPointContainer *iface, REFIID riid, IConnectionPoint **ppCP) { ConnectionPointContainer *This = CONPTCONT_THIS(iface); ConnectionPoint *iter; TRACE("(%p)->(%s %p)\n", This, debugstr_cp_guid(riid), ppCP); if(This->forward_container) return IConnectionPointContainer_FindConnectionPoint(CONPTCONT(This), riid, ppCP); *ppCP = NULL; for(iter = This->cp_list; iter; iter = iter->next) { if(IsEqualGUID(iter->iid, riid)) *ppCP = CONPOINT(iter); } if(*ppCP) { IConnectionPoint_AddRef(*ppCP); return S_OK; } FIXME("unsupported riid %s\n", debugstr_cp_guid(riid)); return CONNECT_E_NOCONNECTION; }
static HRESULT WINAPI ConnectionPointContainer_FindConnectionPoint(IConnectionPointContainer *iface, REFIID riid, IConnectionPoint **ppCP) { ConnectionPointContainer *This = impl_from_IConnectionPointContainer(iface); ConnectionPoint *cp; TRACE("(%p)->(%s %p)\n", This, debugstr_cp_guid(riid), ppCP); if(This->forward_container) return IConnectionPointContainer_FindConnectionPoint(&This->forward_container->IConnectionPointContainer_iface, riid, ppCP); cp = get_cp(This, riid, TRUE); if(!cp) { FIXME("unsupported riid %s\n", debugstr_cp_guid(riid)); *ppCP = NULL; return CONNECT_E_NOCONNECTION; } *ppCP = &cp->IConnectionPoint_iface; IConnectionPoint_AddRef(*ppCP); return S_OK; }