tags:

views:

53

answers:

1

I'm trying to get the mount point(linux/osx) or disk drive (windows) of a specific USB mass storage device.

I can use libusb to determine if the correct device is inserted but how do I determine where it is mounted?

I'm using C++ but I assume C code would work just as well. Cross-platform code would be preferable.

+1  A: 

The C standard library provides no facilities for this, so true cross platform compatibility is not possible. On Windows you use a combination of GetLogicalDrives, and GetLogicalDriveType, as described here. You could probably map that information to your device by using GetVolumeInformationByHandleW.

Billy ONeal