コード例 #1
0
 private static IntPtr SetHook(GlobalKeyBoardMouseHooks.LowLevelKeyboardProc proc)
 {
     using (Process currentProcess = Process.GetCurrentProcess())
     {
         using (ProcessModule mainModule = currentProcess.MainModule)
             return(NativeMethods.SetWindowsHookEx(13, proc, NativeMethods.GetModuleHandle(mainModule.ModuleName), 0U));
     }
 }
コード例 #2
0
 internal static extern IntPtr SetWindowsHookEx(
     int idHook,
     GlobalKeyBoardMouseHooks.LowLevelKeyboardProc lpfn,
     IntPtr hMod,
     uint dwThreadId);