Pete Williams wrote:
> I'll post the code tomorrow, but before then...
> 
> - The RTC component is on a TDataModule, which is created in the
> Execute() method of the thread in which it runs. 
> - The Connect method is called from the same thread as it's
> constructor, I'm not mixing threads. 

You do not check message's HWND member. If your custom 
message IDs EMAIL_GATEWAY_TICK .. EMAIL_GATEWAY_QUIT are not
unique they may conflict with message IDs used by TSmtpCli
(or RTC?) internally. 

while not Terminated do
begin
    if not GetMessage(Msg, 0, 0, 0) then
        break;
    if Msg.Hwnd = 0 then // PostThreadMessage() => destination HWND = 0
    begin
        case Msg.Message of
        EMAIL_GATEWAY_TICK : ;
        [..]
        else 
           TranslateMessage(Msg);
           DispatchMessage(Msg); 
        end;
    end
    else begin // Dispatch window messages 
        TranslateMessage(Msg);
        DispatchMessage(Msg); 
    end;
end;

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

Reply via email to