IoDeleteController

VOID
IoDeleteController(

IN PCONTROLLER_OBJECT ControllerObject
);

IoDeleteController removes a given controller object from the system, for example, when the driver that created it is being unloaded.

Parameters

ControllerObject

Points to the controller object to be released.

Comments

IoDeleteController deallocates the memory for the controller object, including the controller extension.

This routine must be called when a driver that created a controller object is being unloaded or when the DriverEntry routine encounters a fatal initialization error, such as being unable to properly initialize a physical device.

A driver must release certain resources for which the driver supplied storage in its controller extension before it calls IoDeleteController. For example, if the driver stores the pointer to its interrupt object(s) in the controller extension, it must call IoDisconnectInterrupt before IoDeleteController.

Callers of IoDeleteController must be running at IRQL PASSIVE_LEVEL.

See Also

IoCreateController, IoDisconnectInterrupt