如何将输入从键盘过滤器驱动程序直接发送到应用程序?

问题描述:

大家好,

背景:
我需要拦截来自连接的鼠标和kb的输入(可以是1组或超过1组)
除此之外,我还需要知道输入来自何处,并能够随时阻止输入.
我正在实现kbfiltr,因为钩子和原始输入在我的设计中不起作用.

使用wddk的kbfiltr示例源代码,我可以阻止输入被发送到OS.
问题是我需要将此输入发送到应用程序,有人知道我该怎么做吗?

谢谢!

hello all,

background:
i need to intercept input from connected mouse and kb (can be 1 set or more than 1)
aside from that i need to know where the input came from and be able to block then whenever i want to.
i am implementing a kbfiltr since hook and raw input does not work in my design.

using the kbfiltr sample source code of wddk, i can block input being sent to the OS.
the problem is i need to send this input to an application, does anone know how i can do that?

thanks!

出于这种目的,您需要使用挂钩.从这里开始: http://msdn.microsoft.com/en-us /library/ms644959(v=vs.85).aspx [ ^ ].

如果您需要拦截某些系统范围的事件,则它必须是 global Hook .只有创建在全局 Hook Chain 中安装Hook的单独的DLL时,才能使用它.



我非常确定挂钩可以阻止任何按键输入并破坏挂钩链.目前,我还不知道如何获取标识特定HID的任何数据,以便您可以彼此区分.我不确定此信息是否可用.

我唯一能想到的就是使用DDK为您的HID开发自定义驱动程序.

—SA
For such purposes you need to use Hooks. Start from here: http://msdn.microsoft.com/en-us/library/ms644959(v=vs.85).aspx[^].

If you need to intercept some System-wide event it has to be a global Hook. You can only use it if you create a separate DLL installing the Hook in the global Hook Chain.



I''m pretty much sure a Hook can block any key input and break a hook chain. At the moment I have no idea how can you get any data identifying a particular HID so you could tell one from another; I''m not sure this information is available.

The only thing I can think of is developing custom drivers for your HIDs using DDK.

—SA


已完成:http://oblita.com/Interception
Already done: http://oblita.com/Interception