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

前端 未结 4 1331
故里飘歌
故里飘歌 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:26

    Did you try Win32_LogicalDisk.MediaType? It has specific enumerations for floppy disks. Make sure you try it when there's no disk in the drive.

提交回复
热议问题