As we know, the Windows API QueryDosDevice() can get the physical
device name of a partition or volume in a basic disk. But it doesn't
work if the volume is a dynamic volume in a dynamic disk.(Actually,
the API will return a fake name.)

For example, there are 2 disks in my computer, one is a basic disk
and another is a dynamic disk. The basic disk has 2 volumes, with
drive letter C: and D:, and the dynamic disk also has 2 volumes
(dynamic volumes), with drive letter E: and F:.

Get the physical device names of those volumes by API QueryDosDevice():
C: - \Device\HarddiskVolume1
D: - \Device\HarddiskVolume2
E: - \Device\HarddiskDmVolumes\MybondDg0\Volume1
F: - \Device\HarddiskDmVolumes\MybondDg0\Volume2
(Note: the string "mybond" is the specified personal name when i
installed the OS, which is Windows 2000 Professional with SP4.)

Then, I use a filter driver, which is built on sfilter in Windows IFS Kit,
to catch the IRP_MJ_CREATE IRPs when accessing those volumes, and get
those volumes's physical device names like following:
C: - \Device\HarddiskVolume1
D: - \Device\HarddiskVolume2
E: - \Device\HarddiskDmVolumes\PhysicalDmVolumes\BlockVolume1
F: - \Device\HarddiskDmVolumes\PhysicalDmVolumes\BlockVolume2

Comparing the above two different names, we can find out that
QueryDosDevice() couldn't get the true physical device name of a
dynamic volume. So, how can I get the true name like:
\Device\HarddiskDmVolumes\PhysicalDmVolumes\BlockVolume1
not
\Device\HarddiskDmVolumes\MybondDg0\Volume1?

Thank you so much!


--
Regards
Mike

Re: How to get the physical device name of dynamic volume in dynamic disk? by Carl

Carl
Tue Jul 26 23:47:38 CDT 2005

Peng Hailin wrote:
> As we know, the Windows API QueryDosDevice() can get the physical
> device name of a partition or volume in a basic disk. But it doesn't
> work if the volume is a dynamic volume in a dynamic disk.(Actually,
> the API will return a fake name.)

[snipped lots of details]

I'd suggest posting this on

microsoft.public.win32.programmer.kernel

-cd



Re: How to get the physical device name of dynamic volume in dynamic disk? by Peng

Peng
Wed Jul 27 00:59:00 CDT 2005

Thank you!


>
> I'd suggest posting this on
>
> microsoft.public.win32.programmer.kernel
>
> -cd
>
>