Attaching FILE SYSTEM FILTER driver object to underlying target object
-
My question is regarding "file system filter" drivers. I'm especially stressing on 'file system' word 'coz on msdn I learnt that file system filter drivers are different from other filters that they don't use 'AddDevice'. Now the problem is while attaching filter driver with underlying driver stack. We can still use IoAttachDeviceToDeviceStack() to attach our driver but it takes argument as
IN PDEVICE_OBJECT TargetDevice
If AddDevice would have been implemented, this parameter can be obtained from
IN PDEVICE_OBJECT PhysicalDeviceObject
parameter that we get in AddDevice(). But this way is closed for file system filter drivers. There is another alternative to call IoGetDeviceObjectPointer() and passing it the desired driver's object name. But how to find desired driver's name? And I want to add my filter to overall filesystem. Thus my qeustion is ... Q. How to obtain TargetDevice without calling IoGetDeviceObjectPointer? And if there is no other alternative, how to obtain desired driver's object name? I'll be grateful to you for the answer. Thanks.