如何从Windows内核调用usermode? [英] How to call usermode from Windows kernel?

查看:236
本文介绍了如何从Windows内核调用usermode?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当Windows核心中发生有趣的事件时,我想从我的驱动程序调用我的应用程序。我需要能够将至少4个字节的数据传回用户模式。如何实现呢?这些事件可能会发生,但不是太经常,所以我不想建立一个队列系统和使用IOCTLs。

I'd like to call my app from my driver when an interesting event happens in the Windows kernel. I need to be able to pass at least 4 bytes of data back to user mode. How to achieve this? These events might happen quite, but not too, often, so I don't want to build a queue system and use IOCTLs.

我在想驱动程序被加载,用户模式应用使用IOCTL注册其回调,并且内核在事件发生时保持调用该回调,并且最终用户模式客户端注销回调,并且没有更多数据被发送到用户模式。这是可能的吗?

I was thinking of something like the driver gets loaded, the user mode app registers its callback using IOCTL and kernel keeps calling that callback when events happen and finally the user mode client unregisters the callback and no more data is send to user mode. Is this possible?

我是新的内核编程,所以经过一天的谷歌搜索,我决定在这里问。我注意到没有太多关于内核和驱动程序的讨论。微软发布了一篇关于这个问题的文章(当然是MS Word格式),标题为

I'm new to kernel programming, so after a day of googling I decided to ask here. I've noticed that there isn't much discussion about the kernel and drivers. And even less proper docs.

推荐答案

href =http://download.microsoft.com/download/e/b/a/eba1050f-a31d-436b-9281-92cdfeae4b45/KM-UMGuide.doc =nofollow noreferrer>用户模式相互作用:指南对于内核模式驱动程序

Microsoft published a paper about this (in MS Word format, of course), titled User-Mode Interactions: Guidelines for Kernel-Mode Drivers.

感谢google,这里是在 HTML

Thanks to google, here it is in HTML.

这篇关于如何从Windows内核调用usermode?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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