# CoGetCallContext

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

HRESULT CoGetCallContext(

REFIID riid, | //Interface identifier
void ** ppv | //Pointer to the requested interface
); |

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] Indirect pointer to the requested interface.

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 and to encapsulate common sequences of security checking and caller impersonation.

See Also

IServerSecurity, Security in COM