I need to send a internal IRP from mini filter driver to my volume filter driver sitting above volsnap.
I need to get the FltObjects->FileObject->Vpb->Realdevice device object from my file system mini filter driver.
when I tried accessing this pointer my system crashed. Later on I discovered that my
FltObjects->FileObject is always NULL.
In which cases this file object will be NULL.I am trying to access FileObject in my Precallback routine which I have registered for IRP_MJ_MOUNT_VOLUME.
Is there a way to get the volume filter driver's device object from mini filter driver.
I used FltGetDeviceObject and IoGetAttachedDevice in sequence thinking that it is the other way to get Vpb->Realdevice.
But when I used FltGetDeviceObject and IoGetAttachedDevice function the device object that I get doesn't match any object in deviceTree.
I am not sure what objects I getting when I use these functions
FltGetDeviceObject and IoGetAttachedDevice.
Any inputs on this would be helpful