IoStartNextPacketByKey

VOID
    IoStartNextPacketByKey(

        IN PDEVICE_OBJECT  DeviceObject,
        IN BOOLEAN  Cancelable,
        IN ULONG  Key
        );

IoStartNextPacketByKey dequeues the next packet from the given device object’s associated device queue according to a specified sort-key value and calls the driver’s StartIo routine with that IRP.

Parameters

DeviceObject
Points to the device object for which the IRP is to be dequeued.
Cancelable
Specifies whether IRPs in the device queue can be canceled. TRUE means the update of the current IRP is synchronized by using the cancel spin lock.
Key
Specifies the sort key that determines which entry to remove from the queue.

Comments

If there are no IRPs currently in the device queue for the target device object, this routine simply returns control to the caller.

Drivers that do not have a StartIo routine cannot call IoStartNextPacketByKey.

Callers of IoStartNextPacketByKey must be running at IRQL <= DISPATCH_LEVEL. Usually, this routine is called from a device driver’s DpcForIsr or CustomDpc routine, both of which are run at IRQL DISPATCH_LEVEL.

See Also

DEVICE_OBJECT, IoStartNextPacket, IoStartPacket