Programmatically differentiating between USB Floppy Drive and USB Flash Drive in Windows

前端 未结 4 1332
故里飘歌
故里飘歌 2020-12-19 06:05

On Windows (XP-7), is there a reliable way of programatically differentiating between USB floppy drives and USB flash drives in C++?

At the moment, I\'m using WMI to

4条回答
  •  爱一瞬间的悲伤
    2020-12-19 06:12

    On the USB level, there is no way to differentiate between a conventional Disk on Key and a USB-Floppy. Which means windows itself, cannot tell reliably what is what.

    There are a few hints that you can gather: Floppies should: a. Have mass-storage protocol CBI/CB b. SCSI UFI

    BUT, in the world of USB devices, everyone does whatever they want. The only test is: "Does it work on windows". And Windows just checks the size, if its a USB device with removable-media set and with conventional floppy sizes, it will consider it to be a floppy.

    Can't say about "real" floppy, but with the USB attached, there is no definite way.

提交回复
热议问题