Export (0) Print
Expand All

IConnectionPointContainer::FindConnectionPoint 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(
  [in]   REFIID riid,
  [out]  IConnectionPoint **ppCP
);

Parameters

riid [in]

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

ppCP [out]

The address of an IConnectionPoint interface pointer variable that receives the pointer to the connection point that supports the riid interface. If an error occurs, the implementation sets the value to NULL.

Return value

This method can return the standard return values E_OUTOFMEMORY and E_UNEXPECTED, as well as the following values.

Return codeDescription
S_OK

The method completed successfully.

E_POINTER

The address in ppCP is not valid. For example, it may 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.

Notes to Callers

If the call is successful, the caller is responsible for releasing the connection point by calling 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

Minimum supported client

Windows 2000 Professional [desktop apps | Windows Store apps]

Minimum supported server

Windows 2000 Server [desktop apps | Windows Store apps]

Header

OCIdl.h

IDL

OCIdl.idl

IID

IID_IConnectionPointContainer is defined as B196B284-BAB4-101A-B69C-00AA00341D07

See also

IConnectionPoint
IConnectionPointContainer

 

 

Community Additions

ADD
Show:
© 2014 Microsoft