Previous Next

ControllerControl

The ControllerControl routine starts a data transfer operation.

IO_ALLOCATION_ACTION
  ControllerControl(
    IN PDEVICE_OBJECT  DeviceObject,
    IN PIRP  Irp,
    IN PVOID  MapRegisterBase,
    IN PVOID  Context 
    );

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 I/O operation, if the driver has a StartIo routine. Otherwise, not used.
MapRegisterBase
Not used.
Context
Caller-supplied pointer to driver-defined context information, specified in a previous call to IoAllocateController.

Return Value

The routine must return one of the enumerated values defined by IO_ALLOCATION_ACTION.

Comments

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

To register a ControllerrControl routine for a specific device object, a driver must call IoCreateController to obtain a controller object, then call IoAllocateController to request use of the controller and to supply the ControllerControl routine's address. When the controller is free, the system calls the ControllerControl routine.

For detailed information about implementing a ControllerControl routine, see Writing ControllerControl Routines. Also see Controller Objects.