Sunil Menon
2005-12-20 08:48:51 UTC
Dear All,
We have developed an application that uses inetsdk for http
communication and have been
facing a weird problem. When our application is closed it takes nearly
one minute to go away from TaskManager or to be precise from memory.
This happens only on some machines. We have found out that we were
using InternetOpenURL api to call a WebService. Though the execution
of the process falls through, the application seems to be waiting for
some message before terminating...
We found out something very unusal....
If in my IE setting I uncheck <Automatically detect settings>, the exe
closes fast...
I check the code and it happens because I have set the flag
Set InternetAccessType = INTERNET_OPEN_TYPE_PRECONFIG
when I do
Set hInternetHandle = InternetOpenA (AppName, InternetAccessType,
sProxyString, '', ITB_INTERNET_FLAG_SYNC)
but if I set the flag as
Set hInternetHandle = InternetOpenA (AppName,
INTERNET_OPEN_TYPE_DIRECT, '', '', 0)
then even if the <Automatically detect settings> is checked, the exe
closes fast...
as per my information INTERNET_OPEN_TYPE_DIRECT is usually used for ftp
and not for htttp.
Can I use this flag for http also? What is the significane of this
switch?
Please help...
Thanks & regards
Sunil
We have developed an application that uses inetsdk for http
communication and have been
facing a weird problem. When our application is closed it takes nearly
one minute to go away from TaskManager or to be precise from memory.
This happens only on some machines. We have found out that we were
using InternetOpenURL api to call a WebService. Though the execution
of the process falls through, the application seems to be waiting for
some message before terminating...
We found out something very unusal....
If in my IE setting I uncheck <Automatically detect settings>, the exe
closes fast...
I check the code and it happens because I have set the flag
Set InternetAccessType = INTERNET_OPEN_TYPE_PRECONFIG
when I do
Set hInternetHandle = InternetOpenA (AppName, InternetAccessType,
sProxyString, '', ITB_INTERNET_FLAG_SYNC)
but if I set the flag as
Set hInternetHandle = InternetOpenA (AppName,
INTERNET_OPEN_TYPE_DIRECT, '', '', 0)
then even if the <Automatically detect settings> is checked, the exe
closes fast...
as per my information INTERNET_OPEN_TYPE_DIRECT is usually used for ftp
and not for htttp.
Can I use this flag for http also? What is the significane of this
switch?
Please help...
Thanks & regards
Sunil