德尔福键盘钩子 [英] Delphi Keyboard Hook

查看:147
本文介绍了德尔福键盘钩子的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个有趣的问题,实施全球键盘钩子。

I'm having an interesting problem implementing a global keyboard hook.

我写它是用来设置挂钩,一个DLL,然后它加载DLL和处理挂钩的结果的应用程序(德尔福)。这是在完成工作在我的电脑今天下午和一些测试我想通后,这是工作的100%。

I wrote a dll which is used to set the hook and then an application (Delphi) which loads the dll and processes the results of the hook. This was done this afternoon on my PC at work and after some testing I figured it was working 100%.

我刚刚测试了相同的应用程序和DLL这里在家里,我没有得到任何错误,但应用程序不似乎要么得到任何数据。

I've just tested the same app and dll here at home and I'm not getting any errors, but the application does not appear to be getting any data either.

这两款机器是WinXP的,虽然我的工作机器是SP2而这一次SP3。

Both machines are WinXP, although my work machine is SP2 and this one is SP3.

以前有Win32 API中的一些变化,这将导致此故障,或者可以在问题涉及到一些A / V /间谍软件/ MS更新已最近发布?

Has there been some change in the Win32 API which would cause this to malfunction, or could the problem be related to some A/V / Spyware / MS Update that has been released recently?

我希望这里有人会知道的一个明显的原因,我花几个小时的调试在此之前可能发生。

I'm hoping somebody here will know of an obvious reason that this may happen before I spend hours debugging.

谢谢!

推荐答案

这是棘手比它的声音。下面是关于德尔福与示例源$ C ​​$ C 编写全局钩子,沿着信息。

This is trickier than it sounds. Here is information about writing global hooks in Delp along with sample source code.

这篇关于德尔福键盘钩子的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