InternetOpen(), INTERNET_FLAG_ASYNC in DDLs

Started by
0 comments, last by stylin 18 years, 7 months ago
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.
ai-blog.org: AI is discussed here.
Advertisement
Have you tried looking here yet?

WINAMP.COM | Forums > Developer Center > Winamp Development

Seems like they would know what the problem may be.
:stylin: "Make games, not war.""...if you're doing this to learn then just study a modern C++ compiler's implementation." -snk_kid

This topic is closed to new replies.

Advertisement