Fastream Technologies wrote:
> Arno,
> 
> ----- Original Message -----
> From: "Arno Garrels" <[EMAIL PROTECTED]>
> To: "ICS support mailing" <twsocket@elists.org>
> Sent: Wednesday, February 07, 2007 2:43 PM
> Subject: Re: [twsocket] Possible bug and solution in TWndControl
> 
> 
>> Fastream Technologies wrote:
>> 
>>> I did not understand what you propose to have a single wndhandler
>>> per thread with messages starting from WM_APP + 100--how to do it
>>> properly?
>> 
>> As we discussed yesterday, increase value of constant WH_MAX_MSG,
>> the higher the value the less windows will be created but performance
>> may decrease. An option to _force_ only one single window is not
>> available in the component. Initialize global variable
>> GWndHandlerMsgLow to change the base of allocated message numbers.
> 
> I believe you are not getting all of my messages (I cannot exactly
> see them since I am using Gmail and Gmail blocks the messages I send
> to mailing lists). Anyway, the WM_USER + 1 is hard coded:

Initialize means you assign it in an Intialization section, do you?
What is the purpose of creating a plain WndHandler in a worker thread?  
Please explain.


> 
> I traced the bug to here:
> 
> function TIcsWndHandlerPool.GetWndHandler(
>     HandlerCount : UINT;
>     ThreadID     : THandle) : TIcsWndHandler;
> var
>     I : Integer;
>     L : TIcsWndHandlerList;
> begin
>     // Search the list which has same thread ID
>     I := FList.Count - 1;
>     while (I >= 0) and
>           (TIcsWndHandlerList(FList.Items[I]).ThreadID <> ThreadID) do
>         Dec(I);
>     if I >= 0 then
>         L := TIcsWndHandlerList(FList.Items[I])
>     else begin
>         // No list found. Create a new one
>         L          := TIcsWndHandlerList.Create;
>         L.ThreadID := ThreadID;
>         FList.Add(L);
>     end;
> 
>     // Search the list for a WndHandler with enough MsgHandlers
> available     I := 0;
>     while I < L.Count do begin
>         Result := TIcsWndHandler(L.Items[I]);
>         if Result.GetMsgLeft >= HandlerCount then
>             Exit;
>         Inc(I);
>     end;
>     Result            := TIcsWndHandler.Create;
>     Result.FOwnerList := L;
>     OutputDebugString(PChar('TIcsWndHandler.Create OwnerList = ' +
> IntToHex(Integer(Result.FOwnerList), 8)));
>     Result.MsgLow     := WM_USER + 1; // The EIP comes here, does not
> use my wndhandler in thread!
>     L.Add(Result);
> end;
> 
> This occurs in threadattach in the thread code I sent!
> 
> Best Regards,
> 
> SZ
> 
> 
>> 
>> Why do you want to debug and tune all at the same time? Usually
>> I start tweaking (known) parameters once the app. runs stable
>> with default settings.
>> 
>> ---
>> Arno Garrels [TeamICS]
>> http://www.overbyte.be/eng/overbyte/teamics.html
>> 
>> 
>>>> 
>>>> And check for HWND = 0 if you process custom thread messages sent
>>>> by PostThreadMessage() (just to be sure).
>>> 
>>> Already doing this.
>>> 
>>>> 
>>>> 
>>>> 
>>>>> Regards,
>>>>> 
>>>>> SZ
>>>>> 
>>>>> ----- Original Message -----
>>>>> From: "Wilfried Mestdagh" <[EMAIL PROTECTED]>
>>>>> To: "ICS support mailing" <twsocket@elists.org>
>>>>> Sent: Tuesday, February 06, 2007 10:17 PM
>>>>> Subject: Re: [twsocket] Possible bug and solution in TWndControl
>>>>> 
>>>>> 
>>>>>> Hi,
>>>>>> 
>>>>>>> It is just a simple constant, why shouldn't it be 800 instead of
>>>>>>> 100??
>>>>>> 
>>>>>> Because it is not the source of a bug. No need to change anything
>>>>>> if it is not buggy. Changing it and then your code works does not
>>>>>> prove there is a bug.
>>>>>> 
>>>>>> ---
>>>>>> Rgds, Wilfried [TeamICS]
>>>>>> http://www.overbyte.be/eng/overbyte/teamics.html
>>>>>> http://www.mestdagh.biz
>>>>>> 
>>>>>> --
>>>>>> 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
-- 
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