- From: Steinar Bang <sb@metis.no>
- Date: 16 Sep 1999 09:57:28 +0200
- To: www-lib@w3.org
>>>>> "Raffaele Sena" <raff@nuvomedia.com>: > I didn't check the code, but you could try one of the following: > 1) Register you handlers after calling HTEventInit() This is what I did. However, the solution is less elegant than I could have wished. I've organized the libwww/Qt wrappers as two classes that have singleton instances created as automatic variables in main(), and the order they're created in determines the reverse order they're destroyed in. The LibwwwNotify class interfaces libwww events and timers to their Qt equivalents. The W3CLibwww class wraps libwww initialization and shutdown. The LibwwwNotify instance has to be created before the W3CLibwww instance, because the latters destructor will try to unregister any timers still left, and this crashes if the LibwwwNotify has gone away. What I did was add a registerHandlers() method to LibwwwNotify, and call it after the W3CLibwww was created to re-register the LibwwwNotify register/uregister functions. > 2) Don't call HTEventInit(), just call WSAStartup (but there may be > other things that HTEventInit need to initialize). My thoughts exactly. > 3) If you can avoid the call to HTEventInit, you may check if Qt has > a function to initialize the socket/network system, so you can avoid > the explicit call to WSAStartup. Hm... this is an idea. I will investigate further. Thanx!
Received on Thursday, 16 September 1999 03:57:33 UTC