Delphi - XE2 code to Delphi7 needed. Using wininet to download a file
问题 Note: I only want to use wininet, not urlmon-urldownloadtofile. Well, I have the following code which works perfectly in XE2 to download a file: procedure DownloadFile(URL: string; Path: string); const BLOCK_SIZE = 1024; var InetHandle: Pointer; URLHandle: Pointer; FileHandle: Cardinal; BytesRead: Cardinal; DownloadBuffer: Pointer; Buffer: array [1 .. BLOCK_SIZE] of byte; BytesWritten: Cardinal; begin InetHandle := InternetOpen(PWideChar(URL), 0, 0, 0, 0); URLHandle := InternetOpenUrl