> Hm, could that message pump be realised by a timer in the dll where the
> application.processmessages is called each onTimer event?
You can not use a TTimer since that uses windows messages and thus
needs the message loop. But you can use the windows SetTimer API with
a callback. I use such a timer to close a database in a DLL.
Angus
procedure TimerProc (Wnd: HWnd; Msg: Integer; Id: Integer;
CurrentTime: DWord) ; stdcall ;
begin
SetTimerEnabled (false) ;
doDBClose ;
end;
procedure SetTimerEnabled (const Value: Boolean);
begin
if TimerEnabled = Value then Exit;
if Value then
begin
TimerHandle := SetTimer (0, 0, TimerInterval, @TimerProc) ;
end
else
begin
if TimerHandle <> 0 then
begin
KillTimer (0, TimerHandle) ;
TimerHandle := 0 ;
end;
end;
TimerEnabled := Value;
end;
--
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