Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
DriverEntry is the only driver routine with an exported name. When the I/O Manager needs to locate other driver functions, it uses the Driver object associated with a specific device. This object is basically a catalog that contains pointers to various driver functions. The life of a driver object is explained below.
The I/O Manager creates a driver object whenever it loads a driver. If the driver fails during initialization, the I/O Manager deletes the object.
During initialization, the DriverEntry routine loads pointers to other driver functions into the driver object.
When an IRP is sent to a specific device, the I/O Manager uses the associated driver object to find the right Dispatch routine.
If a request involves an actual device operation, the I/O Manager uses the driver object to locate the driver's Start I/O routine.
If the driver is unloaded, the I/O Manager uses the driver object to find an Unload routine. When the Unload routine returns, the I/O Manager deletes the Driver object.