1

I want to get information about all types of drives in the system: Hard Drives, USB Drives, Disk Drives, Diskette Drives.

About each I want to know: size, free space, file system and whether it is real or emulated.

Hard Drives: internal or external.

user1581390
  • 1,900
  • 5
  • 25
  • 38
  • For emulated/virtual drive detection, you'll have to use Setup API to get it's disk controller. Most emulated/virtual drives don't have a disk controller, and for those which do, the controllers have no hardware interrupt, port and/or memory mapped ports. – Jay Aug 10 '12 at 13:02

2 Answers2

1

Short answer WMI Windows Management Instrumentation. Search for it. It will tell more info than you ever wanted to know.

Or you can refer to GetLogicalDrives() : Listing physical drives installed on my computer

Community
  • 1
  • 1
Preet Sangha
  • 64,563
  • 18
  • 145
  • 216
  • I don't want this to be too complicated, so I used GetLogicalDrives to get the letters of the drives. But how do I get the type of drive and how much free space is available? – user1581390 Aug 10 '12 at 15:49
  • GetDriveType() can tell you the type of drive, and GetDiskFreeSpaceEx() the space on the drive. – Jonathan Potter Aug 11 '12 at 02:49
0

We're developing this API that will eventually allows you to communicate with storage devices. It's open source and you can see the current code for some information. Check back for more features: https://github.com/virtium/vtStor

phandinhlan
  • 583
  • 1
  • 5
  • 16