I’m learning filter driver with WDK diskperf sample code,
and hope to get the diskdrives detail information that filtered by diskperf in AddDeivce routine
(model, serial, size… like info from “wmic diskdrive get modek, serialnumber, size”)
can I send deviceIOcontrol in the filter driver? or how can l get the lower device object’s data?
Yes.
Peter
OSR
>> that filtered by diskperf in AddDeivce routine
send deviceiocontrol in the completion path of StartDevice.
Thanks for reply,
what will be the different to call deviceIOControl in “AddDeivce” and “StartDevice”,
could you please help provide sample code to read the disk info (model/serial) there?
AddDevice is usually too early to send requests to hardware… it, after all, hasn’t received a “start” yet.
In the Start completion path, as Mr. Bisht suggests, would be the best approach.
No… this isn’t Code Project. If you’re a driver developer, I’m sure you can figure this out. If you CAN’T figure this out, you probably need more help than what a code snippet will provide.
Peter
OSR
Thanks,
I found the online document “Creating IOCTL Requests in Drivers” helps.
http://www.osronline.com/ddkx/kmarch/irps_4zs7.htm
You might also like:
http://msdn.microsoft.com/en-us/library/windows/hardware/ff542894(v=vs.85).aspx