CoGetCallContext function (combaseapi.h)

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

Syntax

HRESULT CoGetCallContext(
  [in]  REFIID riid,
  [out] void   **ppInterface
);

Parameters

[in] riid

Interface identifier (IID) of the call context that is being requested. If you are using the default call context supported by standard marshaling, IID_IServerSecurity is available. For COM+ applications using role-based security, IID_ISecurityCallContext is available.

[out] ppInterface

Address of pointer variable that receives the interface pointer requested in riid. Upon successful return, *ppInterface contains the requested interface pointer.

Return value

This function can return the following values.

Return code Description
S_OK
The context was retrieved successfully.
E_NOINTERFACE
The call context does not support the interface specified 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. This is one of the functions provided to give the server access to any contextual information of the caller.

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 combaseapi.h (include Objbase.h)
Library Ole32.lib
DLL Ole32.dll

See also

IServerSecurity

Security in COM