Thanks Scott,
I ll try this one.
On Fri, Mar 19, 2010 at 6:05 PM, Scott Noone wrote:
> That note is for implementers of storage class drivers, so it’s not really
> relevant.
>
>
> Then how can i use this to get USB busid?
>>
>
> You have to figure out which disk maps to the volume that you have. One way
> to do this is to send a request to the volume that the volume will pass
> through to the disk and save the results. Then grab all of the disk devices
> in the system and send the same request to each disk until you get a match.
> Then you have a device object in the disk stack that you can get the
> hardware ID from.
>
> There’s also IOCTL_VOLUME_GET_VOLUME_DISK_EXTENTS which will give you the
> disk number (forgot about this one yesterday). You can then open
> \Global??\PhysicalDriveN (I think, you need to verify) and do the same sort
> of thing.
>
>
> -scott
>
> –
> Scott Noone
> Consulting Associate
> OSR Open Systems Resources, Inc.
> http://www.osronline.com
>
>
>
> “Dennis Scott” wrote in message
> news:xxxxx@ntfsd…
>
> Guys,
>
> IOCTL_SCSI_GET_ADDRESS discription says “This request is not relevant to
> storage class drivers that support Plug and Play because the port driver
> supplies the address information on behalf of the class driver” Then how can
> i use this to get USB busid?
>
>
> On Fri, Mar 19, 2010 at 9:06 AM, Dennis Scott
> wrote:
>
> Hello scott,
>
> Thanks,
>
> This has to be done in both Xp, and Vista, the code returned
> “STORAGE\Volume” in Xp and i have to test in vista,
>
> Maxim,
>
> I ll test with IoGetDeviceInterfaces with IOCTL_SCSI_GET_ADDRESS or
> IOCTL_STORAGE_GET_DEVICE_
> NUMBER and let you know.
>
>
>
>
> On Fri, Mar 19, 2010 at 5:27 AM, Maxim S. Shatskih
> wrote:
>
> starting point might be IoGetDeviceInterfaces and IOCTL_SCSI_GET_ADDRESS,
>>
>
>
> IOCTL_STORAGE_GET_DEVICE_NUMBER also helps.
>
> –
> Maxim S. Shatskih
> Windows DDK MVP
> xxxxx@storagecraft.com
> http://www.storagecraft.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
>
> —
> 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
>