List all physical hard drives showing manufacturer, model etc
Posted on 2009-02-13
Can someone supply me with a unit for Delphi 5 with a function and procedure to return as much as possible of the information listed below, for each physical hard drive?
1) Need only work on Win2K upwards
2) Must work on both IDE and SATA drives
3) Since some external USB hard drives show up in Disk Management as a Fixed drive, it would be nice to get info on their internal hard drives as well. However, due to USB limitations, I suspect it won't be possible. In that case internal hard drives only would be fine.
Function GetMaxHardDriveCount: integer
Procedure GetPhysicalDriveInfo(DriveNum, var [the return variables]: boolean
INFO TO BE RETURNED
1) The total number of fixed physical hard drives (USB if possible)
2) The drive manufacturers name
3) The drives model number
4) The drives firmware revision [desirable but not essential]
5) The interface type (e.g. AT, SATA, USB) [desirable but not essential]
6) The size of the drive
7) The unused space on the drive (or alternatively used space)
Any appropriate comments in the code would be appreciated.
Thanks for your help!