IoGetDeviceProperly 导致 BSOD
我在Windows中为硬盘编写了一个过滤驱动程序(例如DDK的DiskPerf),我需要获取有关我的驱动程序所附加的设备的一些信息,例如HardWareID。 我在 IRP_MJ_READ 函数中使用 IoGetDeviceProperly。但这种方法会导致 BSOD,并且 BSOD 表示问题是“IRQL_NO_LESS_OR_EQUAL”。 MSDN 说 DispatchRead 和 IoGetDeviceProperly 都运行在 PASSIVE_LEVEL。 怎么了? 如何获取有关驱动程序附加到的设备的信息?
I have written a filter driver for hard disks in Windows ( like DiskPerf of DDK ) and I need to get some information about device which my driver is attached to it, for example HardWareID.
I use IoGetDeviceProperly inside my IRP_MJ_READ function. But this method causes BSOD and BSOD says problem is "IRQL_NO_LESS_OR_EQUAL". MSDN says DispatchRead and IoGetDeviceProperly, both run at PASSIVE_LEVEL.
What is wrong?
How can I get information about device that driver is attached to it?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
DispatchRead 例程可以在 IRQL = APC_LEVEL 处调用。
请参阅调度例程和 IRQL
调用IoGetDeviceProperty并将设备信息保存在DispatchCreate中并在DispatchRead中使用。
The DispatchRead routine can be called at IRQL = APC_LEVEL.
See Dispatch Routines and IRQLs
Call IoGetDeviceProperty and save device information in DispatchCreate and Use it in DispatchRead.