protected int CoreHookProc(int code, IntPtr wParam, IntPtr lParam) { int result; if (code < 0) { result = LocalWindowsHook.CallNextHookEx(this.m_hhook, code, wParam, lParam); } else { this.OnHookInvoked(new HookEventArgs { HookCode = code, wParam = wParam, lParam = lParam }); result = LocalWindowsHook.CallNextHookEx(this.m_hhook, code, wParam, lParam); } return(result); }
public void Uninstall() { LocalWindowsHook.UnhookWindowsHookEx(this.m_hhook); }
public void Install() { this.m_hhook = LocalWindowsHook.SetWindowsHookEx(this.m_hookType, this.m_filterFunc, IntPtr.Zero, AppDomain.GetCurrentThreadId()); }