- Flash usb device - Physical size.
- Posted by Hadason@gmail.com on October 23rd, 2005
Hi,
I'm trying to get the physical size of a flash device.
I know that there are no -Real- CHS values for such a device, but i
don't find any other way to get its physical size.
Using DeviceIOControl with IOCTL_DISK_GET_DRIVE_GEOMETRY returns wrong
values.
I also tried using IOCTL_SCSI_MINIPORT_IDENTIFY and
DFP_RECEIVE_DRIVE_DATA but it doesn't work on USB devices (GetLastError
returns "The request is not supported").
Is there any other way to do that ? (I've searched google for days with
no success)
Thanks and have a good day.
Hadas Nahon.
- Posted by Maxim S. Shatskih on October 23rd, 2005
IOCTL_DISK_GET_PARTITION_INFO for the whole disk is one of the good ways.
Sending SCSIOP_READ_CAPACITY down is another.
--
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
maxim@storagecraft.com
http://www.storagecraft.com
<Hadason@gmail.com> wrote in message
news:1130071850.806719.99300@z14g2000cwz.googlegro ups.com...
- Posted by Hadason@gmail.com on October 25th, 2005
Thank you, i'm heading to check it.