如何从Windows内核调用用户模式?
当 Windows 内核中发生有趣的事件时,我想从驱动程序调用我的应用程序。我需要能够将至少 4 个字节的数据传递回用户模式。如何实现这一目标?这些事件可能会经常发生,但不会太频繁,因此我不想构建队列系统并使用 IOCTL。
我正在考虑加载驱动程序,用户模式应用程序使用 IOCTL 注册其回调,并且内核在事件发生时不断调用该回调,最后用户模式客户端取消注册回调,并且不再将数据发送到用户模式。这可能吗?
我是内核编程的新手,所以经过一天的谷歌搜索后,我决定在这里问。我注意到关于内核和驱动程序的讨论不多。甚至不太合适的文档。
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.
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?
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论