2

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?

millimoose
  • 39,073
  • 9
  • 82
  • 134
CoyBit
  • 1,592
  • 1
  • 17
  • 19
  • 1
    They don't run at passive, they only work correctly at passive. Paging I/O requests run at apc level, you'll have to avoid those. – Hans Passant Jan 28 '12 at 19:56

1 Answers1

0

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.

Michael Kim
  • 343
  • 5
  • 20