S
steve
Unregistered / Unconfirmed
GUEST, unregistred user!
struct WSAData stWSAData;
SOCKET hSock;
if(WSAStartup(0x0202,&stWSAData)==0){
hSock = WSASocket(AF_INET,SOCK_DGRAM,IPPROTO_UDP,NULL,0,
WSA_FLAG_MULTIPOINT_C_LEAF|WSA_FLAG_MULTIPOINT_D_LEAF);
if(hSock = INVALID_SOCKET){
sprintf(errmsg,"无法打开socket! [%d]",WSAGetLastError());
MessageBox(hWnd,errmsg,"Fatal error",MB_OK);
return;
}
总是弹出窗口:“无法打开socket! [0]”,这是怎么回事?
SOCKET hSock;
if(WSAStartup(0x0202,&stWSAData)==0){
hSock = WSASocket(AF_INET,SOCK_DGRAM,IPPROTO_UDP,NULL,0,
WSA_FLAG_MULTIPOINT_C_LEAF|WSA_FLAG_MULTIPOINT_D_LEAF);
if(hSock = INVALID_SOCKET){
sprintf(errmsg,"无法打开socket! [%d]",WSAGetLastError());
MessageBox(hWnd,errmsg,"Fatal error",MB_OK);
return;
}
总是弹出窗口:“无法打开socket! [0]”,这是怎么回事?