Found an fixed the problem. Now I create everything ICS in the same thread 
as the THttpConnection constructor and use ThreadAttach detach. FYI, see the 
documentation for DestroyWindow. It explains that the threads of the 
constructor and the destructor must be the same for successful -hidden- 
window destruction.

Warmest Regards, :)

SZ

----- Original Message ----- 
From: "Fastream Technologies" <[EMAIL PROTECTED]>
To: "ICS support mailing" <twsocket@elists.org>
Sent: Friday, December 23, 2005 6:31 PM
Subject: Re: [twsocket] Cannot create a hidden windows for TWSocket


> The error occurs when the client is disconnected. The problematic message 
> ID
> is 1025. Here is the non-ICS code:
>
> void __fastcall httpServerClientClass::TriggerSessionClosed(WORD ErrCode)
> {
>        if(!FSessionClosedFlag && !serverThread->isTerminated())
>        {
>                FSessionClosedFlag = true;
>
>                if(FServer)
>                {
>                        if(affinityThread)
>                        {
>                                destroyHTTPClient();
>                                ThreadDetach();
>                                PostThreadMessage(serverThread->ThreadID,
> WM_DESTROY_CLIENT, (unsigned int)this, 0);
>                }
> }
>
> and the message handler is (in the listener thread):
>
> case WM_DESTROY_CLIENT:
>                {
>                        httpServerClientClass *client =
> (httpServerClientClass*)(void*)msg.wParam;
>                        client->ThreadAttach();
>                        client->Release();
>                        break;
>                }
>
> HTH,
>
> SZ
>
> ----- Original Message ----- 
> From: "Francois Piette" <[EMAIL PROTECTED]>
> To: <twsocket@elists.org>
> Sent: Friday, December 23, 2005 11:35 AM
> Subject: [twsocket] Cannot create a hidden windows for TWSocket
>
>
>>> Ok. The problem when I attach the debugger to the service process seems
>>> to
>>> be "Cannot create a hidden windows for TWSocket.". Any cure for this?
>>
>> You should try to get windows error number/message to know more.
>> Usually you get this when Windows run out of resources.
>> The error created in XSocketAllocateHWnd. Grab the error number by 
>> calling
>> GetLastError. Maybe this
>> error number will tell more.
>>
>> --
>> Contribute to the SSL Effort. Visit
>> http://www.overbyte.be/eng/ssl.html
>> --
>> [EMAIL PROTECTED]
>> Author of ICS (Internet Component Suite, freeware)
>> Author of MidWare (Multi-tier framework, freeware)
>> http://www.overbyte.be
>>
>>
>> -- 
>> To unsubscribe or change your settings for TWSocket mailing list
>> please goto http://www.elists.org/mailman/listinfo/twsocket
>> Visit our website at http://www.overbyte.be
>
> -- 
> To unsubscribe or change your settings for TWSocket mailing list
> please goto http://www.elists.org/mailman/listinfo/twsocket
> Visit our website at http://www.overbyte.be 

-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Reply via email to