KeInsertDeviceQueue 函式 (wdm.h)
KeInsertDeviceQueue 例程會取得指定裝置佇列物件的微調鎖定,如果裝置佇列設定為忙碌狀態,則會將指定的專案排入佇列。
語法
BOOLEAN KeInsertDeviceQueue(
[in, out] PKDEVICE_QUEUE DeviceQueue,
[in, out] PKDEVICE_QUEUE_ENTRY DeviceQueueEntry
);
參數
[in, out] DeviceQueue
呼叫端提供記憶體之裝置佇列類型的控制物件指標。
[in, out] DeviceQueueEntry
要插入之裝置佇列專案的指標。
傳回值
如果裝置佇列是空的,則會傳回 FALSE,且裝置佇列中不會插入 DeviceQueueEntry。
言論
如果裝置佇列設定為忙碌狀態,則會在裝置佇列尾端插入指定的 DeviceQueueEntry,並釋放裝置佇列微調鎖定。
如果 KeInsertDeviceQueue 傳回 FALSE,則專案未排入佇列,且呼叫端必須開始處理 IRP。 呼叫 KeInsertDeviceQueue 或 KeInsertByKeyDeviceQue ue 時,當佇列是空的時,會讓裝置佇列從非忙碌狀態變更為忙碌狀態。
此例程適用於將 I/O 要求排入佇列給設備驅動器的程式代碼。
要求
要求 | 價值 |
---|---|
最低支援的用戶端 | 從 Windows 2000 開始提供。 |
目標平臺 | 普遍 |
標頭 | wdm.h (包括 Wdm.h、Ntddk.h、Ntifs.h) |
連結庫 | NtosKrnl.lib |
DLL | NtosKrnl.exe |
IRQL | DISPATCH_LEVEL |
DDI 合規性規則 | HwStorPortProhibitedDIS(storport),IrqlDispatch(storport),IrqlDispatch(storport),IrqlDispatch(wdm),標記QueuedIrps(wdm) |