1 添加 #include <afxsock.h>
2 在OnInitDialog()中添加
if (!AfxSocketInit())
{
AfxMessageBox(_T("Windows 通信端口初始化失败"));
return FALSE;
}
1 添加 #include <afxsock.h>
2 在OnInitDialog()中添加
if (!AfxSocketInit())
{
AfxMessageBox(_T("Windows 通信端口初始化失败"));
return FALSE;
}
转载于:https://www.cnblogs.com/marky/archive/2012/05/04/2482439.html