----- Original Message ----- 
From: "Arno Garrels" <[EMAIL PROTECTED]>
To: "ICS support mailing" <twsocket@elists.org>
Sent: Wednesday, August 22, 2007 12:30 PM
Subject: Re: [twsocket] ThreadDEtach with THttpConnection problem

> Fastream Technologies wrote:
>>> Even if there were still such unregistered messages pending in the
>>> message queue due to the hidden window still exists (handling
>>> messages for other components of that thread) those unregistered
>>> messages won't be touched by the component but handled by
>>> DefWindowProc, so no problem. If the hidden window has been
>>> destroyed Windows flushes the thread message queue so GetMessage()
>>> should never see a message for a non-existing window.
>> How does DefWindowProc work?
> In this cases it removes those unregistered messages from the
> queue, note that in this case the window still exists.
>> What if the handle posted is no longer
>> in that thread?
> I think that's impossible, since GetMessage() or PeekMessage() won't 
> retrieve
> messages with an invalid window handle.
> Your message pump may not work correctly, make sure that you
> use this template:
> while GetMessage(Msg, 0, 0, 0) do
> begin
>    if (Msg.hwnd = 0) then //***
>    begin
>        **handle thread messages here (those posted by PostThreadMessage)**
>    end
>    else begin
>        TranslateMessage(Msg);
>        DispatchMessage(Msg);
>    end;
> end;

This trick did not work either! :-((


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