if (SOCKET_ERROR==WSAAsyncSelect(m_sock,this->m_hWnd,UM_SOCK,FD_READ))
{
char ch[10] = {0};
int a = WSAGetLastError();
itoa(a,ch,10);
MessageBox(ch);
return;
}
先给大家说明下,我想做个像飞秋那样的局域网程序,将搜索到的ip传给treeCtl,然后响应双击双击事件,弹出一个自定义id的非模态对话框show,UM_SOCK也是定义在show中,这里会不会是this->m_hWnd出错了?这个的值是CDialog的m_wHwd么?请告知如何处理,感激涕零啊m_sock已经初始化了,并在show的构造函数中进行了WSAStartup。另:
WSAEINVAL 
(10022) 
Invalid argument. 
Some invalid argument was supplied (for example, specifying an invalid level to the setsockopt function). In some instances, it also refers to the current state of the socket—for instance, calling accept on a socket that is not listening. 好像说无效的表述,没有监听的socket,不是很了解。