FltEnlistInTransaction is a filter manager function that file system mini-filters can use in Vista+ platforms to subscribe to relevant transaction notifications. It is declared in fltkernel.h as follows
The idea is when a transaction is committed for example, mini-filter transaction callback is called with all event details and whatever processing is appropriate for the filter is done at that point. Mini-filters register for transaction callbacks just like regular callbacks by calling FltRegisterFilter.
Note that the documentation for FltEnlistInTransaction mentions four flags in NotificationMask parameter – TRANSACTION_NOTIFY_COMMIT, TRANSACTION_NOTIFY_PREPARE, TRANSACTION_NOTIFY_PREPREPARE and TRANSACTION_NOTIFY_ROLLBACK. The fifth flag FLT_MAX_TRANSACTION_NOTIFICATIONS is simply a combination of all of the four flags.
But if you take a look at WDK header ktmtypes.h where these constants are declared, it is a whole different world. There are 27 TRANSACTION_NOTIFY_XXX constants defined in there with one of them TRANSACTION_NOTIFY_COMMIT_FINALIZE having the following comment next to it –
Note that this flag is not included in the TRANSACTION_NOTIFY_MASK. The reason being that KTM does not understand this flag yet. This flag is strictly for the use of filter manager. In fact we mask it out before enlisting in any transaction.
- 1 2