Getting Device Number with lower filter

Hi,

With an upper filter driver, I can use IOCTL_STORAGE_GET_DEVICE_NUMBER to get drive info. But since that IOCTL is handled by the class driver, it won’t work for a lower filter. Does anyone have any idea how to get drive numbers via a lower filter?

Thanks,
Dennis

You can send IRPs to devices higher than you in the stack
(IoGetAttachedDeviceReference comes in handy here).

-scott


Scott Noone
Consulting Associate
OSR Open Systems Resources, Inc.
http://www.osronline.com

wrote in message news:xxxxx@ntfsd…
> Hi,
>
> With an upper filter driver, I can use IOCTL_STORAGE_GET_DEVICE_NUMBER to
> get drive info. But since that IOCTL is handled by the class driver, it
> won’t work for a lower filter. Does anyone have any idea how to get drive
> numbers via a lower filter?
>
> Thanks,
> Dennis
>

Scott,

IoGetAttachedDeviceReference was exactly what I needed. I’ve got it working perfectly now after weeks of banging my head against my desk.

Thank you very much,
Dennis