Dear All

As USB device is popular at right now, like FDD, ZIP, FlashDisk, External HDD Box, CDROM ....

So how can i get the size of the USB device size under WinXP/2K

For example , if i connect a USB device which is External HDD Box, and the inside HDD is 30G,
how to get it by write program ?

thanks
Posted on 2004-05-20 01:20:42 by jordanc
i would start by looking here:

USB
Posted on 2004-05-20 19:50:59 by smurf
You get drive letters for those devices when they connect.

Can't you use the same APIs as the ones for non-USB devices?
Posted on 2004-05-21 17:31:44 by tenkey
I thought that too, tenkey... a matter of GetVolumeInformation on the drive? If not, let us know more :)
Posted on 2004-05-21 21:10:49 by f0dder
ya I thoguht that as well, that u just get the drive letter and use the GetVolumeInfo function, when these drives are connected they act as regular IDE drives.
Posted on 2004-05-22 15:17:34 by x86asm
Thanks all
Sorry that my question not clear enough
My request is physical size, for example
if a HDD have 30G, but only partition 20G, then 10G is free
if use GetVolumeInfo, then can't see the free space
Posted on 2004-05-23 22:26:20 by jordanc
jordanc
GetDiskFreeSpace, GetDiskFreeSpaceEx?
Posted on 2004-05-24 00:53:28 by P2M
You might want to look through the Device Management information at MSDN.

If you work at the level of the USB data protocol, you will need to get the separate USB document for Mass Storage devices.
Posted on 2004-05-24 16:38:35 by tenkey