Volumes on a physical drive

Hi,

Does anyone know a method of discovering which volumes (specifically
drive letter associated volumes) are mounted on a particular physical
disk on W2K/XP?

The disk manager achieves this, so it would seem that it is possible,
but I can’t seem to find an obvious way to do it.

Any clues (either application level or driver level) would be
appreciated.

Shaun

Hi,

GetLogicalDriveStrings API -
Fills a buffer with strings that specify valid drives in the system.
and IOCTL_DISK_GET_DRIVE_LAYOUT retrieves information about the number of
partitions on a disk and the features of each partition.could be useful for
you in usermode.

Hope this helps…
Regards…
Subodh Radheshyam Gupta

----- Original Message -----
From: “Shaun”
To: “NT Developers Interest List”
Sent: Wednesday, April 23, 2003 7:14 PM
Subject: [ntdev] Volumes on a physical drive

> Hi,
>
> Does anyone know a method of discovering which volumes (specifically
> drive letter associated volumes) are mounted on a particular physical
> disk on W2K/XP?
>
> The disk manager achieves this, so it would seem that it is possible,
> but I can’t seem to find an obvious way to do it.
>
> Any clues (either application level or driver level) would be
> appreciated.
>
>
>
> Shaun
>
>
>
> —
> You are currently subscribed to ntdev as: xxxxx@softhome.net
> To unsubscribe send a blank email to xxxxx@lists.osr.com

I assume that Disk Manager uses IOCTL_DISK_GET_DRIVE_LAYOUT_EX to get a list
of partitions per physical disk. The Hardware SDK states that it’s available
in XP and above. Windows DDK description for PARTITION_INFORMATION implies
that it might be available on W2K. Afterwards, FindFirstVolumeMountPoint can
be used.

Hope this helps.
Joze

----- Original Message -----
From: “Shaun”
To: “NT Developers Interest List”
Sent: Wednesday, April 23, 2003 7:14 PM
Subject: [ntdev] Volumes on a physical drive

> Hi,
>
> Does anyone know a method of discovering which volumes (specifically
> drive letter associated volumes) are mounted on a particular physical
> disk on W2K/XP?
>
> The disk manager achieves this, so it would seem that it is possible,
> but I can’t seem to find an obvious way to do it.
>
> Any clues (either application level or driver level) would be
> appreciated.
>
>
>
> Shaun
>
>
>
> —
> You are currently subscribed to ntdev as: xxxxx@softhome.net
> To unsubscribe send a blank email to xxxxx@lists.osr.com


You are currently subscribed to ntdev as: xxxxx@hermes.si
To unsubscribe send a blank email to xxxxx@lists.osr.com

I’m not so interested in the layout as which volumes are hosted on
which physical drives. For instance I want to know which drive letters
are mounted on physical disk 0.

I have been looking in the object directory (using OBJDIR), and I
see that the \Device\HardDisk0 directory contains a symbolic link to
\Device\HardDiskVolume1 (as \Device\HardDisk0\Partition1). Looking in
DosDevices (aka Global?? on XP) I see that drive C: is also a
symbolic link to \Device\HardDiskVolume1.

So, I think that I can use this to build a list of drive letters on
each physical disk. Is this the only method to achieve this?

The disk manager uses a DLL called DMDSKMGR that seems to export a COM
object with lots of useful functions to do this sort of thing, but I
haven’t yet found any documentation on it.

Shaun

Wednesday, April 23, 2003, 4:07:21 PM, you wrote:

JF> I assume that Disk Manager uses IOCTL_DISK_GET_DRIVE_LAYOUT_EX to get a list
JF> of partitions per physical disk. The Hardware SDK states that it’s available
JF> in XP and above. Windows DDK description for PARTITION_INFORMATION implies
JF> that it might be available on W2K. Afterwards, FindFirstVolumeMountPoint can
JF> be used.

JF> Hope this helps.
JF> Joze

