Don,
this is returning “STORAGE\Volume”
the code follows
case FILE_DEVICE_DISK_FILE_SYSTEM:if (NT_SUCCESS(FltGetDiskDeviceObject(FltObjects->Volume,&DiskDeviceObject))) {DbgPrint("FltGetDiskDeviceObject succeded\n");status =IoGetDeviceProperty(DiskDeviceObject,DevicePropertyHardwareID,sizeof(name),name, &junk);if (NT_SUCCESS(status)) DbgPrint("succeeded for '%ws' device\n", name); else DbgPrint("IoGetDeviceProperty failed - %X\n", status); }
thanks
dennis scott
On Thu, Mar 18, 2010 at 6:19 PM, Don Burn wrote:
> That should do it, you may get back more than one ID. You will have to
> resolve that.
>
>
> Don Burn (MVP, Windows DKD)
> Windows Filesystem and Driver Consulting
> Website: http://www.windrvr.com
> Blog: http://msmvps.com/blogs/WinDrvr
>
>
>
> From: Dennis Scott [mailto:xxxxx@allaboutif.com]
> Posted At: Thursday, March 18, 2010 8:34 AM
> Posted To: ntfsd
> Conversation: how to get USB busid from minifilter driver
> Subject: Re: how to get USB busid from minifilter driver
>
> Thanks Don,
>
> should i use IoGetDeviceProperty with DeviceProperty as
> DevicePropertyHardwareID?
>
> is this the correct way to get busid.
> On Thu, Mar 18, 2010 at 5:51 PM, Don Burn wrote:
> In the InstanceSetupCallback use FltGetDiskDeviceObject to get the
> device, then use that to get the bus-id and store it in the context for
> the instance. You do not want to get it for every create, it will stay
> the same for a volume.
>
>
>
>
>
> Don Burn (MVP, Windows DKD)
>
> Windows Filesystem and Driver Consulting
>
> Website: http://www.windrvr.com
>
> Blog: http://msmvps.com/blogs/WinDrvr
>
>
>
>
>
>
>
> From: Dennis Scott [mailto:xxxxx@allaboutif.com]
> Posted At: Thursday, March 18, 2010 8:12 AM
> Posted To: ntfsd
> Conversation: how to get USB busid from minifilter driver
> Subject: how to get USB busid from minifilter driver
>
>
>
> Hi all,
>
> How can i get the usb drive bus-id in an minifilter driver during
> IRP_MJ_CREATE.
>
> Thanks and Regards
> dennis scott
>
>
> Information from ESET Smart Security, version of virus
> signature database 4954 (20100318)
>
>
>
> The message was checked by ESET Smart Security.
>
>
>
> http://www.eset.com
>
>
>
> —
> NTFSD is sponsored by OSR
>
> For our schedule of debugging and file system seminars
> (including our new fs mini-filter seminar) visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>
>
> Information from ESET Smart Security, version of virus
> signature database 4954 (20100318)
>
> The message was checked by ESET Smart Security.
>
> http://www.eset.com
>
>
> —
> NTFSD is sponsored by OSR
>
> For our schedule of debugging and file system seminars
> (including our new fs mini-filter seminar) visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>