About AddDevice() of disk filter driver.

I wrote a disk filter driver, and add it to the registry.

1.If my upperfilters’s key value in registry = “myfilter VolSnap”(VolSnap is
system’s disk filter driver)
My disk filter driver works ok.

2.If the key value = “VolSnap myfilter”, my disk filter driver worsk wrong.
And the error is occur at AddDevice() routine. IoAttachDeviceToDeviceStack()
seems get the wrong PDO. Because I save some information at the registry. I
use IoOpenDeviceRegistryKey() function, it return
STATUS_INVALID_DEVICE_REQUEST, It possibly indicates that the PDO that I get
at the AddDevice() routine used IoAttachDeviceToDeviceStack() is not a valid
PDO.

I want some help for:

  1. How I know whether the PDO is the one I want at the AddDevice? How to
    check that I attach the correct device object?
  2. How can I get the device name through the PDO(are there any AP can get
    the device name through device object)?

Thanks.

VolSnap is upper filter fot ftdisk - volume manager. Are you writing upper
filter for volume manager or for disk.sys?If it’s for disk class you should
add to different location in registry -GUID
{4D36E967-E325-11CE-BFC1-08002BE10318} where you should propably find
partmgr.
the order in register key is also important.
use device tree to explore PDO.
are you shure the device you want to attach to has name?

On 7/11/06, Sun Jiajie wrote:
>
> I wrote a disk filter driver, and add it to the registry.
>
> 1.If my upperfilters’s key value in registry = “myfilter VolSnap”(VolSnap
> is
> system’s disk filter driver)
> My disk filter driver works ok.
>
> 2.If the key value = “VolSnap myfilter”, my disk filter driver worsk
> wrong.
> And the error is occur at AddDevice() routine.
> IoAttachDeviceToDeviceStack()
> seems get the wrong PDO. Because I save some information at the registry.
> I
> use IoOpenDeviceRegistryKey() function, it return
> STATUS_INVALID_DEVICE_REQUEST, It possibly indicates that the PDO that I
> get
> at the AddDevice() routine used IoAttachDeviceToDeviceStack() is not a
> valid
> PDO.
>
> I want some help for:
> 1. How I know whether the PDO is the one I want at the AddDevice? How to
> check that I attach the correct device object?
> 2. How can I get the device name through the PDO(are there any AP can get
> the device name through device object)?
>
> Thanks.
>
>
>
> —
> Questions? First check the IFS FAQ at
> https://www.osronline.com/article.cfm?id=17
>
> You are currently subscribed to ntfsd as: xxxxx@gmail.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>

> VolSnap is upper filter fot ftdisk - volume manager.

In 2003, VolSnap is a functional driver for volume stacks.

Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com