查看KeyboardProc,MSDN上说: The system calls this function whenever an application calls the GetMessage or PeekMessage function and there is a keyboard message ( WM_KEYUP or WM_KEYDOWN) to be processed.
应该是说,当应用程序调用 PeekMessage或 GetMessage的时候,系统会调用KeyboardProc。
Remarks上说: This hook may be called in the context of the thread that installed it. The call is made by sending a message to the thread that installed the hook. Therefore, the thread that installed the hook must have a message loop.
应该是说:系统在安装这个钩子的线程中调用它。
但是我看了Windows核心编程第五版,上面说是,应用程序会将KeyboardProc所在的模块映射到地址空间然后执行钩子过程。
我就晕了,是不是我理解错了?大家帮忙看看。
应该是说,当应用程序调用 PeekMessage或 GetMessage的时候,系统会调用KeyboardProc。
Remarks上说: This hook may be called in the context of the thread that installed it. The call is made by sending a message to the thread that installed the hook. Therefore, the thread that installed the hook must have a message loop.
应该是说:系统在安装这个钩子的线程中调用它。
但是我看了Windows核心编程第五版,上面说是,应用程序会将KeyboardProc所在的模块映射到地址空间然后执行钩子过程。
我就晕了,是不是我理解错了?大家帮忙看看。