Re: Winsock blocking hook problems.

From: Chuck Hamilton <chuckh_at_ix.netcom.com>
Date: 1996/02/08
Message-ID: <4fd1q8$e62_at_ixnews7.ix.netcom.com>#1/1


maw_at_iac.net (Michael A. Wood) wrote:

>I have a problem with a two types of Windows client applications not blocking
>on their respective network transactions.
 

>One is a standard PowerBuilder datawindow/SQL based application that connects
>directly to an Oracle 7.2 database on an RS/6000 using SQL*Net 2.x. The
>other is a PowerBuilder client that connects to a Tuxedo BB via DCI (Tangent)
>& Tuxedo/WS.
 

>I have verified that the problem does indeed have something to do with the
>Winsock default blocking hook function that allows Windows messages to be
>translated and dispatched while a send or recieve is pending.
 

>My current line of thinking is to use WSASetBlockingHook() function to
>override the default function with one that removes messages from the
>queue. This has been somewhat successfull. For example under Windows 95
>using a 16bit DLL to override the blocking hook, we have resolved the issue
>(at least it apears as though we have). However, under windows 3.11, the
>client will occasionaly go off into never never land and never complete the
>network transaction.

[rest snipped]

Is your hook function also removing messages for the application that's issuing the blocking call? I'd think that'd cause problems. Just a guess though. Whenever possible, try to use asynch sockets in Windows programming. It may make the app a little harder to write but it sure runs smoother.

This has been a pet peeve of mine for years. Why do commercial software vendors still insist on writing windows 3.x applications that don't release control back to Windows on a regular basis? (I hope Oracle's SQLNET group is reading this.) That's one of the cardinal rules of programming in any non-preemptive multitasking system. IMHO, such software is sub-standard and shouldn't be marketed commercially.

--
Chuck Hamilton
chuckh_at_ix.netcom.com

Never share a foxhole with anyone braver than yourself!
Received on Thu Feb 08 1996 - 00:00:00 CET

Original text of this message