文件名称:test
介绍说明--下载内容均来自于网络,请自行研究使用
[解决方法]
对上述程序改动如下:
发送端:
MMM SendBag
ZeroMemory(&SendBag,sizeof(SendBag))
.............
int send = 0
while(send<sizeof(MMM))
{
int nCharSend=send(m_hSocket,(char*)(&SendBag+send),sizeof(MMM)-send,0)
send+=nCharSend
}
接收端:
MMM RecvBag
ZeroMemory(&RecvBag,sizeof(RecvBag))
recv写法同上while...
此方法适合传送结构体的实现.
赶快试试看.-[Solutions] to the above changes in procedures are as follows: the sending end: MMM SendBag ZeroMemory (
对上述程序改动如下:
发送端:
MMM SendBag
ZeroMemory(&SendBag,sizeof(SendBag))
.............
int send = 0
while(send<sizeof(MMM))
{
int nCharSend=send(m_hSocket,(char*)(&SendBag+send),sizeof(MMM)-send,0)
send+=nCharSend
}
接收端:
MMM RecvBag
ZeroMemory(&RecvBag,sizeof(RecvBag))
recv写法同上while...
此方法适合传送结构体的实现.
赶快试试看.-[Solutions] to the above changes in procedures are as follows: the sending end: MMM SendBag ZeroMemory (
(系统自动生成,下载前可以参看下载内容)
下载文件列表
empp.def
empp.dll
empp.h
empp.pas
Project1.dpr
Project1.exe
Project1.res
Unit1.dfm
Unit1.pas
empp.dll
empp.h
empp.pas
Project1.dpr
Project1.exe
Project1.res
Unit1.dfm
Unit1.pas