You also need to use WSAStartup().