Hardware Dev Center

Expand Minimize

KeRemoveByKeyDeviceQueue routine

The KeRemoveByKeyDeviceQueue routine removes an entry, selected according to a sort key value, from the specified device queue.

Syntax


PKDEVICE_QUEUE_ENTRY KeRemoveByKeyDeviceQueue(
  _Inout_ PKDEVICE_QUEUE DeviceQueue,
  _In_    ULONG          SortKey
);

Parameters

DeviceQueue [in, out]

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

SortKey [in]

Specifies the key to be used when searching the DeviceQueue.

Return value

KeRemoveByKeyDeviceQueue returns the device queue entry that was removed; returns NULL if the queue was empty.

Remarks

This routine searches for the first entry in the device queue that has a value greater than or equal to the SortKey. After this entry is found, this routine removes the entry from the device queue and returns it. If no such entry is found, then the first entry in the queue is returned. If the device queue is empty, then the device is set to a not-busy state and a NULL pointer is returned.

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

Requirements

Target platform

Universal

Version

Available starting with Windows 2000.

Header

Wdm.h (include Wdm.h, Ntddk.h, or Ntifs.h)

Library

NtosKrnl.lib

DLL

NtosKrnl.exe

IRQL

DISPATCH_LEVEL

DDI compliance rules

IrqlDispatch, HwStorPortProhibitedDDIs, IrqlDispatch(storport)

See also

KeInitializeDeviceQueue
KeInsertByKeyDeviceQueue
KeInsertDeviceQueue
KeRemoveDeviceQueue
KeRemoveEntryDeviceQueue

 

 

Send comments about this topic to Microsoft

Show:
© 2015 Microsoft