Jump to content
  • Advertisement
Sign in to follow this  
Teric

How to calc download progress in WinINet async mode?

This topic is 4811 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm using the WinINet function InternetReadFileEx to download a file in async mode. I need to be able to determine the download progress so I can show a progress bar on the screen. I've attempted to use the dwBufferSize member of the INTERNET_BUFFERS structure that I pass to InternetReadFileEx, but it always contains 0 until the download is complete, and then it suddenly contains the full file size. Does anyone know a better way to see file download progress? Thanks in advance!

Share this post


Link to post
Share on other sites
Advertisement
This is just a long shot, but be aware of that when downloading some files, proper headers are not given about the its size, in which case (seen in IE) when downloading files, the progress stays at 0% until the file is finished and then jumps to 100%.

Share this post


Link to post
Share on other sites
Yes that's true. But I've already made sure that these files have proper headers. I use HttpQueryInfo to grab the file size before the download starts, and that works just fine.

Share this post


Link to post
Share on other sites
I guess this one is a real stumper. I've tried posting this on the Microsoft developer newsgroups and nobody there seems to know how to do this.

There's got to be someone here at GameDev that has done this before?

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!