I want to get a list of physical storage devices.
I’ve seen some code but that actually loops and does something like brute force.
I want to know what is the general way of getting the list of physical storage disks.
I’ve found CreateFile(). But I cannot understand how to use it properly. I need a non-wmi solution. and it’s better if it doesn’t query registry.
I’ve used the following code, that enumerates all the volumes and then looks for their corresponding physical drives: