Thank you but what I need is physical drives not partitions and all the above are dealing with partitions.
I mean, user may have three HDDs mounted with a total of ten partitions. I need to detect three physical drives, total capacity of each of them, then match the partitions to their respective physical drives in order to determine total free space on each physical drive from their respective cumulated partitions.
In fact all I need is the largest physical drive with the lowest free space.
There may additionally be a problem with removable USB drives if somehow cache writing is enabled for them. But that is something that will have to wait, for now.
I've been looking at vwin32 and various VWIN32_DIOC_DOS_* parameters but haven't found a solution yet. Still working on it though.
Any idea why the SetupDi* APis fail under 9x?