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

disk partition device object

59 views
Skip to first unread message

Jamey Kirby

unread,
Jan 18, 1999, 3:00:00 AM1/18/99
to
I do not quite understand your problem/question.

If you get the pointer to \device\harddisk(n)\partition(n) using
IoGetDeviceObjectPointer(), you will get a pointer to the partitions device
object. If you want the physical disk device object, you need to get the
pointer to \device\harddisk(n)\partition0.

Is there a possibility that a filter driver is loaded over the partition
device object?

Jamey

Stan Miller wrote in message <36A3E06C...@worldnet.att.net>...
>I am trying to dynamically find the device object for a disk drive
>partition (e.g., \Device\Harddisk0\Partition1). If I use
>IoGetDeviceObjectPointer, I seem to be given back the pointer to the
>logical volume device object, not the actual disk drive partition (real
>device) device object.
>
>Can someone point me to a technique to secure the disk partition device
>object?
>
>Many thanks in advance.
>
>Stan Miller
>
>stan-...@worldnet.att.net

Stan Miller

unread,
Jan 19, 1999, 3:00:00 AM1/19/99
to

Stan Miller

unread,
Jan 19, 1999, 3:00:00 AM1/19/99
to
Jamey,

I'm sorry if I was not clear, and please correct me if I am wrong in
what I think I am seeing.

I am using osr's Device Tree tool and looking at the various drivers and
their device objects. I see the "Disk" driver and a device object for
each of the partitions on my hard disk (\Device\Harddisk0\Partition0,
\Device\Harddisk0\Partition1, \Device\Harddisk0\Partition2, etc.). These
device objects seem to represent the "real devices" (i.e., the
partitions) on the disk (including partition0).

I also see the "Fastfat" and "Ntfs" file system drivers with an unnamed
device object for each of the disk partitions which currently has a
mounted logical volume. I am assuming that these are the device objects
representing the mounts.

When I look at the vpb information in a partition device object (i.e.,
from the "Disk" driver), I see the "real device object" address matches
the device object address for the partition, and the "device object"
address matches the address of what I assumed above is the mounted
logical volume device object.

Now, when I call IoGetDeviceObjectPointer, I get back the address of
(what I have assumed above is) the mounted logical volume device object,
not the address of the partition device object. I want the address of
the partition device object.

I hope this helps.

Thanks.

stan-...@worldnet.att.net


Jamey Kirby wrote:
>
> I do not quite understand your problem/question.
>
> If you get the pointer to \device\harddisk(n)\partition(n) using
> IoGetDeviceObjectPointer(), you will get a pointer to the partitions device
> object. If you want the physical disk device object, you need to get the
> pointer to \device\harddisk(n)\partition0.
>
> Is there a possibility that a filter driver is loaded over the partition
> device object?
>
> Jamey
>
> Stan Miller wrote in message <36A3E06C...@worldnet.att.net>...

Jamey Kirby

unread,
Jan 19, 1999, 3:00:00 AM1/19/99
to
Then you are not hooking the disk driver early enough. You must load you
driver at boot time and hook the partition before the file systems take
over. Otherwise, there is NO way to hook a disk device after the file system
has been monted. See the DISKPERF example to see how hooking the disk device
at boot time works and how to get in early enough to not see the file
system.

Jamey

Stan Miller wrote in message <36A48A27...@worldnet.att.net>...

Stan Miller

unread,
Jan 19, 1999, 3:00:00 AM1/19/99
to
Jamey,

Got it! Thanks!

stan-...@worldnet.att.net

0 new messages