[Lazarus] Cross-compiling for Raspberry Pi2

Michael Van Canneyt michael at freepascal.org
Mon Sep 21 13:11:19 CEST 2015



On Mon, 21 Sep 2015, Graeme Geldenhuys wrote:

> On 2015-09-21 09:14, Michael Schnell wrote:
>>
>> I am rather positive that a Delphi "Service Application" can do TTimer etc.
>
> No it doesn't... At least not by simply creating an instance of TTimer
> and hooking up the OnTimer event.
>
> This applies to both Console and Service applications under Delphi. The
> Delphi TTimer, in uses the WM_TIMER Windows message and a Console and
> Service application don't have a message loop. So to get it to work, you
> need to implement your own message loop.
>
>
> http://stackoverflow.com/questions/12026951/using-vcl-ttimer-in-delphi-console-application
>
>  http://objectmix.com/delphi/403332-ttimer-service.html

Correct for console, not for service. Check svcmgr unit, it runs the message loop.

Michael.




More information about the Lazarus mailing list