Re: Winsock gethostbyname() problem in NT4

> 
> > 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,

    Raffaele

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