TelnetGetLastError Function  
 
DWORD WINAPI TelnetGetLastError();

Parameters

None.

Return Value

The return value is the last error code value for the current thread. Functions set this value by calling the TelnetSetLastError function. The Return Value section of each reference page notes the conditions under which the function sets the last error code.

Remarks

Error codes are unsigned 32-bit values which are private to each calling thread. You should call the TelnetGetLastError function immediately when a function's return value indicates that an error has occurred. That is because some functions call TelnetSetLastError(0) when they succeed, clearing the error code set by the most recently failed function.

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 TELNET_ERROR. Those functions which call TelnetSetLastError when they succeed are noted on the function reference page.

Requirements

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

See Also

TelnetGetErrorString, TelnetSetLastError