Several new capabilities have been added to the real mode VxD loader. This section briefly discusses the services that have been added.
New parameters to the real mode initialization portions of VxDs will be added to allow a driver to determine where in the registry it was loaded from (and therefore where to look for switch settings.) This mechanism is still under definition.
In Windows 95, several functions have been added both to the real-mode VxD loader and to the Virtual Machine Manager to allow VxDs full access to the registry during initialization and during normal run time. Many of the standard Win32 and 16-bit registry access functions are also supported.
In most cases, VxDs can write to the registry in protected mode. However, VxDs cannot write to the registry during the real-mode initialization phase, nor can they gain access to the HKEY_CURRENT_USER key until following the Init_Complete phase.
For more information, see .
The Windows Virtual Machine Manager versions 3.1 and later provides a Loader Services entry point. LoaderServices' 16:16 address is passed to a VxD's real-mode initialization routine in the ECX register to provide various services.
Windows 95 (that is, VMM version 4.0 and later, which is passed to the VxDs real-mode entry point in AX) provides a new service, LDRSRV_Copy_Extended_Memory, which allocates a block of extended memory in the specified data group (init, locked, or pageable) to the size requested and initializes the block with the given data.
The setup information contained in the .INF portion of the driver cross-references hardware IDs and drivers, so Setup can determine which piece of hardware a given driver corresponds to.
Hardware devices can list compatible IDs as part of their .INF portion, or in the PNP ISA case, the hardware can return the compatibility information directly as part of the device identification sequence. (Other enumeration schemes, such as PCMCIA, may also be able to return the compatible IDs directly from hardware interrogation.) For example, if a SVGA adapter is compatible with standard VGA, that can be specified as part of the .INF file. The same is true for drivers which implement a superset of a standard driver. At installation, setup will attempt to use the best match of hardware to software driver as the default choice.
Assume that an enumerator identifies a new device. If the registry entry does not exist, Configuration Manager runs the device installer and calls back to the enumerator to ask for additional information. This additional information is for the use of the device installer and can include a device description and a list of compatible device IDs. For example, an SVGA card might return the generic Windows VGA or SVGA device IDs (PNP0900 and/or PNP0901 respectively). The device installer then searches .INF files to find any driver(s) that work on this device, and copies the appropriate information to the registry. When this process is complete, Configuration Manager continues with the device node as usual.
If the user inserts an XYZ PCMCIA card, the tuples allow the PCMCIA enumerator to determine a device ID of "PCMCIA\XYZ\0". If Configuration Manager does not find any registry entry for this card, it launches the device installer. The device installer would then ask the PCMCIA enumerator for additional information, such as compatible Device IDs. If no additional information was available, the device installer would then open all .INF files searching for matches of "PCMCIA\XYZ." It might find setup information in a file named XYZ.INF. Setup may optionally ask for user confirmation of the device identification at this point. The device installer would then update the registry with the appropriate information for the card (including the name of the driver to load). The driver would be dynamically loaded, and the device would be enabled.
At boot time the ISAPNP enumerator might detect a card with the "ISAPNP\*FSC0407\28AF363" device ID. If Configuration Manager could not find an appropriate entry in the registry, it would launch the device installer after protected-mode startup. The device installer would ask ISAPNP for additional information about the new card. It might receive the following:
Device installer might find a match of the compatible ID with an existing Sound Blaster driver and prompt the user as follows:
"You have installed a new Fred's Sound Card. Windows can make this < device work, however if this device has an installation diskette, you < should place it in drive A:"
The user would then put the disk supplied with the card in drive A, and choose a "Use setup diskette" button. The device installer might find an exact match of ID *FSC0407 in the file "FREDCARD.INF" and use this as the driver. The rest of the process proceeds as in "New PCMCIA Card Example."
These services are provided by the real-mode VxD loader.