Device Driver Loading

The IOS loads and initializes port drivers, miniport drivers, and value-added drivers. The IOS requires the files for these drivers to be located in the SYSTEM\IOSUBSYS directory and to have the following filename extensions:

Extension Description
PDR Port drivers, such as SCSIPORT, ESDI_506, and NEC
MPD SCSI miniport drivers
VXD Value-added drivers, such as the volume tracker and vendor-supplied drivers

The SYSTEM\IOSUBSYS directory is reserved for device drivers that are specifically designed for use with the IOS.

Note  All other VxD Clients or virtual devices that use IOS services but are not specifically designed for the IOS should be stored in other directories (typically the SYSTEM directory) and explicitly loaded by the other Windows 95 VxD loading mechanisms:

The IOS loads a given port or miniport driver only if the configuration manager sends a request to load that driver. The configuration manager sends a request if its hardware detection code locates an adapter. Currently, the configuration manager can detect the IDE and AHA154x SCSI adapters only. To support other adapters, the configuration manager forces the IOS to load all remaining miniport drivers. These drivers remain loaded only if they locate an adapter they can support. In general, any port driver that fails to locate hardware that it can support will be unloaded.

When the IOS loads a port driver, it carries out these steps:

  1. Loads and initializes the port driver. The port driver must be present in the SYSTEM\IOSUBSYS directory.
  2. Loads all value-added drivers (files having the .VXD extension) that are not already loaded from the SYSTEM\IOSUBSYS directory.
  3. Initializes and configures the value-added drivers. If a value-added driver has not been previously loaded, the IOS initializes it by sending the SYS_DYNAMIC_DEVICE_INIT message. Otherwise, the IOS sends the driver an AEP_CONFIG_DCB function for each DCB created by the corresponding port driver.

To load a port or value-added driver, the IOS calls the VXDLDR_LoadDriver service (provided by the VxD loader) to load the driver. The IOS extracts the address of the driver's DRP structure from the DDB_Reference_Data member of the VxD_Desc_Block structure returned by this service. (You set this member when writing the device driver by specifying the DRP structure in the Declare_Virtual_Device statement.) The IOS uses the load group value (in the DRP_LGN member) to prepare for initialization of the driver. The load group identifies the layer at which the driver operates and needs initialization for. For example, the load group number (lgn) specifies the order in which the IOS initializes and configures the value-added drivers. In most cases, a driver sets a single bit in this member, but some drivers operate at several layers and must set multiple bits.

Although the DRP_eyecatch_str, DRP_ascii_name, DRP_create_date, and DRP_create_time members are not used during driver loading, a driver should set these members to valid values. Most drivers set all other members in the structure to zero.

See Also

DRP