Partager via


IConnectionPointContainer::FindConnectionPoint

A version of this page is also available for

Windows Embedded CE 6.0 R3

4/8/2010

This method returns a pointer to the IConnectionPoint interface 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 riid interface.

    If an error occurs, the implementation sets *ppCP to NULL.

Return Value

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

  • S_OK
    The ppCP pointer has a valid interface pointer.
  • E_POINTER
    The address in ppCP is 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 QueryInterface equivalent for an object's outgoing interfaces, where the outgoing interface is specified with riid and 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)->Release when 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 IConnectionPointContainer must 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

Reference

IConnectionPoint