Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Expand Minimize

KeInsertDeviceQueue routine

The KeInsertDeviceQueue routine acquires the spin lock for the specified device queue object and, if the device queue is set to a busy state, queues the specified entry.

Syntax


BOOLEAN KeInsertDeviceQueue(
  _Inout_ PKDEVICE_QUEUE       DeviceQueue,
  _Inout_ PKDEVICE_QUEUE_ENTRY DeviceQueueEntry
);

Parameters

DeviceQueue [in, out]

Pointer to a control object of type device queue for which the caller provides the storage.

DeviceQueueEntry [in, out]

Pointer to the device queue entry that is to be inserted.

Return value

If the device queue is empty, FALSE is returned and the DeviceQueueEntry is not inserted in the device queue.

Remarks

If the device queue is set to a busy state, the specified DeviceQueueEntry is inserted at the tail of the device queue and the device queue spin lock is released.

If KeInsertDeviceQueue returns FALSE, the entry was not queued and the caller must begin processing the IRP. A call to KeInsertDeviceQueue or KeInsertByKeyDeviceQueue when the queue is empty causes the device queue to change from a not-busy state to a busy state.

This routine is for code that queues an I/O request to a device driver.

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, MarkingQueuedIrps, HwStorPortProhibitedDDIs, IrqlDispatch(storport)

See also

KeInitializeDeviceQueue
KeInsertByKeyDeviceQueue
KeRemoveDeviceQueue
KeRemoveEntryDeviceQueue

 

 

Send comments about this topic to Microsoft

Show:
© 2015 Microsoft