CConnectionPoint::GetNextConnection
Retrieves a pointer to the connection element at pos.
LPUNKNOWN GetNextConnection(
POSITION& pos
) const;
Параметры
- pos
Specifies a reference to a POSITION value returned by a previous GetNextConnection or GetStartPosition call.
Возвращаемое значение
A pointer to the connection element specified by pos, or NULL.
Заметки
This function is most useful for iterating through all the elements in the connection map. When iterating, skip any NULLs returned from this function.
Пример
void CMyClass::CallSinkFunc()
{
POSITION pos = m_xSampleConnPt.GetStartPosition();
ISampleSink* pSampleSink;
while( pos != NULL )
{
pSampleSink = (ISampleSink*)(m_xSampleConnPt.GetNextConnection(pos));
if(pSampleSink != NULL)
pSampleSink->SinkFunc();
}
}
Требования
Header: afxdisp.h