JF> ----- Original Message -----
JF> From: “Shaun”
JF> To: “NT Developers Interest List”
JF> Sent: Wednesday, April 23, 2003 7:14 PM
JF> Subject: [ntdev] Volumes on a physical drive

>> Hi,
>>
>> Does anyone know a method of discovering which volumes (specifically
>> drive letter associated volumes) are mounted on a particular physical
>> disk on W2K/XP?
>>
>> The disk manager achieves this, so it would seem that it is possible,
>> but I can’t seem to find an obvious way to do it.
>>
>> Any clues (either application level or driver level) would be
>> appreciated.
>>
>>
>>
>> Shaun
>>
>>
>>
>> —
>> You are currently subscribed to ntdev as: xxxxx@softhome.net
>> To unsubscribe send a blank email to xxxxx@lists.osr.com

JF> —
JF> You are currently subscribed to ntdev as: xxxxx@hermes.si
JF> To unsubscribe send a blank email to xxxxx@lists.osr.com

JF> —
JF> You are currently subscribed to ntdev as: xxxxx@sdlabs.net
JF> To unsubscribe send a blank email to xxxxx@lists.osr.com

I guess you can use QueryDosDevice() for this purpose. On my machine, when I
used this for drive C:, it returned \Device\HarddiskVolume1.

Good luck,
Tri

-----Original Message-----
From: Shaun [mailto:xxxxx@sdlabs.net]
Sent: Wednesday, April 23, 2003 11:35 AM
To: NT Developers Interest List
Subject: [ntdev] Re: Volumes on a physical drive

I’m not so interested in the layout as which volumes are hosted on
which physical drives. For instance I want to know which drive letters
are mounted on physical disk 0.

I have been looking in the object directory (using OBJDIR), and I
see that the \Device\HardDisk0 directory contains a symbolic link to
\Device\HardDiskVolume1 (as \Device\HardDisk0\Partition1). Looking in
DosDevices (aka Global?? on XP) I see that drive C: is also a
symbolic link to \Device\HardDiskVolume1.

So, I think that I can use this to build a list of drive letters on
each physical disk. Is this the only method to achieve this?

The disk manager uses a DLL called DMDSKMGR that seems to export a COM
object with lots of useful functions to do this sort of thing, but I
haven’t yet found any documentation on it.

Shaun

Wednesday, April 23, 2003, 4:07:21 PM, you wrote:

JF> I assume that Disk Manager uses IOCTL_DISK_GET_DRIVE_LAYOUT_EX to get a
list
JF> of partitions per physical disk. The Hardware SDK states that it’s
available
JF> in XP and above. Windows DDK description for PARTITION_INFORMATION
implies
JF> that it might be available on W2K. Afterwards, FindFirstVolumeMountPoint
can
JF> be used.

JF> Hope this helps.
JF> Joze

JF> ----- Original Message -----
JF> From: “Shaun”
JF> To: “NT Developers Interest List”
JF> Sent: Wednesday, April 23, 2003 7:14 PM
JF> Subject: [ntdev] Volumes on a physical drive

>> Hi,
>>
>> Does anyone know a method of discovering which volumes (specifically
>> drive letter associated volumes) are mounted on a particular physical
>> disk on W2K/XP?
>>
>> The disk manager achieves this, so it would seem that it is possible,
>> but I can’t seem to find an obvious way to do it.
>>
>> Any clues (either application level or driver level) would be
>> appreciated.
>>
>>
>>
>> Shaun
>>
>>
>>
>> —
>> You are currently subscribed to ntdev as: xxxxx@softhome.net
>> To unsubscribe send a blank email to xxxxx@lists.osr.com

JF> —
JF> You are currently subscribed to ntdev as: xxxxx@hermes.si
JF> To unsubscribe send a blank email to xxxxx@lists.osr.com

JF> —
JF> You are currently subscribed to ntdev as: xxxxx@sdlabs.net
JF> To unsubscribe send a blank email to xxxxx@lists.osr.com


You are currently subscribed to ntdev as: xxxxx@unisys.com
To unsubscribe send a blank email to xxxxx@lists.osr.com