WSAGetLastError

WSAGetLastError gets the status for the last Winsock operation that failed.

Syntax

Copy
int WSAGetLastError(void);

Parameters

None.

Return Value

The function returns the last network error that occurred within the calling thread.

Functions can set this value by calling WSASetLastError.

Remarks

To reset the error code, use WSASetLastError with iError set to zero. getsockopt SO_ERROR also resets the error code to zero.

Requirements

Minimum supported version Header Library

eRTOS 1.0 SDK

Winsock2.h RtTcpipApi.lib