Registry Keys for Removeable Display Adapters

When a secondary display adapter is provided on removable hardware, such as a PC Card, the display driver is typically implemented as two drivers: a native device driver that exposes the native DDI and a stream interface driver that exposes the stream interfaces. The stream driver must initialize the Registry with the keys that allow it to be detected and loaded. When the PC Card is inserted, the Device Manager initiates a detection sequence to determine what driver should service the card. If the PC Card has a Plug and Play ID, it is used to determine which driver to load. Otherwise, the Device Manager tries the detection functions for all the PC Card drivers installed on the system until one of them reports that it recognizes the PC Card. Once the correct driver is located, the Device Manager loads the driver whose name is provided as the registry key along with the detection function that succeeded in detecting the PC Card. The following example shows how the Device Manager then loads the driver, registers its special device file name, and calls the driver’s XXX_Init function.

 [HKEY_LOCAL_MACHINE\Drivers\PCMCIA\VoyagerVGA]
    Dll="VOYAGER.DLL"
    Prefix="VGA"
    Index=Dword:1

[HKEY_LOCAL_MACHINE\Drivers\PCMCIA\Detect\60]
    Dll="VOYAGER.DLL"
    Entry="DetectVGA"

As discussed earlier, the Microsoft Pocket PowerPoint application needs additional registry keys in order to use secondary display adapters. During initialization, the driver should update the HKEY_LOCAL_MACHINE\Drivers\Display\Active key with the information appropriate for its driver. This includes information about the native device driver .dll name, as well as Buffer and Tap information. For removable display adapters, this initialization should take place when the adapter is connected to the system and the Device Manager calls the stream driver’s XXX_Init function. The following example shows how this is done.

[HKEY_LOCAL_MACHINE\Drivers\Display\Active\Voyager]
    Dll="PCARDVGA.DLL"
    BufferMode=Dword:0
    Tapmode=Dword:0

The following table shows the four available values for BufferMode.

Value
Description
bmNotShared There is no common frame buffer.
bmTopHalf The top half of the secondary display is also shown on the system’s built-in LCD display.
bmSquashed A scaled-down version of the secondary display is also shown on the system’s built-in LCD display.
bmOff The system’s built-in display is turned off while the driver is active.

The following table shows the three available values for Tapmode.

Value
Description
tmNone The display driver performs no conversion of any tap coordinates.
tmScaled The display driver scales tap coordinates to match the secondary display’s resolution.
tmUndefined The display driver always reports tap coordinates of (0,0), but still reports tap events.