Chapter 12 Cancel Routines

This chapter contains the following information:
12.1 Cancel Routine Requirements

12.1.1 Cancel Routines in NT Drivers

12.1.2  Cancelable IRPs in Higher-Level Drivers without Cancel Routines

12.2 Handling Cancelable IRPs

12.3 Cancel Routine Functionality

12.4 Points to Consider In Handling Cancelable IRPs

The Cancel routine is defined by the I/O Manager as follows:

VOID 
(*PDRIVER_CANCEL) ( 
    IN PDEVICE_OBJECT DeviceObject, 
    IN PIRP Irp 
    ); 
 

This chapter summarizes the required functionality of an NT driver’s standard Cancel routine(s) and guidelines for managing cancelable IRPs in other driver routines.

Two members in the IRP contain key information concerning cancellation: