How to enumerate all of the physical disks attached to the system in User Mode and without WMI ?
Note:
1) I am interested in all physical disks including harddisks and USB disks. Fixed and removable.
2) I am interested in enumerating disks that do not contain any partitions and file systems.
3) I am not interested in enumerating only disks with partitions or assigned drive letters.
4) I am not interested in enumerating partitions.
5) If somebody suggests trying all \\.\PhysicalDrive0, \\.\PhysicalDrive1, \\.\PhysicalDrive3, ..., \\.\PhysicalDriveX, please prove that all of the disks, that I am interested in, will always be named in that manner.
Below is an example how to do it in Kernel Mode, (but I prefer not to load any drivers to accomplish such simple task) :
Enumerating device objects representing disks and partitions
http://www.codeproject.com/KB/system/rawsectorio.aspxStart Free Trial