KeInsertQueueDpc function (wdm.h)

The KeInsertQueueDpc routine queues a DPC for execution.

Syntax

BOOLEAN KeInsertQueueDpc(
  [in, out]      PRKDPC                 Dpc,
  [in, optional] PVOID                  SystemArgument1,
  [in, optional] __drv_aliasesMem PVOID SystemArgument2
);

Parameters

[in, out] Dpc

Pointer to the KDPC structure for the DPC object. This structure must have been initialized by either KeInitializeDpc or KeInitializeThreadedDpc.

[in, optional] SystemArgument1

Specifies driver-determined context data. This value is passed as the SystemArgument1 parameter to the DPC object's CustomDpc or CustomThreadedDpc routine.

[in, optional] SystemArgument2

Specifies driver-determined context data. This value is passed as the SystemArgument2 parameter to the DPC object's CustomDpc or CustomThreadedDpc routine.

Return value

If the specified DPC object is not currently in a DPC queue, KeInsertQueueDpc queues the DPC and returns TRUE.

Remarks

If the specified DPC object has already been queued, no operation is performed except to return FALSE. Otherwise, the DPC object is inserted in a DPC queue. For more information about DPC queues, see Organization of DPC Queues.

Note that a particular DPC object and the function that it represents can each be queued for execution only once at any particular time.

Requirements

Requirement Value
Minimum supported client Available starting with Windows 2000.
Target Platform Universal
Header wdm.h (include Wdm.h, Ntddk.h, Ntifs.h)
Library NtosKrnl.lib
DLL NtosKrnl.exe
IRQL Any level
DDI compliance rules HwStorPortProhibitedDDIs(storport), MarkingQueuedIrps(wdm)

See also

CustomDpc

CustomThreadedDpc

KeInitializeDpc

KeRemoveQueueDpc