//加载套接字库
WORD wVersionRequested;//套接字库版本信息
WSADATA wsaData;
int err;
wVersionRequested = MAKEWORD(1,1);
err = WSAStartup(wVersionRequested,&wsaData);
if(err != 0){ //加载失败
return;
}
if(LOBYTE(wsaData.wVersion) != 1 || //判断是不是所请求的版本
HIBYTE(wsaData.wVersion) != 1){
WSACleanup();
return;
}