Pending IO in PreOperation Callback<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

 

FltCompletePendedPreOperation()
Must call this to restart processing of IO pended in the preOperation callback
Filter may:
Complete operation
Request postOperation callback through the FLT_PREOP_CALLBACK_STATUS parameter
Typically called from a worker thread

 

FltQueueDeferredIoWorkItem()
Queue operation to worker thread for continued processing
Can fail if this operation is not safe to post – i.e., this is paging IO or top-level IRP is already set on this thread
Can fail if this Instance is in the process of being torndown

 

 

 

 

Pending IO in PostOperation Callback
FltDoCompletionProcessingWhenSafe()
Can fail if it is not safe to post
Not safe to post Paging IO’s
Synchronize operation if you cannot handle this failure
Tells filter the appropriate postOperation callback status to return
Will only post operation if currently at DPC IRQL
Will continue completion processing when WorkerRoutine has completed

 

 

FltQueueDeferredIoWorkItem()
Works just like in preOperation
Will always queue work to worker thread if it is safe to do so
If successfully queues work, return FLT_POSTOP_MORE_PROCESSING_REQUIRED
FltCompletePendedPostOperation()
Must call this to restart processing of IO pended in the postOperation callback