Fred
2006-02-23 03:23:29 UTC
Hi, This is a follow up to the question I asked a couple of weeks ago ie
"Asynch wininet - Threaded or not?"
I decided to try and get around the fact that wininet synchronous timeouts
doesn't work by closing the Internet handle if a thread is hanging similar
to
http://support.microsoft.com/kb/224318/EN-US/
I expect the httpsendrequest to hang or the read - both of which use the
handle returned by openrequest.
Now I have tested on the desktop successfully by using a firewall to block
access by waiting on its dialog asking whether to allow access to the
internet for the prog. I reply "yes"access the closehandle from the managing
thread - just the main thread in my test prog. The httpsendrequest() aborts
immediately and everything works as expected.
However, when I try the same using the smartphone2003 emulator, the
httpsendrequest() still succeeds even after the main thread has closed the
handle.
Is this just an artifact of the emulator not processing threads correctly or
is there something more ominous at work?
Also is the mechanism I use with the firewall good enough, or is there a
better way I can simulate a hang on httpsendrequest?
TIA
"Asynch wininet - Threaded or not?"
I decided to try and get around the fact that wininet synchronous timeouts
doesn't work by closing the Internet handle if a thread is hanging similar
to
http://support.microsoft.com/kb/224318/EN-US/
I expect the httpsendrequest to hang or the read - both of which use the
handle returned by openrequest.
Now I have tested on the desktop successfully by using a firewall to block
access by waiting on its dialog asking whether to allow access to the
internet for the prog. I reply "yes"access the closehandle from the managing
thread - just the main thread in my test prog. The httpsendrequest() aborts
immediately and everything works as expected.
However, when I try the same using the smartphone2003 emulator, the
httpsendrequest() still succeeds even after the main thread has closed the
handle.
Is this just an artifact of the emulator not processing threads correctly or
is there something more ominous at work?
Also is the mechanism I use with the firewall good enough, or is there a
better way I can simulate a hang on httpsendrequest?
TIA