The CustomDpc routine finishes the servicing of an I/O operation, after an InterruptService routine returns.
VOID
CustomDPC(
IN struct _KDPC *Dpc,
IN PVOID DeferredContext,
IN PVOID SystemArgument1,
IN PVOID SystemArgument2
);
None
A driver's CustomDpc routine executes in a DPC context, at IRQL = DISPATCH_LEVEL.
To create a DPC object and register a CustomDpc routine for that object, a driver must call KeInitializeDPC. (If you need only one DPC routine, you can use a DpcForIsr routine and the system-allocated DPC object.)
To queue a CustomDpc routine for execution, a driver's InterruptService routine must call KeInsertQueueDpc.
One or more CustomDpc routines can be used instead of, or in conjunction with, a DpcForIsr routine. A driver that maintains several internal IRP queues typically supplies a CustomDpc routine for each queue. Each CustomDpc routine is typically responsible for at least the following tasks:
A CustomDpc routine might also retry a failed operation or set up the next transfer for a large I/O request that is broken into smaller pieces.
For more information about CustomDpc routines, see DPC Objects and DPCs.