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

Re: Winsock gethostbyname() problem in NT4

From: Raffaele Sena <raff@nuvomedia.com>
Date: Wed, 15 Sep 1999 11:24:15 -0700
Message-ID: <005701beffa7$8463b1e0$52c0a8c0@nuvomedia.com>
To: <www-lib@w3.org>, "Steinar Bang" <sb@metis.no>
> > This means that libwww doesn't initialize winsock?
> > Hmm... according to this
> >         http://lists.w3.org/Archives/Public/www-lib/1996OctDec/0087.html
> > it should be called if I call HTEventInit().
> > My test program didn't call HTEventInit().  When it did, HTTP started
> > working. 
> Except it crashed a bit further on, and the reason was that
> HTEventInit() overwrote my event handler registration.
> Is there a way to get libwww to initialize the winsock, without having 
> it overwrite the applications event handlers?
    I didn't check the code, but you could try one of the following:

    1) Register you handlers after calling HTEventInit()
    2) Don't call HTEventInit(), just call WSAStartup (but there may be
        other things that HTEventInit need to initialize).
    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.

hope this helps,

Received on Wednesday, 15 September 1999 14:23:03 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:33:52 UTC