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

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

    The obvious property to check would be IOCTL_DISK_GET_DRIVE_GEOMETRY. This gets you (amongst other things) a MEDIA_TYPE. Anything but RemovableMedia and FixedMedia is a floppy.

提交回复
热议问题