The IoCreateController routine allocates memory for and initializes a controller object with a controller extension of a driver-determined size.
PCONTROLLER_OBJECT IoCreateController( ULONG Size );
Specifies the number of bytes to be allocated for the controller extension.
IoCreateController returns a pointer to the controller object or a NULL pointer if memory could not be allocated for the requested device extension.
A controller object usually represents a physical device controller with attached devices on which a single driver carries out I/O requests. The controller extension is allocated from nonpaged pool and is guaranteed to be accessible by any driver routine and in an arbitrary thread context.
The controller object is used to synchronize I/O operations to target devices for which I/O requests can come in concurrently to a single, monolithic driver. A driver also might use a controller object to synchronize operations through device channels.
If IoCreateController returns NULL, the driver should fail device start-up.
|Minimum supported client||Available starting with Windows 2000.|
|Header||ntddk.h (include Ntddk.h)|
|DDI compliance rules||IrqlIoPassive2, PowerIrpDDis, HwStorPortProhibitedDDIs|