[This is preliminary documentation and subject to change.]
Switches the call context object used by CoGetCallContext.
HRESULT CoSwitchCallContext(
IUnknown *pNewObject, //Pointer to an interface on the new call context
IUnknown **ppOldObject //Address of output variable that receives a
// pointer to the old call context object
);
Custom marshallers call CoSwitchCallContext to change the call context object used by CoGetCallContext. Before dispatching an arriving call, custom marshallers call CoSwitchCallContext, specifying the new context object. After sending a reply, they must restore the original call context by calling CoSwitchCallContext again, this time passing a pointer to the original context object.
Call context objects provided by custom marshallers should support IServerSecurity.
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.
IServerSecurity, Security in COM, CoGetCallContext