public override void Run(ServiceDescriptor descriptor, Win32Services svcs, Win32Service? svc)
Log.Info("Stopping the service with id '" + descriptor.Id + "'");
Program.ThrowNoSuchService();
while (svc != null && svc.Started)
Log.Info("Waiting the service to stop...");
svc = svcs.Select(descriptor.Id);
Log.Info("The service stopped.");
public override void Run(ServiceDescriptor descriptor, Win32Services svcs, Win32Service? svc)
Log.Info("Stopping the service with id '" + descriptor.Id + "'");
Program.ThrowNoSuchService();
if (e.ErrorCode == ReturnValue.ServiceCannotAcceptControl)
Log.Info($"The service with ID '{descriptor.Id}' is not running");