CoGetInterceptor function

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

Syntax

HRESULT CoGetInterceptor(
  REFIID   iidIntercepted,
  IUnknown *punkOuter,
  REFIID   iid,
  void     **ppv
);

Parameters

iidIntercepted

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

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).

iid

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

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

   
Windows version Windows 2000 Professional [desktop apps only] 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