PFLT_CONTEXT_CLEANUP_CALLBACK callback function (fltkernel.h)
A minifilter driver can register a routine of type PFLT_CONTEXT_CLEANUP_CALLBACK as the minifilter driver's ContextCleanupCallback routine.
[in] PFLT_CONTEXT Context,
[in] FLT_CONTEXT_TYPE ContextType
A pointer to the minifilter driver's portion of the context.
The type of context. Must be one of the following values:
FLT_FILE_CONTEXT (starting with Windows Vista)
FLT_SECTION_CONTEXT (starting with Windows 8)
FLT_TRANSACTION_CONTEXT (starting with Windows Vista)
A minifilter driver can optionally specify a routine of type PFLT_CONTEXT_CLEANUP_CALLBACK as the minifilter driver's ContextCleanupCallback routine for each context type that it registers when it calls FltRegisterFilter from its DriverEntry routine. To specify this routine, the minifilter driver stores a pointer to the routine in the ContextCleanupCallback member of the FLT_CONTEXT_REGISTRATION structure for the context type.
If the minifilter driver specifies a ContextCleanupCallback routine for a context type, the filter manager calls this routine before freeing any of the minifilter driver's contexts of that type. In this routine, the minifilter driver performs any needed cleanup, such as freeing additional memory that the minifilter driver allocated inside the context structure. After the ContextCleanupCallback routine returns, the filter manager frees the context.
For more information about context registration, see the reference entry for FLT_CONTEXT_REGISTRATION.
|fltkernel.h (include Fltkernel.h)