Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
A version of this page is also available for
4/8/2010

This interface supports connection points for connectable objects.

Connectable objects support the following features:

  • Outgoing interfaces, such as event sets

  • The ability to enumerate the IIDs of the outgoing interfaces

  • The ability to connect and disconnect sinks to the object for those outgoing IIDs

  • The ability to enumerate the connections that exist to a particular outgoing interface

When to Implement

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 IConnectionPointContainerinterface is implemented on the connectable object to indicate the existence of the outgoing interfaces.

It provides access to an enumerator subobject with the IEnumConnectionPointsinterface. It also provides access to all the connection point subobjects, each of which implements the IConnectionPointinterface.

The IConnectionPointinterface provides access to an enumerator subobject with the IEnumConnectionsinterface.

Each connection point is a separate subobject 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::EnumConnectionsmethod.

When to Use

A client can use the IConnectionPointContainerinterface in these ways:

  • To obtain access to an enumerator subobject with the IEnumConnectionPointsinterface. The IEnumConnectionPointsinterface can then be used to enumerate connection points for each outgoing IID.

  • To obtain access to connection point subobjects with the IConnectionPointinterface for each outgoing IID.

    Through the IConnectionPointinterface, a client starts or terminates an advisory loop with the connectable object and the client's own sink. The client can also use the IConnectionPointinterface to obtain an enumerator object with the IEnumConnectionsinterface to enumerate the connections that it knows about.

Methods in Vtable Order

IUnknown method Description

QueryInterface

Returns pointers to supported interfaces.

AddRef

Increments the reference count.

Release

Decrements the reference count.

Method Description

GetConnectionInterface

Returns the IID of the outgoing interface managed by this connection point.

GetConnectionPointContainer

Returns the parent (connectable) object's IConnectionPointContainerinterface 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.

Remarks

To determine whether the platform supports this interface, see Determining Supported COM APIs.

Requirements

Header ocidl.h, ocidl.idl
Library ole32.lib, uuid.lib
Windows Embedded CE Windows CE 3.0 and later
Windows Mobile Windows Mobile Version 5.0 and later

See Also