你写错了吧!! 你把发送的控件nmstrm1给Free了,当然第二次就不能发送了??!!
发送是(循环过程,次数等于文件的个数):
try
fstrstrm:=tfilestream.create(filename,fmopenread);
nmstrm1.host:=……;
nmstrm1.postit(fstrstrm);
finally
nmstrm1.free; //这里你应该是Fstrstrm.Free吧!!!
接收是:
try
myfstream.copyfrom(strm,strm.size);
finally
myfstream.free;
发送是(循环过程,次数等于文件的个数):
try
fstrstrm:=tfilestream.create(filename,fmopenread);
nmstrm1.host:=……;
nmstrm1.postit(fstrstrm);
finally
nmstrm1.free; //这里你应该是Fstrstrm.Free吧!!!
接收是:
try
myfstream.copyfrom(strm,strm.size);
finally
myfstream.free;
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货