What does Windows error code 10093 (WSANOTINITIALISED) mean?

 
Previous Next
WSAVERNOTSUPPORTED WSAEDISCON

WSANOTINITIALISED

WSANOTINITIALISED means that the thread or process used a Winsock function before a successful WSAStartup call established the Winsock environment.

Ensure WSAStartup succeeds before any Winsock API on every process path and keep WSACleanup balanced with initialization lifetime. Libraries should not silently clean up Winsock while another component still expects the process-wide environment to remain available.

Common causes

  • A library calls socket functions before the application initialization sequence is complete.
  • WSACleanup is called too early while another component still owns sockets.
  • Startup failed, but the error was ignored and later calls continued.

What to do

Define clear ownership for Winsock lifetime. Pair each successful WSAStartup with the matching cleanup only after all socket users are finished, and propagate startup failure rather than allowing later calls to fail ambiguously.

Microsoft: WSAStartup · Microsoft: connect


Looking for a different code? Search another status or error code.