IEnumConnectionPoints:IUnknown

This interface enumerates connection points. 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

To support connectable objects, you need to provide four related interfaces:

The IConnectionPointContainer interface indicates the existence of the outgoing interfaces. It provides access to an enumerator subobject with the IEnumConnectionPoints interface. It also provides a connection point subobject with the IConnectionPoint interface. The IConnectionPoint interface provides access to an enumerator subobject with the IEnumConnections interface.

The connection point is a separate subobject to avoid circular reference counting problems.

A connectable object can be asked to enumerate its supported connection points through IConnectionPointContainer::EnumConnectionPoints. The resulting enumerator returned from this method implements the interface IEnumConnectionPoints, through which a client can access all the individual connection point subobjects supported within the connectable object itself, where each connection point implements IConnectionPoint.

When enumerating connections through IEnumConnectionPoints, the enumerator is responsible for calling AddRef, and the caller is responsible for later calling Release when those pointers are no longer needed.

When to Use

Use the IEnumConnectionPoints interface to enumerate all the supported connection points for each outgoing IID.

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
Clone Creates another enumerator that contains the same enumeration state as the current one.
Next Enumerates the next cConnections elements in the enumerator's list, returning them in rgpcn along with the actual number of enumerated elements in pcFetched.
Reset Instructs the enumerator to position itself at the beginning of the list of elements.
Skip Instructs the enumerator to skip the next cConnections elements in the enumeration so that the next call to IEnumConnectionPoints::Next will not return those elements.

Remarks

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

Requirements

OS Versions: Windows CE 3.0 and later.
Header: Ocidl.h, Ocidl.idl.
Link Library: Ole32.lib, Uuid.lib.

See Also

IConnectionPoint | IConnectionPointContainer | IEnumConnections

Last updated on Wednesday, April 13, 2005

© 2005 Microsoft Corporation. All rights reserved.