KeInsertQueueDpc

BOOLEAN
    KeInsertQueueDpc(

        IN PKDPC  Dpc,
        IN PVOID  SystemArgument1,
        IN PVOID  SystemArgument2
        );

KeInsertQueueDpc queues a DPC for execution when the IRQL of a processor drops below DISPATCH_LEVEL.

Parameters

Dpc
Points to an initialized control object of type DPC for which the caller provides the storage.
SystemArgument1, SystemArgument2
Points to a set of two parameters that contain untyped data.

Return Value

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

Comments

If the specified DPC object is already in the DPC queue, no operation is performed except to return FALSE. Otherwise, the DPC object is inserted in the DPC queue and a software interrupt is requested at IRQL DISPATCH_LEVEL on the current processor.

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

The deferred procedure is run when IRQL on the current processor drops below DISPATCH_LEVEL.

Callers of KeInsertQueueDpc must be running at IRQL >= DISPATCH_LEVEL.

See Also

KeInitializeDpc, KeRemoveQueueDpc