![]() ![]() 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.
Layout of a Driver ObjectThere is a unique driver object for each driver currently loaded in the system. Figure 4.2 illustrates the structure of the driver object. As you can see, the driver object also contains a pointer to a linked list of devices serviced by this driver. A driver's Unload routine can use this list to locate any devices it needs to delete. Figure 4.2. The driver object.![]()
Unlike other objects, there are no access functions for modifying driver objects. Instead, the DriverEntry routine sets various fields directly. Table 4.5 lists the fields a driver is allowed to touch.
|