KeRemoveByKeyDeviceQueue 函数 (wdm.h)

KeRemoveByKeyDeviceQueue 例程会从指定的设备队列中删除根据排序键值选择的条目。

语法

PKDEVICE_QUEUE_ENTRY KeRemoveByKeyDeviceQueue(
  [in, out] PKDEVICE_QUEUE DeviceQueue,
  [in]      ULONG          SortKey
);

参数

[in, out] DeviceQueue

指向调用方为其提供存储的已初始化设备队列对象的指针。

[in] SortKey

指定在搜索 DeviceQueue时要使用的密钥。

返回值

KeRemoveByKeyDeviceQueue 返回已删除的设备队列条目;如果队列为空,则返回 NULL

言论

此例程搜索设备队列中值大于或等于 SortKey的第一个条目。 找到此条目后,此例程将从设备队列中删除该条目并返回它。 如果未找到此类条目,则返回队列中的第一个条目。 如果设备队列为空,则设备将设置为非忙状态,并返回 NULL 指针。

当设备队列对象设置为非忙状态时,调用 KeRemoveByKeyDeviceQueue 是错误的。

要求

要求 价值
最低支持的客户端 从 Windows 2000 开始可用。
目标平台 普遍
标头 wdm.h (包括 Wdm.h、Ntddk.h、Ntifs.h)
NtosKrnl.lib
DLL NtosKrnl.exe
IRQL DISPATCH_LEVEL
DDI 符合性规则 HwStorPortProhibitedDDIIs(storport)IrqlDispatch(storport), IrqlDispatch(storport), IrqlDispatch(wdm)

另请参阅

KeInitializeDeviceQueue

KeInsertByKeyDeviceQueue

KeInsertDeviceQueue

KeRemoveDeviceQueue

KeRemoveEntryDeviceQueue