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 method returns a pointer to the IConnectionPointinterface of a connection point for a specified IID, if that IID describes a supported outgoing interface.

Syntax

HRESULT FindConnectionPoint(
  REFIID 
riid,
  IConnectionPoint** 
ppCP 
);

Parameters

riid

[in] Interface identifier of the outgoing interface whose connection point object is being requested.

ppCP

[out] Address of IConnectionPoint* pointer variable that receives the interface pointer to the connection point that supports the riidinterface.

If an error occurs, the implementation sets * ppCPto NULL.

Return Value

This method supports the standard return values E_OUTOFMEMORY and E_UNEXPECTED, as well as the following:

S_OK

The ppCPpointer has a valid interface pointer.

E_POINTER

The address in ppCPis not valid. For example, it can be NULL.

CONNECT_E_NOCONNECTION

This connectable object does not support the outgoing interface specified by riid.

Remarks

This method is the QueryInterfaceequivalent for an object's outgoing interfaces, where the outgoing interface is specified with riidand where the interface pointer returned is always that of a connection point.

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

Notes to Callers

If the call is successful, the caller is responsible for releasing the connection point by calling (*ppCP)->Releasewhen the connection point is no longer needed.

Notes to Implementers

E_NOTIMPL is not allowed as a return value for this method. Any implementation of IConnectionPointContainermust implement this method for the connectable object's outgoing interfaces.

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