public void Dispose() { if (!NativeServiceFunctions.CloseServiceHandle(Handle)) { Log.Warn("Warning, unable to close ServiceControlManager.Handle"); } }
public void Dispose() { if (IsValid) { if (!NativeServiceFunctions.CloseServiceHandle(Handle)) { Log.WarnFormat("Warning, unable to close NativeService.Handle"); } Handle = new IntPtr(0); } }