RpcSsDestroyClientContext function (rpcndr.h)

The RpcSsDestroyClientContext function destroys a context handle no longer needed by the client, without contacting the server.

Syntax

void RpcSsDestroyClientContext(
  void **ContextHandle
);

Parameters

ContextHandle

Context handle to be destroyed. The handle is set to NULL before RpcSsDestroyClientContext returns.

Return value

RpcSsDestroyClientContext has no return value.

Note  For a list of valid error codes, see RPC Return Values.
 

Remarks

RpcSsDestroyClientContext is used by the client application to reclaim the memory resources used to maintain a context handle on the client. This function is used when ContextHandle is no longer valid, such as when a communication failure has occurred and the server is no longer available. The context handle is set to NULL. The RpcSsDestroyClientContext function provides the same functionality as the RpcSmDestroyClientContext function. This function does not invoke the server's context handle run-down process.

Do not use RpcSsDestroyClientContext to replace a server function that closes the context handle.

The RpcSsDestroyClientContext function can throw an RPC_X_SS_CONTEXT_MISMATCH exception if the context handle passed to it is invalid. Applications should never pass an invalid context handle to this function. If an exception is thrown, it indicates an error in the calling code, and should therefore be investigated and fixed.

Requirements

Requirement Value
Minimum supported client Windows 2000 Professional [desktop apps | UWP apps]
Minimum supported server Windows 2000 Server [desktop apps | UWP apps]
Target Platform Windows
Header rpcndr.h (include Rpc.h)
Library Rpcrt4.lib
DLL Rpcrt4.dll

See also

RpcBindingReset

RpcSmDestroyClientContext