public KeyboardMonitorEventArgs( NativeMethods.KeyboardMessage message, ref NativeMethods.KeyboardState state ) { _message = message; _state = state; }
private int CallNextHook(int code, NativeMethods.KeyboardMessage message, ref NativeMethods.KeyboardState state) { if (code >= 0) { var e = new KeyboardMonitorEventArgs(message, ref state); OnKeyboardEvent(this, e); if (e.Cancel) { return(-1); } } return(NativeMethods.CallNextHookEx(IntPtr.Zero, code, message, ref state)); }