示例#1
0
 private int CallNextHook(int code, KeyboardMessage message, ref KEYBOARDSTATE state)
 {
     if (code >= 0)
     {
         KeyboardHookedEventArgs e = new KeyboardHookedEventArgs(message, ref state);
         OnKeyboardHooked(e);
         if (e.Cancel)
         {
             return(-1);
         }
     }
     return(NativeMethod.CallNextHookEx(IntPtr.Zero, code, message, ref state));
 }
示例#2
0
 public static extern int CallNextHookEx(IntPtr hook, int code, KeyboardMessage message, ref KEYBOARDSTATE state);
示例#3
0
 internal KeyboardHookedEventArgs(KeyboardMessage message, ref KEYBOARDSTATE state)
 {
     this.message = message;
     this.state   = state;
 }