John
2005-03-04 20:51:50 UTC
Hey,
I am experiencing difficulty in using InternetQueryOption() in one of my
applications.
Here is the code snippet:
INTERNET_PROXY_INFO* po;
DWORD size=0;
if (!InternetQueryOption(NULL,INTERNET_OPTION_PROXY, NULL, &size))
{
po = (INTERNET_PROXY_INFO *) malloc(size);
if (!InternetQueryOption(NULL,INTERNET_OPTION_PROXY, po, &size))
{
}
free(po);
}
If I put this code in ANY threads, when application exits, it will crash.
But I can use the same funciton in other applications without any problems.
I am not the original author for this application. And I am wondering what
kind of things could prevent wininet queryOption usage?
Someone has the similar experience and could share your solutions?
Thanks very much!
John
I am experiencing difficulty in using InternetQueryOption() in one of my
applications.
Here is the code snippet:
INTERNET_PROXY_INFO* po;
DWORD size=0;
if (!InternetQueryOption(NULL,INTERNET_OPTION_PROXY, NULL, &size))
{
po = (INTERNET_PROXY_INFO *) malloc(size);
if (!InternetQueryOption(NULL,INTERNET_OPTION_PROXY, po, &size))
{
}
free(po);
}
If I put this code in ANY threads, when application exits, it will crash.
But I can use the same funciton in other applications without any problems.
I am not the original author for this application. And I am wondering what
kind of things could prevent wininet queryOption usage?
Someone has the similar experience and could share your solutions?
Thanks very much!
John