Пример #1
0
 public static IntPtr SetWindowsHookEx(int idHook, LowLevelKeyboardProc lpfn, IntPtr hMod, uint dwThreadId)
 {
     return(WinAPIWrapper.SetWindowsHookEx(idHook, lpfn, hMod, dwThreadId));
 }
Пример #2
0
 /// <summary>
 /// 设置键盘Hook
 /// </summary>
 /// <param name="lpfn"></param>
 /// <returns></returns>
 public static IntPtr SetKeyboardHookEx(LowLevelKeyboardProc lpfn)
 {
     return(WinAPIWrapper.SetWindowsHookEx(NativeMethods.WH_KEYBOARD_LL, lpfn, IntPtr.Zero, 0));
 }