예제 #1
0
        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);
        }
예제 #2
0
 public void Uninstall()
 {
     LocalWindowsHook.UnhookWindowsHookEx(this.m_hhook);
 }
예제 #3
0
 public void Install()
 {
     this.m_hhook = LocalWindowsHook.SetWindowsHookEx(this.m_hookType, this.m_filterFunc, IntPtr.Zero, AppDomain.GetCurrentThreadId());
 }