Previous Next

StartIo

The StartIo routine starts the I/O operation described by an IRP.

NTSTATUS
  XxxStartIo(
    IN PDEVICE_OBJECT  DeviceObject,
    IN PIRP  Irp 
    );

Parameters

DeviceObject
Caller-supplied pointer to a DEVICE_OBJECT structure. This is the device object for the target device, previously created by the driver's AddDevice routine.
Irp
Caller-supplied pointer to an IRP structure that describes the requested I/O operation.

Return Value

If the routine succeeds, it must return STATUS_SUCCESS. Otherwise, it must return one of the error status values defined in ntstatus.h.

Comments

A driver's StartIo routine executes in an arbitrary thread context at IRQL = DISPATCH_LEVEL.

The StartIo routine is optional. A driver's StartIo routine, if supplied, should be named XxxStartIo, where Xxx is a driver-specific prefix. The driver's DriverEntry routine must store the StartIo routine's address in DriverObject->DriverStartIo. (If no routine is supplied, this pointer must be NULL.)

A driver can use IoSetStartIoAttributes to set attributes on when it's StartIo routine is called.

For detailed information about implementing a driver's StartIo routine, see Writing a StartIo Routine.