Ejemplo n.º 1
0
 protected void OnHookInvoked(HookEventArgs e)
 {
     if (HookInvoked != null)
     HookInvoked(this, e);
 }
Ejemplo n.º 2
0
        // ************************************************************************
        // ************************************************************************
        // Default filter function
        protected int CoreHookProc(int code, IntPtr wParam, IntPtr lParam)
        {
            if (code < 0)
            return CallNextHookEx(m_hhook, code, wParam, lParam);

              // Let clients determine what to do
              HookEventArgs e = new HookEventArgs {HookCode = code, wParam = wParam, lParam = lParam};
              OnHookInvoked(e);

              // Yield to the next hook in the chain
              return CallNextHookEx(m_hhook, code, wParam, lParam);
        }