IConnectionPointContainer::EnumConnectionPoints

HRESULT IConnectionPointContainer::EnumConnectionPoints([out] IEnumConnectionPoints **ppEnum);

Creates an enumerator of all the connection points supported in the connectable object, one connection point per IID. Since IEnumConnectionPoints enumerates IConnectionPoint* types, the caller must use IConnectionPoint::GetConnectionInterface to determine the actual IID that the connection point supports.

The caller of this member must call (*ppEnum)->Release when the enumerator object is no longer needed.

Argument

Type

Description

ppEnum

IEnumConnectionPoints *

[out] A pointer to the caller's variable that is to receive the interface pointer to the enumerator. The caller is responsible for releasing this pointer after this function returns successfully.


Return Value

Meaning

S_OK

The enumerator was created successfully.

E_UNEXPECTED

An unknown error occurred.

E_POINTER

The value passed in ppEnum is not valid (such as NULL).

E_OUTOFMEMORY

There was not enough memory to create the enumerator object.


Comments E_NOTIMPL is specifically disallowed because outside of type information there would be no other means through which a caller could find the IIDs of the outgoing interfaces.