RpcErrorClearInformation function (rpcasync.h)

The RpcErrorClearInformation function clears all extended error information on the current thread.

Syntax

void RpcErrorClearInformation();

Parameters

This function has no parameters.

Return value

This function has no return values.

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

Remarks

The RPC Runtime usually handles the clearing of extended error information. In only two cases should callers use RpcErrorClearInformation:

  • If the calling component adds records to the thread using the RpcErrorAddRecord function, then decides it has not encountered a fatal error and continues processing the original, or the error is not connected to the records is has added. In this case, the calling component needs to clear the error information from the thread to prevent the propagation of potentially misleading error information.
  • If the calling component attempts multiple retries of an operation that returns extended error information. When an RPC call starts, the RPC Runtime clears any extended error information on the thread. However, if the calling component calls RpcErrorAddRecord in a loop with many iterations, it may want to clear the error information, as the extended error information accumulates over time and can exhaust available memory.

Requirements

   
Minimum supported client Windows XP [desktop apps | UWP apps]
Minimum supported server Windows Server 2003 [desktop apps | UWP apps]
Target Platform Windows
Header rpcasync.h (include Rpc.h)
Library Rpcrt4.lib
DLL Rpcrt4.dll

See also

Obtaining Extended RPC Error Information

RpcErrorAddRecord

RpcErrorGetNextRecord

RpcErrorStartEnumeration