W3C home > Mailing lists > Public > www-lib@w3.org > July to September 2003

Libwww and Windows events

From: Tanmay Patwardhan <tpthesis@hotmail.com>
Date: Fri, 15 Aug 2003 15:33:21 -0500
To: www-lib@w3.org
Message-ID: <Law14-F35sv2um9JgUf00059389@hotmail.com>

Hi,

I use libwww as an underlying http library, in a COM dll. When COM is used
in STA (single threaded apartments), there seems to be some issue with
libwww and COM win32 message queues.

If libwww in the midst of processing a post request, and a second COM
request is done, the libwww event loop seems to crash.

In the HTEvtLst.c file, the GetMessage(..) while loop does the following:
while (!HTEndLoop  && (timepass = GetMessage(&msg,0,0,0)))
{
	TranslateMessage(&msg);
	DispatchMessage(&msg);
}


When the message for the second event is trigerred, Libwww doesnt seem to 
know how to handle this, and the first request loop exists abruptly. This 
causes the app to freeze up. Using single threaded apartment, should not 
cause any multiple thread issues. Hence, this seems to be simply a case of 
Libwww not being able to handle more than one message in the queue.

If anyone has an idea of how to get around this, I would really appreciate 
that.

Thanks and regards,
Tanmay




-----------------------
Tanmay Patwardhan
Applications Developer,
UBS Warburg,
Chicago, IL.
-----------------------

_________________________________________________________________
Add photos to your e-mail with MSN 8. Get 2 months FREE*.  
http://join.msn.com/?page=features/featuredemail
Received on Friday, 15 August 2003 17:10:01 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 23 April 2007 18:18:43 GMT