-----Original Message-----
From: Basil Thomas [mailto:xxxxx@iname.com]
Sent: Wednesday, June 21, 2000 12:40 PM
Hi Balan… plse look at the attached doc… it is from MSDN.
============================================================================
Physical Drive Number
If your application is trying to access the hard drives and the volumes in a
low-level way (as with virus scanners, for example), you’ll need to find the
physical drive number, and you are going to have to change the way you find
that number. In the past, you could use a symbolic link, which would return
something like this:
\Device\HarddiskX\PartitionY
Somewhere in there you’d be able to find that “Harddisk,” find the X after
it, and see that it was hard disk 2 or hard disk 3. Now, the symbolic link
is returning:
\Device\HarddiskVolumeZ
The physical drive number isn’t in that symbolic link anymore, anywhere. You
will need to use instead a couple of IOCTLs that are available. The first
one:
IOCTL_STORAGE_GET_DEVICE_NUMBER
works for a single drive number. For example, if the drive is a C drive,
that will work, or even if you have multiple partitions on a drive. But if
you have a multivolume set, you’ll need to use:
IOCTL_VOLUME_GET_VOLUME_DISK_EXTENTS
This has been true for Windows NT 4.0 as well; it’s always a little
dangerous to have found the physical drive number out of the symbolic
links-they would only tell you the first drive in what may be a multidrive
set.
==========================================================================
–BASIL