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