Previous Next

IoInitializeDpcRequest

The IoInitializeDpcRequest routine registers a driver-supplied DpcForIsr routine when a device driver initializes.

VOID 
  IoInitializeDpcRequest(
    IN PDEVICE_OBJECT  DeviceObject,
    IN PIO_DPC_ROUTINE  DpcRoutine
    );

Parameters

DeviceObject
Pointer to the device object representing the physical device that generates interrupts.
DpcRoutine
Pointer to the driver-supplied DpcForIsr routine, which is declared as follows:
VOID
(*PIO_DPC_ROUTINE)(
    IN PKDPC Dpc,
    IN PDEVICE_OBJECT DeviceObject,
    IN PIRP Irp,
    IN PVOID Context
    );

Return Value

None

Headers

Declared in wdm.h and ntddk.h. Include wdm.h or ntddk.h.

Comments

IoInitializeDpcRequest associates a driver-supplied DpcForIsr routine with a given device object so the driver’s ISR can call IoRequestDpc to queue the DpcForIsr. This routine completes interrupt-driven I/O operations at a lower IRQL than that of the ISR.

PnP drivers call IoInitializeDpcRequest from the AddDevice routine.

Callers of IoInitializeDpcRequest must be running at IRQL = PASSIVE_LEVEL.

It is possible to call KeInitializeDpc to initialize another DPC at IRQL <= DISPATCH_LEVEL.

See Also

IoRequestDpc, KeInitializeDpc