Exemplo n.º 1
0
static HRESULT WINAPI ConnectionPointContainer_FindConnectionPoint(IConnectionPointContainer *iface,
        REFIID riid, LPCONNECTIONPOINT *ppCP)
{
    ConnectionPointContainer *This = impl_from_IConnectionPointContainer(iface);

    if(!ppCP) {
        WARN("ppCP == NULL\n");
        return E_POINTER;
    }

    *ppCP = NULL;

    if(IsEqualGUID(&DIID_DWebBrowserEvents2, riid)) {
        TRACE("(%p)->(DIID_DWebBrowserEvents2 %p)\n", This, ppCP);
        *ppCP = &This->wbe2->IConnectionPoint_iface;
    }else if(IsEqualGUID(&DIID_DWebBrowserEvents, riid)) {
        TRACE("(%p)->(DIID_DWebBrowserEvents %p)\n", This, ppCP);
        *ppCP = &This->wbe->IConnectionPoint_iface;
    }else if(IsEqualGUID(&IID_IPropertyNotifySink, riid)) {
        TRACE("(%p)->(IID_IPropertyNotifySink %p)\n", This, ppCP);
        *ppCP = &This->pns->IConnectionPoint_iface;
    }

    if(*ppCP) {
        IConnectionPoint_AddRef(*ppCP);
        return S_OK;
    }

    WARN("Unsupported IID %s\n", debugstr_guid(riid));
    return CONNECT_E_NOCONNECTION;
}
Exemplo n.º 2
0
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;
}
Exemplo n.º 3
0
static HRESULT WINAPI cpc_FindConnectionPoint(IConnectionPointContainer *iface, REFIID riid, IConnectionPoint **point)
{
    rowpos *This = impl_from_IConnectionPointContainer(iface);

    TRACE("(%p)->(%s %p)\n", This, debugstr_guid(riid), point);

    if (IsEqualIID(riid, &IID_IRowPositionChange))
    {
        *point = &This->cp.IConnectionPoint_iface;
        IConnectionPoint_AddRef(*point);
        return S_OK;
    }
    else
    {
        FIXME("unsupported riid %s\n", debugstr_guid(riid));
        return CONNECT_E_NOCONNECTION;
    }
}
Exemplo n.º 4
0
static HRESULT WINAPI ConnectionPoint_EnumConnections(IConnectionPoint *iface,
                                                      IEnumConnections **ppEnum)
{
    ConnectionPoint *This = impl_from_IConnectionPoint(iface);
    EnumConnections *ret;

    TRACE("(%p)->(%p)\n", This, ppEnum);

    ret = heap_alloc(sizeof(*ret));
    if(!ret)
        return E_OUTOFMEMORY;

    ret->IEnumConnections_iface.lpVtbl = &EnumConnectionsVtbl;
    ret->ref = 1;
    ret->iter = 0;

    IConnectionPoint_AddRef(&This->IConnectionPoint_iface);
    ret->cp = This;

    *ppEnum = &ret->IEnumConnections_iface;
    return S_OK;
}
Exemplo n.º 5
0
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_mshtml_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_mshtml_guid(riid));
        *ppCP = NULL;
        return CONNECT_E_NOCONNECTION;
    }

    *ppCP = &cp->IConnectionPoint_iface;
    IConnectionPoint_AddRef(*ppCP);
    return S_OK;
}