I’m developing a minifilter driver that redirects file access on one drive to a folder on another drive. For example, each access to E:\file will be redirected to C:\redirection\file_guid.
I started with the SimRep Microsoft sample, but after reading around, to the best of my understanding, the newer and more robust way is to use FltAddOpenReparseEntry.
Unfortunately, there are no usage samples at all. The best I could find is this partial example:
Could anyone please share a more complete example, or some explanation of how it’s supposed to work? For example, what should be done in PostCreate? My best guess is that I should use FltCreateFileEx2 manually, and then replace Data->Iopb->TargetFileObject, but I’m really not sure about it, I saw only one sample replacing TargetFileObject and it was in pre create.
Any help is appreciated, and sorry if that’s a native question, I don’t have much experience in kernel development.
If you’re really just completing requests with STATUS_REPARSE then SimRep is the way to go. This simulates the usage of a symlink related reparse point without actually using one.
The OpenReparseEntry stuff is for a different use case of reparse points where you’re using them to store per-file metadata used by the driver (e.g. the way the Cloud Filter uses them).
Thank you, yes, I figured that out at some point after squeezing the info out of the scarce information sources and some guesswork. I wish there was more info about these topics, and/or code samples.