Jump to content
  • Advertisement
Sign in to follow this  
cpp forever

Cancel INTERNET_STATUS_CALLBACK

This topic is 4820 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

How to cancel the INTERNET_STATUS_CALLBACK function. I want to implement timeout for asynchronous InternetOpenUrl (and then maybe for InternetReadFile() ;) ). I want callback function to stop receiving status codes when I want. Some advices for implementation of this tricky method? :)

Share this post


Link to post
Share on other sites
Advertisement
Try this line of code. This assumes that m_hInternet is the handle returned by InternetOpen().

InternetSetStatusCallback( m_hInternet, NULL );

Share this post


Link to post
Share on other sites
Quote:
Original post by Teric
Try this line of code. This assumes that m_hInternet is the handle returned by InternetOpen().

InternetSetStatusCallback( m_hInternet, NULL );


Knew that. Not a bad idea, but in my example (too much code) I need to create multiple HINTERNETs from InternetOpen() and multiple HINTERNETs from InternetOpenUrl().

Maybe some neat idea?

Share this post


Link to post
Share on other sites
I thought that you could only have one callback defined per internet handle. Thus, if you have multiple handles, you could call InternetSetStatusCallback([Your Handle Here], NULL) for each handle that you have.

Share this post


Link to post
Share on other sites
Quote:
Original post by Teric
I thought that you could only have one callback defined per internet handle. Thus, if you have multiple handles, you could call InternetSetStatusCallback([Your Handle Here], NULL) for each handle that you have.


InternetSetStatusCallback([Your Handle Here], NULL) will probably not work cos MSDN says that callback function must BE. I can use InternetSetStatusCallback([Your Handle Here], NULL) only after InternetCloseHandle().

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!