VOID
IoStartPacket(
IN PDEVICE_OBJECT DeviceObject,
IN PIRP Irp,
IN PULONG Key, /* optional */
IN PDRIVER_CANCEL CancelFunction /* optional */
);
IoStartPacket calls the driver’s StartIo routine with the given IRP or inserts the IRP into the device queue associated with the given device object if the device is already busy.
If the driver is already busy processing a request for the target device object, then the packet is queued in the device queue. Otherwise, this routine calls the driver’s StartIo routine with the specified IRP.
If a nonNULL CancelFunction pointer is supplied, it is set in the IRP so the driver’s Cancel routine is called if the IRP is canceled before its completion.
Drivers that do not have a StartIo routine cannot call IoStartPacket.
Callers of IoStartPacket must be running at IRQL <= DISPATCH_LEVEL. Usually, this routine is called from a device driver’s Dispatch routine at IRQL PASSIVE_LEVEL.
DEVICE_OBJECT, IoMarkIrpPending, IoSetCancelRoutine, IoStartNextPacket, IoStartNextPacketByKey