IConnectionPointImpl

template< class T, const IID* piid, class CDV = CComDynamicUnkArray >
class IConnectionPointImpl : public _ICPLocator< piid >

Parameters

T Your class, derived from IConnectionPointImpl.

piid A pointer to the IID of the interface represented by the connection point object.

CDV A class that manages the connections. The default value is CComDynamicUnkArray, which allows unlimited connections. You can also use CComUnkArray, which specifies a fixed number of connections.

IConnectionPointImpl implements a connection point, which allows an object to expose an outgoing interface to the client. The client implements this interface on an object called a sink.

ATL uses IConnectionPointContainerImpl to implement the connectable object. Each connection point within the connectable object represents an outgoing interface, identified by piid. Class CDV manages the connections between the connection point and a sink. Each connection is uniquely identified by a “cookie.”

For more information about using connection points in ATL, see the article Connection Points.

#include <atlcom.h>

See Also IConnectionPoint in the Win32 SDK


IConnectionPointImpl Class Members

IConnectionPoint Methods
AdviseEstablishes a connection between the connection point and a sink.
EnumConnectionsCreates an enumerator to iterate through the connections for the connection point.
GetConnectionInterfaceRetrieves the IID of the interface represented by the connection point.
GetConnectionPointContainerRetrieves the connectable object's IConnectionPointContainer interface pointer.
UnadviseTerminates a connection previously established through Advise.
Data Members
m_vecManages the connections for the connection point.

IConnectionPointImpl Overview


Methods


IConnectionPointImpl::Advise

HRESULT Advise( IUnknown* pUnkSink, DWORD* pdwCookie );

See IConnectionPoint::Advise in the Win32 SDK.

Remarks

Establishes a connection between the connection point and a sink.

To terminated the connection call, Unadvise.

IConnectionPointImpl Overview | Class Members


IConnectionPointImpl::EnumConnections

HRESULT EnumConnections( IEnumConnections** ppEnum );

See IConnectionPoint::EnumConnections in the Win32 SDK.

Remarks

Creates an enumerator to iterate through the connections for the connection point.

IConnectionPointImpl Overview | Class Members

See Also IEnumConnections in the Win32 SDK


IConnectionPointImpl::GetConnectionInterface

HRESULT GetConnectionInterface( IID* piid2 );

See IConnectionPoint::GetConnectionInterface in the Win32 SDK.

Remarks

Retrieves the IID of the interface represented by the connection point.

IConnectionPointImpl Overview | Class Members


IConnectionPointImpl::GetConnectionPointContainer

HRESULT GetConnectionPointContainer( IConnectionPointContainer** ppCPC );

See IConnectionPoint::GetConnectionPointContainer in the Win32 SDK.

Remarks

Retrieves an interface pointer to the connectable object.

IConnectionPointImpl Overview | Class Members

See Also IConnectionPointContainerImpl


IConnectionPointImpl::Unadvise

HRESULT Unadvise( DWORD dwCookie );

See IConnectionPoint::Unadvise in the Win32 SDK.

Remarks

Terminates a connection previously established through Advise.

IConnectionPointImpl Overview | Class Members


Data Members


IConnectionPointImpl::m_vec

CDV m_vec;

Remarks

Manages the connections between the connection point object and a sink. By default, m_vec is of type CComDynamicUnkArray.

IConnectionPointImpl Overview | Class Members