|
Posted by Fred on February 3, 2006, 1:36 pm
Please log in for more thread options
> Hello, Fred.
>
> Each thread (or thread from the pool) makes InternetConnect using handle
> returned by InternetOpen. Most likely your thread would not be blocked by
> call of InternetConnect, it might hung when you will make call to
> HttpOpenRequest / HttpSendRequst, so to cancel blocking of thread you
should
> close handle of request(or whatever) it made. Microsofts examples closes
> handle returned by InternetOpen, but you may cancel execution closing
handle
> returned by HttpOpenRequest or simular function.
>
> So, once more:
>
> 1. Locate where your thread may hung (InternetReadFile, HttpSendRequest,
> etc)
> 2. Associate HINTERNET handles open by thread with thread's handle.
> 3. Mark position *what* wininet function is executed in each thread.
> 4. When thread is hung, read the position - you know what function is
> executed, and the handle it uses, simply close it.
OK,
I'll try it.
Cheers
|