Пример #1
0
 public IntPtr UnLoadHook()
 {
     if (hHook != IntPtr.Zero)
     {
         if (Win32.UnhookWindowsHookEx(hHook))
         {
             hHook = IntPtr.Zero;
         }
     }
     return(hHook);
 }
Пример #2
0
 //卸载Hook
 public bool UnLoadHook()
 {
     if (hHook == IntPtr.Zero)
     {
         return(false);
     }
     if (Win32.UnhookWindowsHookEx(hHook))
     {
         hHook = IntPtr.Zero;
         gc.Free();
         return(true);
     }
     return(false);
 }