Registriert seit: 29. Apr 2003
268 Beiträge
|
Re: Indy TCP und Write-/ReadStream-Methode
17. Sep 2003, 17:07
Danke, aber hat leider nix geholfen. Es tritt immer noch der selbe Fehler auf .
(Nach Indy-Hilfe modifiziert):
Delphi-Quellcode:
procedure TForm1.Button1Click(Sender: TObject);
var
fs: TFileStream;
begin
if not OpenDialog1.Execute then exit;
with IdTCPClient1 do
begin
fs := TFileStream.Create(OpenDialog1.FileName, fmOpenRead or fmShareDenyWrite);
Connect;
try
OpenWriteBuffer;
try
WriteStream(fs);
CloseWriteBuffer;
except
CancelWriteBuffer;
raise;
end;
finally
Disconnect;
fs.Free;
end;
end;
end;
.oO'rallY
Linux is like a tipi: no gates, no windows and a gnu-eating apache inside...
|