Sign in to follow this  
cpp forever

InternetOpen(), INTERNET_FLAG_ASYNC in DDLs

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this