I am using the delete minifilter example from msdn as a base: http://code.msdn.microsoft.com/windowshardware/Delete-File-System-b904651d
What I need to accomplish is:
- Getting a handle to a delete candidate in the DfPreCleanupCallback.
- In DfPostCleanupCallback - determining that the file should have been deleted if it wasn't for the handle acquired.
- Also in the DfPostCleanupCallback - Doing some operations on the file that would have been deleted and releasing the handle. Also assuring deletion the next time it enters IRP_MJ_CLEANUP to avoid infinite loop.
I have a very vague understanding of minifilters and the filter manager, so I would like to know if this is even possible in principle before I delve deeper into the minifilter world.
short version - I need a way to determine a file will be deleted without a doubt and do some operations on that file.