如何将事件句柄从应用程序传递给驱动程序? [英] How to pass event handle from application to a driver?

查看:77
本文介绍了如何将事件句柄从应用程序传递给驱动程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的开发平台是Windows Embedded Compact 7。


我有一个应用程序加载我的驱动程序并通过IOCTL进行通信。我的驱动程序是内核模式,应用程序作为用户模式加载(我假设)。


现在我的一个IOCTL请求驱动程序,我希望驱动程序进行内部轮询和每次阅读后,它都会向应用程序发送一个包含数据的事件,以便应用程序可以在其GUI上更新显示的值。 


我可以发送带有IOCTL请求的事件句柄做这个?或者在内核模式下事件处理寻址是否会有所不同,应用程序可能无法从驱动程序接收事件集?


我现在没有这个板,所以我只是想在编码时抛出这个问题。


谢谢

解决方案

是的,你可以创建一个命名事件,你可以在你的应用程序和驱动程序中使用它而不管内核和用户模式。


你可以看到下面的博客分享块内核和用户之间的数据。


http://vinoth-vinothblog.blogspot.in/2008/11/sharing-blocks-of-memory-between-kernel.html


My development platform is Windows Embedded Compact 7.

I have an application that loads my driver and communicates via IOCTL. My driver is kernel mode which the application is loaded as user mode (I assume).

Now in one of my IOCTL request to the driver, I want the driver to do an internal polling and after every read it will send an event with data to the application so that the app can update the displayed value on its GUI. 

Can I send an event handle with the IOCTL request to do this? Or will the event handle addressing be different in kernel mode and application may not be able to receive the set the event from the driver?

I don't have the board to this now, so I just want to throw this question while I'm still doing the coding.

Thanks

解决方案

yes you can create a Named event and you can use it in your application as well as driver irrespective of kernel and user mode.

you can see the below blog for share the block of data between kernel and user.

http://vinoth-vinothblog.blogspot.in/2008/11/sharing-blocks-of-memory-between-kernel.html


这篇关于如何将事件句柄从应用程序传递给驱动程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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