CAsyncSocket sock;
CString myStr("172.15.23.16");
LPCTSTR spHostAddress;
spHostAddress = myStr.GetBuffer(myStr.getLength());
sock.create(125,SOCK_DGRAM,FD_CONNECT,spHostAddres s);

I am getting this error "A successful AfxSocketInit must occur before using this API."

ip as wel as port r perfect, but its not connecting, can u pls guide me, is there any problem in above code
Reply With Quote Multi-Quote This Message Quick reply to this message
Edit/Delete Message