[Lazarus] Stopping a service from within a service
Jy V
jyv110 at gmail.com
Thu Feb 4 18:41:52 CET 2016
On Thu, Feb 4, 2016 at 5:41 PM, Richard Mace <richard.mace at gmail.com> wrote:
>
>> What's the best way of shutting down a service that is a service, having
>> the same effect as the user clicking stop.
>
> Basically, I want my service to monitor a condition, which if met, it will
>> stop itself.
>
>
Microsoft is using a loop waiting for the status to report as STOPPED
https://msdn.microsoft.com/en-us/library/windows/desktop/ms686335%28v=vs.85%29.aspx
but since you are running the code from within your running service, it may
not be considered useful to wait for yourself (as a program) to have
completed stop.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20160204/ae0231cd/attachment-0003.html>
More information about the Lazarus
mailing list