KeRemoveEntryDeviceQueue

BOOLEAN
    KeRemoveEntryDeviceQueue(

        IN PKDEVICE_QUEUE  DeviceQueue,
        IN PKDEVICE_QUEUE_ENTRY  DeviceQueueEntry
        );

KeRemoveEntryDeviceQueue returns whether the specified entry is in the device queue and removes it, if it was queued, from the device queue.

Parameters

DeviceQueue
Points to an initialized device queue object for which the caller provides the storage.
DeviceQueueEntry
Points to the entry to be removed from the specified DeviceQueue.

Return Value

If the DeviceQueueEntry is queued, it is removed and KeRemoveEntryDeviceQueue returns TRUE.

Comments

The IRQL is set to DISPATCH_LEVEL and the DeviceQueue spin lock is acquired.

If the given DeviceQueueEntry is not in the queue, the IRP either is already being processed, or the IRP has been canceled. In this case, KeRemoveEntryDeviceQueue simply returns FALSE.

The specified DeviceQueue spin lock is released and IRQL is restored to its previous value.

Callers of KeRemoveEntryDeviceQueue must be running at IRQL <= DISPATCH_LEVEL.

See Also

KeInitializeDeviceQueue, KeInsertByKeyDeviceQueue, KeInsertDeviceQueue, KeRemoveByKeyDeviceQueue, KeRemoveDeviceQueue