Example #1
0
 public virtual void DetachHooks()
 {
     try
     {
         _keyboardHook?.Dispose();
         _keyboardHook = null;
     }
     catch { }
 }
Example #2
0
 public virtual void InstallHooks(IntPtr handle)
 {
     try
     {
         _keyboardHook = new KeyboardLLHook(handle, _options, _keyboadHandler);
         _keyboardHook.Install();
     }
     catch
     {
         DetachHooks();
     }
 }