But what code would you out in the service to terminate itself? Effectively doing the same as calling close in a GUI app?
Richard On 4 Feb 2016 19:11, <[email protected]> wrote: > On 02/04/2016 11:41 AM, Richard Mace wrote: > >> Hi, >> >> 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. >> >> Windows Lazarus 1.4.4 >> > > i don't know of a ""best"" way but there are several... the easiest might > be to monitor a disk-based semaphore file... if it exists, the service > closes as you desire... > > -- > NOTE: No off-list assistance is given without prior approval. > *Please keep mailing list traffic on the list* unless > private contact is specifically requested and granted. > > -- > _______________________________________________ > Lazarus mailing list > [email protected] > http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus >
-- _______________________________________________ Lazarus mailing list [email protected] http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
