Yes these are all what I thought for a week time! I call GetMessage, then 
check for known/my messages. If none of them, call dispatchmessage and all 
works fine except the problem which goes away if we set the WHG_MAX to 800 
instead of 100! Now there is no such exception thrown--tested with millions 
of connections.

Francois, will you?

Best Regards,

SZ

----- Original Message ----- 
From: "Arno Garrels" <[EMAIL PROTECTED]>
To: "ICS support mailing" <twsocket@elists.org>
Sent: Monday, February 05, 2007 1:50 PM
Subject: Re: [twsocket] Possible bug and solution in TWndControl


>>> This is probably because you post custom messages do you?
>>
>> Yes but they are starting from WM_USER and there are only 4 of them
>> in this thread. According to help, WM_USER starts from 0x0800 and
>> there should be enough room until WM_APP+100.
>
> But there must somebody send messages in that range.
>
> At first check whether you send any message to the hidden component
> window that has not been registered thru a call to
> WndHandler.AllocateMsgHandler().
>
> Also, you can (should) use your own message pump in a thread, that
> checks the HWND.
>
> if msg.hwnd = 0 then { Thread message }
> begin
>  Any message that was posted to this thread goes here.
>  In this case you may even PostThreadMessages with message numbers
>  in the range of ICS messages.
> end
> else
>  Not a thread message, receiver is a window
>
> ---
> Arno Garrels [TeamICS]
> http://www.overbyte.be/eng/overbyte/teamics.html
>
>
>
>
>
> Fastream Technologies wrote:
>> Hello Arno,
>>
>> ----- Original Message -----
>> From: "Arno Garrels" <[EMAIL PROTECTED]>
>> To: "ICS support mailing" <twsocket@elists.org>
>> Sent: Monday, February 05, 2007 1:24 PM
>> Subject: Re: [twsocket] Possible bug and solution in TWndControl
>>
>>
>>> Fastream Technologies wrote:
>>>> Hello,
>>>>
>>>> When I use the following thread code:
>>>>
>>>> void __fastcall ReverseProxyClientThread::Execute()
>>>> {
>>>>  //---- Place thread code here ----
>>>>  FreeOnTerminate = true;
>>>>
>>>> ...
>>>>
>>>>  TIcsWndHandler *windowHandler = new TIcsWndHandler();
>>>>  windowHandler->MsgLow = WM_APP + 100;
>>>>
>>>>  while(!Terminated)
>>>>   messagePump();
>>>>
>>>>  delete windowHandler;
>>>> }
>>>>
>>>> sometimes we get "Test exception" exception. We have up to 32
>>>> THttpConnection and 32 THttpCli descendents in this thread. When I
>>>> raised WHG_MAX to 800, the exception disappears. Francois, could you
>>>> raise the constant?
>>>
>>> This is probably because you post custom messages do you?
>>
>> Yes but they are starting from WM_USER and there are only 4 of them
>> in this thread. According to help, WM_USER starts from 0x0800 and
>> there should be enough room until WM_APP+100.
>>
>> Best Regards,
>>
>> SZ
> -- 
> 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