I'm trying to set the timeout values for a InternetSession, but so far with no luck. I'm using the following code, which set the timeout value to 2 seconds, using SetOption, and then double check using QueryOption:
pInetSession = new CInternetSession( );
// dwTO's value is now 60000, i.e. 60 seconds.
// (Default value?)
// dwTO's value is now 2000, i.e. 2 seconds.
pFile = pInetSession->OpenUrl( "http://www.blaha.com
But, the connection opened by OpenUrl still use a timeout of 60 seconds! (Which is far too much to serve my purpose...)
I've tried to close the session handle after two seconds (from another thread), but OpenUrl still wait until timeout before returning with a "Operation Cancelled" error message. So, I guess, the timeout value still applies, even though I close the handle...
Anyone got a clue why CInternetSession won't take the timeout values I set? Any help would be appreciated!
If you help me, I'll send you a postcard from Sweden! :-)
Thanks in advance,