public KeyboardHookedEventArgs(
     NativeMethods.KeyboardMessage message,
     ref NativeMethods.KeyboardState state
     )
 {
     _message = message;
     _state   = state;
 }
Ejemplo n.º 2
0
 private int CallNextHook(
     int code,
     NativeMethods.KeyboardMessage message,
     ref NativeMethods.KeyboardState state
     )
 {
     if (code >= 0)
     {
         var e = new KeyboardHookedEventArgs(message, ref state);
         OnKeyboardHooked(e);
         if (e.Cancel)
         {
             return(-1);
         }
     }
     return(NativeMethods.CallNextHookEx(IntPtr.Zero, code, message, ref state));
 }