Downloading a file in Delphi

后端 未结 3 998
夕颜
夕颜 2020-12-14 19:54

A google search shows a few examples on how to download a file in Delphi but most are buggy and half of the time don\'t work in my experience.

I\'m looking for a si

3条回答
  •  别那么骄傲
    2020-12-14 20:38

    Using URLMon.

    errcode := URLMon.URLDownloadToFile(nil,
                          PChar('http://www.vbforums.com/showthread.php?345726-DELPHI-Download-Files'),
    PChar( 'a:\download.htm'),
          0,
          nil);
    if errcode > 0 then
          showmessage('Error while downloading: ' + inttostr(errcode));
    

提交回复
热议问题