Malcolm,
Thanks. *g* it's my code, that I wrote to fix a bug in the code as posted in a KB article a few years ago.
Look at this article
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wininet/wininet/ftpfindfirstfile.asp I know the function works against an FTP server it may work for the internet opened handle as well. The file size comes back as part of the LPWIN32_FIND_DATA lpFindFileData struct.
It has to be available somehow, otherwise the download in IE couldn't display the progess bar.
>Great code! In looking at your long example, is there a way to retrieve a file's length before reading it in blocks? If one knew the length of the file being retrieved, they could add a progress meter to the long version of your code.