I have a filesystem minifilter driver which implements a set of distinct functionalities which I would like to be able to logically separate for development and support purposes. It would be desirable to provide our Support team with a mechanism to disable certain features but leave others enabled. The different features require the use of a different set of call-backs and the call-backs required for the features will partially overlap. As a simple example
Feature A needs IRP_MJ_CREATE, IRP_MJ_WRITE and IRP_MJ_CLOSE
Feature B needs IRP_MJ_CREATE, IRP_MJ_WRITE, IRP_MJ_READ and IRP_MJ_CLOSE
So my question is how to best achieve this separation of concerns?
- To split this functionality out into separate drivers would result in a possibly large number of drivers.
- Adding ad hoc code to the driver to control individual features would probably get messy.
- Assigning a set of dedicated call-backs to each particular feature would involve writing a framework to pass IRPs between the different callbacks (e.g. present an IRP_MJ_WRITE to Feature A's write callback then Feature B's write callback) in a similar way to the filter manager, which is reinventing the wheel.
Any advice on how best to go about this would be appreciated. Thanks,