如何找出是否已经有任何键盘挂钩? [英] How to find out if there are any keyboard hooks already in place?
本文介绍了如何找出是否已经有任何键盘挂钩?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如果要查看是否已通过SetWindowsHook()设置了任何钩子,什么是最好的方法?
来自键盘间谍:实施和对策 [
If you want to see if any hooks have been set via SetWindowsHook() what''s the best way to do it?
From Keyboard Spy: implementation and counter measures[^] there is a useful routine, but is it optimal?
It has the EnumModules() routine, but I was wondering if anyone has come up with a more direct method? What qualifies as an authorized module - only those you know you have loaded into the process space?
推荐答案
您可以使用WH_DEBUG
安装调试钩子.在调用任何其他钩子例程之前,都要先调用debug钩子例程,并附带有关要调用的钩子的信息.
You can install a debug hook with WH_DEBUG
. The debug hook routine is called before any other hook routine is called with the information about the hook to be called.
这篇关于如何找出是否已经有任何键盘挂钩?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文