delphi idHttp下载文件

procedure TForm1.Button3Click(Sender: TObject); var h:TIdhttp; res : String; MyStream:TMemoryStream; begin MyStream:=TMemoryStream.Create; h:=Tidhttp.Create(nil); try h.get('http://www.oro.com/project2.exe',MyStream); except showmessage('网络出错!'); MyStream.Free; exit; end; MyStream.SaveToFile('c:/1.exe'); MyStream.Free; end;

你可能感兴趣的:(c,网络,Delphi)