This function sets the error value that can be retrieved through the WSAGetLastError function.
At a Glance
Header file: | Winsock.h |
Windows CE versions: | 2.0 and later |
Syntax
void WSASetLastError ( int iError );
Parameters
iError
[in] Integer that specifies the error value to be returned by a subsequent WSAGetLastError call.
Return Values
None.
Remarks
The WSASetLastError function allows an application to set the error value to be returned by a subsequent WSAGetLastError call for the current thread. Note that any subsequent Windows Sockets routine called by the application will override the error value as set by this routine.
The error value set by WSASetLastError is different from the error value reset by calling the function getsockopt with SO_ERROR.