CoGetCallContext

Retrieves the context of the current call on the current thread.

HRESULT CoGetCallContext(
  REFIID riid,         //Interface identifier
  void ** ppInterface  //Address of output variable that receives the 
                       // interface pointer requested in riid
);
 

Parameters

riid
[in] Interface identifier (IID) of the call context that is being requested. If you are using the default call context supported by standard marshaling, only IID_IServerSecurity is available.
ppv
[out] Address of pointer variable that receives the interface pointer requested in riid. Upon successful return, *ppv contains the requested interface pointer.

Return Values

S_OK
Success.
E_NOINTERFACE
The call context does not support the interface identified by riid.

Remarks

CoGetCallContext retrieves the context of the current call on the current thread. The riid parameter specifies the interface on the context to be retrieved. Currently, only IServerSecurity is available from the default call context supported by standard marshaling.

This is one of the functions provided to give the server access to any contextual information of the caller.

QuickInfo

  Windows NT: Use version 4.0 or later.
  Windows: Use Windows 95 or later. Available as a redistributable for Windows 95.
  Windows CE: Unsupported.
  Header: Declared in objbase.h.
  Import Library: Included as a resource in ole32.dll.

See Also

IServerSecurity, Security in COM