Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Device ID to drive letter?

18 views
Skip to first unread message

Lynn McGuire

unread,
Oct 4, 2002, 11:52:43 AM10/4/02
to
> How do I go from a device name like "WCD WD1200" or a device ID like
> "IDE\WDC_WD1200JB______16.6V16\4457..." to finding what volumes and
> partitions are in these disks? I want to be able to relate a stripped XP
> volume with a drive letter and the two or more drives it spans, something
> like the ControlPanel Disk Management app. This only has to work in W2K or
> XP.

You can start with DiskId32 at http://www.winsim.com/diskid32/diskid32.html

Then you need something to read the partition table ?

Lynn


Ralf Buschmann

unread,
Oct 4, 2002, 2:05:40 PM10/4/02
to
On Wed, 02 Oct 2002 20:34:40 GMT, "Steve" <nos...@attbi.com> wrote:

>How do I go from a device name like "WCD WD1200" or a device ID like
>"IDE\WDC_WD1200JB______16.6V16\4457..." to finding what volumes and
>partitions are in these disks? I want to be able to relate a stripped XP
>volume with a drive letter and the two or more drives it spans, something
>like the ControlPanel Disk Management app. This only has to work in W2K or
>XP.

Open a handle to the volume and send a
IOCTL_VOLUME_GET_VOLUME_DISK_EXTENTS via DeviceIoControl(). This IOCTL
does work in W2K, although the PSDK says XP. Note you can relate the
VolumeDiskExtents->Extent[x].DiskNumber to the enumeration index of the
physical disk in SetupDiEnumDeviceInfo. That is, say your "WDC WD1200"
disk device has member index 1 in the SetupDiEnumDeviceInfo()
enumeration, then VolumeDiskExtents->Extent[x].DiskNumber == 1 tells you
that the volume (or one of it's extents) is located on the disk you are
examining. You can proceed from there.

Ralf.

Steve

unread,
Oct 4, 2002, 5:53:50 PM10/4/02
to
Thanks, I'll try that out.

Steve

"Ralf Buschmann" <ra...@backmagic.de> wrote in message
news:#4UZnB9aCHA.1936@tkmsftngp11...

0 new messages