COleControlSite::DisconnectSink
void COleControlSite::DisconnectSink(REFIID iid, DWORD dwCookie)
{
if (dwCookie == 0 || m_pObject == NULL)
return;
LPCONNECTIONPOINTCONTAINER pConnPtCont;
if (SUCCEEDED(m_pObject->QueryInterface(IID_IConnectionPointContainer,
(LPVOID*)&pConnPtCont))) //在这里出现错误{
ASSERT(pConnPtCont != NULL);
LPCONNECTIONPOINT pConnPt = NULL;
if (SUCCEEDED(pConnPtCont->FindConnectionPoint(iid, &pConnPt)))
{
ASSERT(pConnPt != NULL);
pConnPt->Unadvise(dwCookie);
pConnPt->Release();
}
pConnPtCont->Release();
}
}