本文整理自网络,侵删。
user idhttp;var Stream: TMemoryStream;begin try try Stream := TMemoryStream.Create; IdHTTP1.Get('http://dww.no-ip.org/simplex/spw.exe', Stream); a := IdHTTP1.Response.ContentLength; RenameFile('spw.exe', 'spw.old'); Stream.SaveToFile('spw.exe'); finally Stream.Free; IdHTTP1.Disconnect; end; except RenameFile('spw.old', 'spw.exe'); end;
相关阅读 >>
Delphi 二进制值转换十六进制 bintohex和hextobin
Delphi 将对象转换为json字符串或tjsonobject
Delphi中操作olevariant、variant和stream
更多相关阅读请进入《Delphi》频道 >>