Ejemplo n.º 1
0
/////////////////////////////////////////////////////////////////////////////
// CConnectionPoint::GetObjectDesc
//
/////////////////////////////////////////////////////////////////////////////
WCHAR* CConnectionPoint::GetObjectDesc()
{
	if(!m_strObjectDesc && m_pIConnectionPoint)
	{
		IID iid;
		if(SUCCEEDED(GetConnectionInterface(&iid)))
			m_strObjectDesc.CopyFrom(GetInterfaceName(iid));
	}

	return m_strObjectDesc;
}
Ejemplo n.º 2
0
STDMETHODIMP loConnPnt1::FindConnectionPoint(REFIID riid, IConnectionPoint **ppCP)
{
    HRESULT hr = S_OK;
    IID myiid;
    if (!ppCP) hr = E_POINTER;
    else if (S_OK == (hr = GetConnectionInterface(&myiid)))
        if (!IsEqualIID(riid, myiid)) hr = CONNECT_E_NOCONNECTION;
        else if (S_OK == (hr = icp_AddRef()))
        {
//      IConnectionPoint::AddRef();
            (*ppCP = this)->AddRef();
            icp_Release();
        }

    UL_NOTICE((LOGID, "FindConnPoints() %s", loStrError(hr)));
    return hr;
}