CConnectionPoint::GetNextConnection

Retrieves a pointer to the connection element at pos.

LPUNKNOWN GetNextConnection( 
   POSITION& pos 
) const;

Parameters

  • pos
    Specifies a reference to a POSITION value returned by a previous GetNextConnection or GetStartPosition call.

Return Value

A pointer to the connection element specified by pos, or NULL.

Remarks

This function is most useful for iterating through all the elements in the connection map. When iterating, skip any NULLs returned from this function.

Example

void CMyClass::CallSinkFunc()
{
    POSITION pos = m_xSampleConnPt.GetStartPosition();
    ISampleSink* pSampleSink;
    while( pos != NULL )
    {
        pSampleSink = (ISampleSink*)(m_xSampleConnPt.GetNextConnection(pos));
        if(pSampleSink != NULL)
            pSampleSink->SinkFunc();
    }
}

Requirements

Header: afxdisp.h

See Also

Reference

CConnectionPoint Class

Hierarchy Chart