Functions and Directives

Function SocketGetLastError() Professional

Retrieves the error code for the last operation that failed.

SocketGetLastError() --> nErrorCode

The function returns a numeric error code. #define constants beginning with WSAE are available in the file SOCKET.CH to identify an error condition. The value 0 means: no error occurred.


This function can be used to obtain the error code of the last sockets operation that failed in the current thread.


If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.