On Thu, Feb 4, 2016 at 5:41 PM, Richard Mace <[email protected]> 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.
-- _______________________________________________ Lazarus mailing list [email protected] http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
