Re: *Re: Volumes on a physical drive

see IOCTL_VOLUME_GET_VOLUME_DISK_EXTENTS

Else

“Phung, Tri T”
To: “NT Developers Interest List”
Sent by: cc:
xxxxx@lis Subject: *[ntdev] Re: Volumes on a physical drive
ts.osr.com

23.04.2003 18:38
Please respond to “NT
Developers Interest
List”

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


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

Check out DiskView on www.osr.com. I believe that it does what you want to
do. A recent NT Insider article describes the functions that DiskView
uses to determine the information that it displays.

–Mark


Mark Cariddi
Consulting Associate
OSR, Open Systems Resources, Inc.
http://www.osr.com/
“Shaun” wrote in message news:xxxxx@ntdev…
>
> 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
>
>
>
>