drdt3
asked on
D:\ -> \\.\PHYSICALDRIVE0 or 1 ?
I need to know how I can get the physical drive number (winNT) that belongs to a specified logical volume drive.
E.g.
Does "D:\" belong to "\\.\PHYSICALDRIVE0" or to "\\.\PHYSICALDRIVE1"?
There must be an API somewhere.
Thanx for your help!!
E.g.
Does "D:\" belong to "\\.\PHYSICALDRIVE0" or to "\\.\PHYSICALDRIVE1"?
There must be an API somewhere.
Thanx for your help!!
look in the registry
Try DeviceIoControl functions IOCTL_DISK_GET_DRIVE_GEOME TRY,
IOCTL_DISK_GET_DRIVE_LAYOU T,IOCTL_DI SK_GET_PAR TITION_INF O.
IOCTL_DISK_GET_DRIVE_LAYOU
Look at this URL.... http://www.codeguru.com/atl/atlcontain.shtml
The implementation of DeviceIoControl to get the physical drive number is in SystemHDisk project of the source code..
The file name is HDiskInformation.cpp.
The implementation of DeviceIoControl to get the physical drive number is in SystemHDisk project of the source code..
The file name is HDiskInformation.cpp.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Hi jkr!
Thank you. But what is with NT5 (NT2000)? Sysinternals tells there is nothing the same.
Thank you. But what is with NT5 (NT2000)? Sysinternals tells there is nothing the same.
Hmm, sysinternals tells that the registry key is kept for backward compatibility, only the fault tolerance information is stored on the medium directly. From my experience with MS OSs, these 'backward compatibility' issues are kept quite a while (IMHO until Win2005 ;-)