WdfDpcEnqueue function (wdfdpc.h)
[Applies to KMDF only]
The WdfDpcEnqueue method schedules the execution of a DPC object's EvtDpcFunc callback function.
BOOLEAN WdfDpcEnqueue( [in] WDFDPC Dpc );
A handle to a framework DPC object.
WdfDpcEnqueue returns TRUE if it successfully adds the specified DPC object to the system's DPC queue. Otherwise, the method returns FALSE.
A bug check occurs if the driver supplies an invalid object handle.
The WdfDpcEnqueue method adds the specified DPC object to the system's DPC queue, if it is not already in the queue. (If the DPC object was already in the queue, the method returns FALSE.) When the system is not executing higher-priority tasks, it removes the DPC object from the queue and calls the object's EvtDpcFunc callback function.
After the callback function executes, a subsequent call to WdfDpcEnqueue will add the DPC object back into the DPC queue.
For more information about using DPC objects, see Servicing an Interrupt.
The following code example schedules the execution of the callback function that is associated with a DPC object. The example uses the WdfDpcEnqueue method's return value as the containing function's return value. The WdfDpcCreate code example shows how the DPC object was created.
|Minimum KMDF version||1.0|
|Header||wdfdpc.h (include Wdf.h)|
|Library||Wdf01000.sys (see Framework Library Versioning.)|
|DDI compliance rules||DriverCreate, KmdfIrql, KmdfIrql2|