WSAStartup and WSACleanup are both functions, so you need to call them from main()/WinMain().