KeRemoveDeviceQueue - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
// wdm.h

PKDEVICE_QUEUE_ENTRY KeRemoveDeviceQueue(
  [in, out] PKDEVICE_QUEUE DeviceQueue
);
View the official Windows Driver Kit DDI reference

NtDoc

No description available.

Windows Driver Kit DDI reference (nf-wdm-keremovedevicequeue)

KeRemoveDeviceQueue function

Description

The KeRemoveDeviceQueue routine removes an entry from the head of a specified device queue.

Parameters

DeviceQueue [in, out]

Pointer to an initialized device queue object for which the caller provides the storage.

Return value

If the device queue is empty but is set to a busy state, KeRemoveDeviceQueue returns NULL.

Remarks

The specified device queue spin lock is acquired and the state of the device queue is checked. If the device queue is set to a busy state and an IRP is queued, this routine dequeues the entry and returns a pointer to the IRP. A call to KeRemoveDeviceQueue when the device queue object is set to a busy state but no IRPs are queued causes a state change to not-busy. The specified device queue's spin lock is released.

It is an error to call KeRemoveDeviceQueue when the device queue object is set to a not-busy state.

See also

KeInitializeDeviceQueue

KeInsertByKeyDeviceQueue

KeInsertDeviceQueue

KeRemoveByKeyDeviceQueue

KeRemoveEntryDeviceQueue