Lrgacy Filter context support

What are the different methods of attaching my own Context to a FILE_OBJECT between the duration of the Create and Cleanup?

However, the file system under my filter does not support Advanced FCB Header? So I can’t use the FsRtl*Context* functions.

Thanks,
Vance

xxxxx@hotmail.com wrote:

What are the different methods of attaching my own Context to a FILE_OBJECT between the duration of the Create and Cleanup?

However, the file system under my filter does not support Advanced FCB Header? So I can’t use the FsRtl*Context* functions.

The ‘easiest’ way is to build your own tree indexed on the
FileObject->FsContext value. Then look up your context in this tree for
the given context. Of course the complicated issue here is the reference
counting. As well, indexing on the FsContext will give the equivalent of
stream contexts where as if you index on the FileObject value it will
give the equivalent of file handle contexts. They both have their little
headaches in reference counting but look at the IFS FAQ for more on this.

Pete


Kernel Drivers
Windows File System and Device Driver Consulting
www.KernelDrivers.com
866.263.9295

Thank you, wanted to make sure there isn’t something already there before writing it :slight_smile: