IoStartPacket - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
// ntifs.h

VOID IoStartPacket(
  [in]           PDEVICE_OBJECT DeviceObject,
  [in]           PIRP           Irp,
  [in, optional] PULONG         Key,
  [in, optional] PDRIVER_CANCEL CancelFunction
);

View the official Windows Driver Kit DDI reference
// wdm.h

VOID IoStartPacket(
  [in]           PDEVICE_OBJECT DeviceObject,
  [in]           PIRP           Irp,
  [in, optional] PULONG         Key,
  [in, optional] PDRIVER_CANCEL CancelFunction
);

View the official Windows Driver Kit DDI reference

NtDoc

No description available.

Windows Driver Kit DDI reference (nf-ntifs-iostartpacket)

IoStartPacket function (ntifs.h)

Description

The IoStartPacket routine 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.

Parameters

DeviceObject [in]

Pointer to the target device object for the IRP.

Irp [in]

Pointer to the IRP to be processed.

Key [in, optional]

Pointer to a value that determines where to insert the packet into the device queue. If this is zero, the packet is inserted at the tail of the device queue.

CancelFunction [in, optional]

Specifies the entry point for a driver-supplied Cancel routine.

Remarks

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 non-NULL 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.

See also

DEVICE_OBJECT

IoMarkIrpPending

IoSetCancelRoutine

IoStartNextPacket

IoStartNextPacketByKey


Windows Driver Kit DDI reference (nf-wdm-iostartpacket)

IoStartPacket function (wdm.h)

Description

The IoStartPacket routine 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.

Parameters

DeviceObject [in]

Pointer to the target device object for the IRP.

Irp [in]

Pointer to the IRP to be processed.

Key [in, optional]

Pointer to a value that determines where to insert the packet into the device queue. If this is zero, the packet is inserted at the tail of the device queue.

CancelFunction [in, optional]

Specifies the entry point for a driver-supplied Cancel routine.

Remarks

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 non-NULL 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.

See also

DEVICE_OBJECT

IoMarkIrpPending

IoSetCancelRoutine

IoStartNextPacket

IoStartNextPacketByKey