Export (0) Print
Expand All
Expand Minimize
This topic has not yet been rated - Rate this topic

FltSetCancelCompletion routine

A minifilter driver calls FltSetCancelCompletion to specify a cancel routine to be called if a given I/O operation is canceled.

Syntax


NTSTATUS FltSetCancelCompletion(
  _In_  PFLT_CALLBACK_DATA CallbackData,
  _In_  PFLT_COMPLETE_CANCELED_CALLBACK CanceledCallback
);

Parameters

CallbackData [in]

Pointer to the callback data (FLT_CALLBACK_DATA) structure for the I/O operation. The operation must be an IRP-based I/O operation and must not be a paging I/O operation. To determine whether a given callback data structure represents an IRP-based I/O operation, use the FLT_IS_IRP_OPERATION macro. This parameter is required and cannot be NULL.

CanceledCallback [in]

Pointer to a caller-supplied cancel routine. The Filter Manager calls this routine if the I/O operation represented by CallbackData is canceled.

This routine is declared as follows:


typedef VOID
(*PFLT_COMPLETE_CANCELED_CALLBACK) (
      IN PFLT_CALLBACK_DATA CallbackData
      );

CallbackData

Pointer to the FLT_CALLBACK_DATA structure for the I/O operation.

Return value

FltSetCancelCompletion returns STATUS_SUCCESS or an appropriate NTSTATUS value.

Remarks

FltSetCancelCompletion specifies a cancel routine for an IRP-based I/O operation that is to be posted to a work queue.

Minifilter drivers usually call FltSetCancelCompletion for an I/O operation immediately before calling FltQueueDeferredIoWorkItem to post the operation to a work queue.

Do not call FltSetCancelCompletion for any I/O operation that is to be posted to a cancel-safe callback data queue using the FltCbdqXxx routines.

The Filter Manager calls the CanceledCallback routine without holding the system cancel spin lock or performing any other synchronization. Any required synchronization must be supplied by the minifilter driver itself.

To cancel an I/O operation, call FltCancelIo.

Requirements

Header

Fltkernel.h (include Fltkernel.h)

Library

FltMgr.lib

IRQL

<= DISPATCH_LEVEL

See also

FLT_CALLBACK_DATA
FLT_IS_IRP_OPERATION
FltCancelIo
FltClearCancelCompletion
FltQueueDeferredIoWorkItem

 

 

Send comments about this topic to Microsoft

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.