Generic Device Object questions

I think I am missing a couple of things regarding the device object stack(s). Would someone kindly fill in the following:

1- What are the various kinds of device objects [eg, physical media, raw, mounted volume, filesys, etc] and how are they connected to each other. Which objects are likely used by the various file systems [Fat, Ntfs, Cdfs]. Are floppy and hard disks linked different ways, or contain different objects?

2- The term device “stack” is used frequently. Is there only one stack for a filesys thru physical media, or is there one stack for filesys and one for physical media?

3- Does Vpb.DeviceObject point to the filesys devobj or to an unnamed mounted volume devobj. And, are the two in fact different?

4- For IoGetDeviceObjectPointer( ), the MSDN states that it “establishes a connection between the caller and the next lower level driver”. My understanding is that this function can be used to get the address of any named device, and no “connection” is in fact established by virtue of the call. Is the MSDN correct?

5- What devobj in particular is returned by GetRelatedDeviceObject( )? Is it always the top-most object?

6- How is the devobj returned by IoGetDeviceObjectPointer( ) related to that returned by IoGetRelatedDeviceObject( )?

7- Exactly what does the [undocumented?] function IoGetBaseFileSystemDeviceObject( ) return, and how does it differ from what IoGetRelatedDeviceObject( ) return?

Thank you for your help. It is very comforting to know that there is a community one can turn to for help with a very difficult subject matter.

>5- What devobj in particular is returned by GetRelatedDeviceObject( )? Is
it

always the top-most object?

Yes. This is the device object to which NtRead/WriteFile will send IRPs.

7- Exactly what does the [undocumented?] function
IoGetBaseFileSystemDeviceObject( ) return, and how does it differ from what
IoGetRelatedDeviceObject( ) return?

It does not follow the attachment chain.

IoGetRelatedDeviceObject( ) is conceptually
oGetBaseFileSystemDeviceObject( ) followed by IoGetAttachedDevice( ).

Max

Thanks for your help, Maxim. I appreciate it.
-----Original Message-----
From: Maxim S. Shatskih
To: File Systems Developers
Date: Monday, August 28, 2000 12:48 AM
Subject: [ntfsd] Re: Generic Device Object questions

>>5- What devobj in particular is returned by GetRelatedDeviceObject( )? Is
>it
>>always the top-most object?
>
>Yes. This is the device object to which NtRead/WriteFile will send IRPs.
>
>>7- Exactly what does the [undocumented?] function
>>IoGetBaseFileSystemDeviceObject( ) return, and how does it differ from
what
>>IoGetRelatedDeviceObject( ) return?
>
>It does not follow the attachment chain.
>
>IoGetRelatedDeviceObject( ) is conceptually
>oGetBaseFileSystemDeviceObject( ) followed by IoGetAttachedDevice( ).
>
> Max
>
>
>—
>You are currently subscribed to ntfsd as: xxxxx@erols.com
>To unsubscribe send a blank email to $subst(‘Email.Unsub’)
>