Skip to content

Latest commit

 

History

History
49 lines (33 loc) · 1.53 KB

WSAGetLastError.md

File metadata and controls

49 lines (33 loc) · 1.53 KB

Home

Function name : WSAGetLastError

Group: Windows Sockets 2 (Winsock) - Library: ws2_32


The WSAGetLastError function returns the error status for the last operation that failed.


Code examples:

How to build UDP responder
Winsock: retrieving the host information corresponding to a network address
Winsock: reading and setting socket options
Winsock: retrieving directory listing from an FTP server using passive data connection (FTP, port 21)
Winsock: connecting to a news server (NNTP, port 119)
How to create non-blocking Winsock server
Winsock: resolving an address to a host name

Declaration:

int WSAGetLastError (void);  

FoxPro declaration:

DECLARE INTEGER WSAGetLastError IN ws2_32  

Parameters:

This function has no parameters.


Return value:

The return value indicates the error code for this thread"s last Windows Sockets operation that failed.


Comments:

MSDN: a successful function call, or a call to WSAGetLastError, does not reset the error code. To reset the error code, use the WSASetLastError function call with iError set to zero.