private void StopService() { string name = Services[SelectedEntryIndex].Name; IntPtr ptr; ServiceControl.CallStopService(name, out ptr); UpdateStatus(ptr); ServiceControl.ReleaseEntry(ptr); }