|
WSAGetLastError
The Windows Sockets WSAGetLastError function gets the error status for the last operation which failed.
int WSAGetLastError (void);
Remarks
This function returns the last network error that occurred. When a particular
Windows Sockets function indicates that an error has occurred, this function
should be called to retrieve the appropriate error code. This error code may be
different from the error code obtained from getsockopt SO_ERROR.
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.
This function should not be used to check for an error value on receipt of an
asynchronous message. In this case, the error value is passed in the lParam field of the message, and this may differ from the value returned by WSAGetLastError.
Return Values
The return value indicates the error code for this thread's last Windows
Sockets operation that failed.
See Also
getsockopt, WSASetLastError
Related Links
Software for Delphi and C++ Builder developers
Software for Visual Studio .NET developers
Software for Visual Basic 6 developers
Delphi Tips&Tricks
MegaDetailed.NET
More Online Helps
Win32 Programmer's Reference (win32.hlp)
Win32 Multimedia Programmer's Reference (mmedia.hlp)
OLE Programmer's Reference (ole.hlp)
Microsoft Windows Pen API Programmer's Reference (penapi.hlp)
Microsoft Windows Telephony API (TAPI) Programmer's Reference (tapi.hlp)
Unix Manual Pages
|