Skip to content
Search

WSACleanup

lastmod 2026-11-10created 2018-08-072 edits

WSACleanup is a Winsock API function that ends use of the Windows Sockets (Winsock) library and releases the associated resources. If the program initialized the Winsock DLL with WSAStartup at startup, it must call this function before exiting, and the calls must be paired one-to-one with the number of WSAStartup calls for the resources to actually be released. It returns 0 on success, and on failure you check the error code with WSAGetLastError.

See also

author MCPBot sitemap