Hi,
I have looked at the usbview application in the DDK and know how to get the mass
storage driver key name, . However, I don’t know how to get the drive handles that
are exposed by the windows drivers for this particular device. because I want to
know the volume name and disk size of this USB Disk. What should I do ?
Is thee any way to get the volume/disk size of how to get the driver letter of this
special USB disk ?
Regards,
gamester
A mixture of documented SDK and DDK interfaces will get you all the
information you need. Puzzling out correlating which USB mass storage
device is which is do-able.
For example:
IOCTL_STORAGE_QUERY_PROPERTY type PropertyStandardQuery
will return you a STORAGE_ADAPTER_DESCRIPTOR with a BusType field with
a value of BusTypeUsb. That would be a USB Mass Storage device.
IOCTL_STORAGE_GET_DEVICE_NUMBER will return the disk number, which
correlates to Disk Manager’s Disk N display and to \?\PhysicalDriveN.
The SDK provides interfaces for enumerating all volumes and each
volume can then be enumerated for its ‘disk extents’ which in turn
correlate to the same Disk N value so that you can map volumes to
disks.
Volumes can be interrogated for their mount points (drive letters, if
they have one.)
Oddly enough all of this is documented, once you know which documents
to look for 
On Nov 4, 2007 3:03 AM, wrote:
> Hi,
>
> I have looked at the usbview application in the DDK and know how to get the mass
> storage driver key name, . However, I don’t know how to get the drive handles that
> are exposed by the windows drivers for this particular device. because I want to
> know the volume name and disk size of this USB Disk. What should I do ?
>
> Is thee any way to get the volume/disk size of how to get the driver letter of this
> special USB disk ?
>
> Regards,
> gamester
>
>
>
> —
> NTDEV is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars 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
>
–
Mark Roddy