Chapter 9  DpcForIsr Routine and CustomDpc Routines

This chapter contains the following information:

9.1  DpcForIsr and CustomDpc Routine Requirements

9.1.1  DpcForIsr versus CustomDpc Routines

9.1.2  Basic DpcForIsr Requirements

9.1.3  Basic CustomDpc Routine Requirements

9.1.4  Additional Required Driver Routines

9.1.5  Setting Up DpcForIsr and CustomDpc Routines

9.2  DpcForIsr and CustomDpc Functionality

9.2.1  Using Buffered I/O and Satisfying Device Control IRPs

9.2.2  Using Direct I/O

9.2.3  Points to Consider in Implementing a DpcForIsr or CustomDpc Routine

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

VOID

(*PIO_DPC_ROUTINE) (

    IN PKDPC Dpc,

    IN PDEVICE_OBJECT DeviceObject,

    IN PIRP Irp,

    IN PVOID Context

    );

 

The CustomDpc routine is defined by the Kernel as follows:

VOID

(*PKDEFERRED_ROUTINE) (

    IN PKDPC Dpc,

    IN PVOID DeferredContext,

    IN PVOID SystemArgument1,

    IN PVOID SystemArgument2

    );

 

This chapter summarizes the required functionality of an NT device driver’s standard DpcForIsr routine and/or CustomDpc routines.