CoGetInterceptor function (callobj.h)

Instantiates the appropriate interceptor for the specified interface to be intercepted and returns the newly created interceptor.

Syntax

HRESULT CoGetInterceptor(
  [in]  REFIID   iidIntercepted,
  [in]  IUnknown *punkOuter,
  [in]  REFIID   iid,
  [out] void     **ppv
);

Parameters

[in] iidIntercepted

A reference to the identifier of the interface for which an interceptor is to be returned.

[in] punkOuter

If this parameter is NULL, the object is not being created as part of an aggregate. Otherwise, this parameter is a pointer to the aggregate object's IUnknown interface (the controlling IUnknown).

[in] iid

A reference to the identifier of the interface desired on the interceptor.

[out] ppv

The address of a pointer variable that receives the interface pointer requested in iid. Upon successful return, **ppv contains the requested interceptor pointer.

Return value

This function can return the following values.

Return code Description
S_OK
The function returned successfully.
E_UNEXPECTED
An unexpected error occurred.

Requirements

Requirement Value
Minimum supported client Windows 2000 Professional [desktop apps only]
Minimum supported server Windows 2000 Server [desktop apps only]
Target Platform Windows
Header callobj.h
Library Ole32.lib
DLL Ole32.dll

See also

ICallFrame

ICallFrameEvents

ICallInterceptor

ICallUnmarshal

ISurrogateService