How can I get the physical size of all hard disks on the current computer using C++ / Qt framework on Windows? Just to be clear, if I have a 640 GB HDD, I want to the application to show 640 GB, not 596 GB of available space.
I know that Qt probably doesn't have a function I could use, because it has to be platform-specific, so I guess in this case something from the Win32 API. Unfortunately I can't use GetDiskFreeSpaceEx(), because I would only get the free/available disk space. I've read about using WMI, but I can't seem to find any usable code examples for this purpose.