Re: Winsock blocking hook problems.

From: Mathew Dredge <mdredge_at_wave.co.nz>
Date: 1996/02/18
Message-ID: <4g5veo$pur_at_Axil.wave.co.nz>#1/1


mdredge_at_wave.co.nz (Mathew Dredge) wrote:

>I have tried a blocking hook function in my windows 95 program, it
>worked as I expected except that the blocked call never finished, are
>you able to send me an example of your blocking hook function as I
>have a need to have these hook functions implemented in my
>multi-threaded winsock app, and I havent managed to make them work.

I was the originator of this article, I have now solved the problem with the gethostbyname() call, which would block and timeout in a couple of minutes (which is not nice). The app is multithreaded, and i needed the app to close when the close box is clicked on (not 2 minutes later). I tried WSACancleBlockingCall() (whatever) and this never cancled the call, so with the help of some more synchronisatoin I found I could use the WSACleanup() call to cancle any blocked calls in any thread. and that works. Received on Sun Feb 18 1996 - 00:00:00 CET

Original text of this message