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