Delphi-PRAXiS
Seite 2 von 2     12   

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   GUI-Design mit VCL / FireMonkey / Common Controls (https://www.delphipraxis.net/18-gui-design-mit-vcl-firemonkey-common-controls/)
-   -   Delphi Thread Problem - Stack overflow (https://www.delphipraxis.net/27650-thread-problem-stack-overflow.html)

endeffects 5. Sep 2004 06:09

Re: Thread Problem - Stack overflow
 
Delphi-Quellcode:
procedure TForm1.SaveFile;
var
IdHttp : TIdHTTP;
FileStream : TMemoryStream;
begin
  IdHTTP:= TIdHTTP.Create(nil);
  FileStream := TMemoryStream.Create;
  with IdHTTP do
  begin
    try
      Host:= 'www.server.com';
      Port:= 80;
      Connect(10000);
        IdHTTP.Get('file.txt', FileStream);
        try
          FileStream.Savetofile('c:\file.txt');
        finally
          FileStream.Free;
        end;
      Disconnect;
    except
    end;
    FreeAndNil(IdHTTP);
  end;
end


Alle Zeitangaben in WEZ +1. Es ist jetzt 15:19 Uhr.
Seite 2 von 2     12   

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz