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

InternetOpen(), INTERNET_FLAG_ASYNC in DDLs

This topic is 4696 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 have developed app:
int WINAPI WinMain(HINSTANCE, HINSTANCE, char*, int)
{

 HINTERNET   hInternet = InternetOpen("Browser Name",
                             INTERNET_OPEN_TYPE_PRECONFIG, NULL, // INTERNET_OPEN_TYPE_DIRECT
                             NULL, INTERNET_FLAG_ASYNC); // INTERNET_FLAG_ASYNC


 InternetCloseHandle(hInternet);
 return 0;
}
It runs and closes immediately. But when I'm trying to get code
 HINTERNET   hInternet = InternetOpen("Browser Name",
                             INTERNET_OPEN_TYPE_PRECONFIG, NULL, // INTERNET_OPEN_TYPE_DIRECT
                             NULL, INTERNET_FLAG_ASYNC); // INTERNET_FLAG_ASYNC


 InternetCloseHandle(hInternet);

into my Winamp plugin - then winamp closes after ~6 seconds (after I have pressed Close button). o:) If write
 HINTERNET   hInternet = InternetOpen("Browser Name",
                             INTERNET_OPEN_TYPE_PRECONFIG, NULL, // INTERNET_OPEN_TYPE_DIRECT
                             NULL, 0); // INTERNET_FLAG_ASYNC


 InternetCloseHandle(hInternet);

w/out INTERNET_FLAG_ASYNC flag - then Winamp closes immediately. Maybe smbodty tell me - whats the problem? Maybe Winamp has its own HINTERNETs and it is unlegal to make more then one? But I have tested several - was just ok.

Share this post


Link to post
Share on other sites
Advertisement
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!