WSACleanup
Jump to navigation
Jump to search
Description
The WSACleanup function terminates use of the Winsock 2 DLL (Ws2_32.dll).
Syntax
int WSACleanup(void);
Parameters
This function has no parameters.
Return value
The return value is zero if the operation was successful. Otherwise, the value SOCKET_ERROR is returned, and a specific error number can be retrieved by calling WSAGetLastError.
In a multithreaded environment, WSACleanup terminates Windows Sockets operations for all threads.
Error code | Meaning |
---|---|
WSANOTINITIALISED | A successful WSAStartup call must occur before using this function. |
WSAENETDOWN | The network subsystem has failed. |
WSAEINPROGRESS | A blocking Windows Sockets 1.1 call is in progress, or the service provider is still processing a callback function. |