程序运行到m_pSocket->Create()就不动了,为什么?
我用vc做了个dll给delphi程序调用,dll中的函数被delphi程序定时调用,函数如下:
if (!AfxSocketInit()){
::AfxMessageBox("socetfail!1");
return FALSE;
}
CSocket *socketme = new CSocket;
if(!(socketme->Create()))
::AfxMessageBox("false!");
else
::AfxMessageBox("true!");
若socket没有初始化,则delphi程序每秒弹出一个false
若socket初始化,则delphi程序第一次弹出true,以后每次socket初始化都成功
但任何消息都不弹出,也就是说,dll在socketme->Create()不动了
但在vc中调用则没有问题!
高手赐招!