The IConnectionPoint interface supports connection points for connectable objects.
Connectable objects support the following features:
Implement this interface as part of support for connectable objects. To create a connectable object, you need to implement objects that provide four related interfaces:
The IConnectionPointContainer interface is implemented on the connectable object to indicate the existence of the outgoing interfaces. It provides access to an enumerator sub-object with the IEnumConnectionPoints interface. It also provides access to all the connection point sub-objects, each of which implements the IConnectionPoint interface. The IConnectionPoint interface provides access to an enumerator sub-object with the IEnumConnections interface.
Each connection point is a separate sub-object to avoid circular reference counting problems.
A connection point controls how many connections (one or more) it will allow in its implementation of IConnectionPoint::Advise. A connection point that allows only one interface can return E_NOTIMPL from the IConnectionPoint::EnumConnections method.
A client can use the IConnectionPointContainer interface:
IUnknown Methods | Description |
---|---|
QueryInterface | Returns pointers to supported interfaces. |
AddRef | Increments reference count. |
Release | Decrements reference count. |
IConnectionPoint Methods | Description |
---|---|
GetConnectionInterface | Returns the IID of the outgoing interface managed by this connection point. |
GetConnectionPointContainer | Returns the parent (connectable) object's IConnectionPointContainer interface pointer. |
Advise | Creates a connection between a connection point and a client's sink, where the sink implements the outgoing interface supported by this connection point. |
Unadvise | Terminates a notification previously set up with Advise. |
EnumConnections | Returns an object to enumerate the current advisory connections for this connection point. |
Windows NT: Use version 4.0 or later.
Windows: Use Windows 95 or later.
Windows CE: Unsupported.
Header: Declared in ocidl.h.
IConnectionPoint, IConnectionPointContainer, IEnumConnectionPoints, IEnumConnections