I wonder if there is an API to distinguish floppy and flash disk in windows, C++ And is it possible to link a flash disk to A:\? Many Thanks!
views:
86answers:
3
A:
It is possible to link a flash disk to A:, but only if you have no floppy drives.
See Defining an MS-DOS Device Name for information about how to do this in a program.
You can determine whether a drive letter maps to a floppy device by using QueryDosDevice on the drive letter. Floppy drives will return "\Device\Floppy0" or "\Device\Floppy1"
John Knoeller
2010-02-01 09:55:47
Note that the `\Device\Floppy<x>` names are not (always) used for USB floppy drives.
MSalters
2010-02-01 11:44:32
@MSalters: well, that's unfortunate. Thanks for the info.
John Knoeller
2010-02-01 19:09:52
See stephan's loink - it has the answer.
MSalters
2010-02-02 08:43:51
Presumably for a USB floppy drive `pDevDesc->BusType == BusTypeUsb` too.
MSalters
2010-02-02 08:43:31