>Hi All,
>
>I'd like display a progress bar when my app downloads files from my website. I'm using urldownloadtofile().
>How can I return: a) the file size, and; b) the number of bytes at any given point?
>Thanks.
>
>Luke
(1) you open internet with InternetOpen() api
(2) you open the file with InternetOpenUrl() api
(3) you use HttpQueryInfo() api - to get the filesize of the handle returned in (2)
(4) in a loop, you use InternetReadFile() api until no bytes have been read
You add the number of bytes read with InternetReadFile() api - that's the number to display in the progressbar
(5) you close the handle of (2) with InternetCloseHandle() api
(6) you close the handle of (1) with InternetCloseHandle() api
I think that's about it
Gregory