永
永不言败
Unregistered / Unconfirmed
GUEST, unregistred user!
{发送文件}
DllFileStream:=TFileStream.Create(sDllFile,fmOpenRead);
WriteStream.CopyFrom(DllFileStream,DllFileStream.Size);
{*****}
{***接受文件***}
FileStream:=TFileStream.Create(sDllFile,fmCreate);
while (not terminated) and (FrmComToClubServ.CstDownDll.Socket.connected) do
begin
ReadStream.WaitForData(OVER_TIME);
FillChar(ReadRecord,10,0);
if ReadStream.Read(ReadRecord,10)=0 then break;
FileStream.Write(ReadRecord,10);
end;
{******}
程序能正常运行,但是得到的文件变大了,请高手指点。
DllFileStream:=TFileStream.Create(sDllFile,fmOpenRead);
WriteStream.CopyFrom(DllFileStream,DllFileStream.Size);
{*****}
{***接受文件***}
FileStream:=TFileStream.Create(sDllFile,fmCreate);
while (not terminated) and (FrmComToClubServ.CstDownDll.Socket.connected) do
begin
ReadStream.WaitForData(OVER_TIME);
FillChar(ReadRecord,10,0);
if ReadStream.Read(ReadRecord,10)=0 then break;
FileStream.Write(ReadRecord,10);
end;
{******}
程序能正常运行,但是得到的文件变大了,请高手指点。