RshSetLastError Function  
 
VOID WINAPI RshSetLastError(
  DWORD dwErrorCode  
);

The RshSetLastError function sets the error code for the current thread. This function is typically used to clear the last error by passing a value of zero as the parameter.

Parameters

dwErrorCode
Specifies the error code for the current thread.

Return Value

None.

Remarks

Error codes are unsigned 32-bit values which are private to each calling thread. Most functions will set the last error code value when they fail; a few functions set it when they succeed. Function failure is typically indicated by a return value such as FALSE, NULL, INVALID_CLIENT or RSH_ERROR. Those functions which call RshSetLastError when they succeed are noted on the function reference page.

Applications can retrieve the value saved by this function by using the RshGetLastError function. The use of RshGetLastError is optional; an application can call the function to determine the specific reason for a function failure.

Requirements

Minimum Desktop Platform: Windows 7 Service Pack 1
Minimum Server Platform: Windows Server 2008 R2 Service Pack 1
Header File: cstools12.h
Import Library: csrshv12.lib

See Also