How to list physical disks in Windows?
In order to obtain a list of "\\\\.\PhysicalDrive0"
available.
wmic is a very complete tool
wmic diskdrive list
provide a (too much) detailed list, for instance
for less info
wmic diskdrive list brief
Sebastian Godelet mentions in the comments:
In C:
system("wmic diskdrive list");
As commented, you can also call the WinAPI, but... as shown in "How to obtain data from WMI using a C Application?", this is quite complex (and generally done with C++, not C).
Or with PowerShell:
Get-WmiObject Win32_DiskDrive