Re: RegisterClass problem

>But I would like to use it under Windows for Workgroup. I have installed 
>win32s release I run my application but it doesn't work 
>correctly. I obtain this message in my tracefile :
>HTEvent_Loop.. Can't RegisterClass "AsyncWindowClass"
>My application exits of HTLibInit without executing WSAStatup. That's why when 
>the libwww attempts to execute the socket function, I receive an error message.
>Has anyone already noticed this problem ?
>Does anyone have a idea to solve this problem ?

Yes! I have encounterred such a problem, too. I noticed that the value passed to
the field hInstance of the structure WNDCLASS, which is the parameter of 
RegisterClass, is got by GetCurrentProcess() function. But as my experiments, 
the value got from GetCurrentProcess() is not the same as the real instance 
handle passed into WinMain(), thus failed the RegisterClass() call. I changed 
the code to use the real instance handle, then everything got fixed. You can try

I also found that in several places there are such codes:

   if (some_pointer->some_field) {
       //...operations on some_pointer->some_field...

The codes caused GP Fault in Windows if some_pointer is NULL. I also added 
checks on some_pointers to ensure they are not NULL. Hope my experience 
will help you.

Best regards,

Eman Fu