Drivers\Builtin

The HKEY_LOCAL_MACHINE\Drivers\Builtin key contains subkeys that list which drivers Device Manager loads when the platform is turned on. Each subkey is named after the device driver and contains values described in the following table. Additional values can be stored for purposes specific to the device driver although drivers should never modify keys outside of the driver’s own subkey or keys that the driver did not create itself.

Value name
Value type
Description
Dll REG_SZ This required entry specifies the file name for a driver DLL that the Device Manager is to load.
Entry REG_SZ The Entry value, if it exists, names an entry point to the DLL. The Device Manager loads the DLL and calls the specified entry point, with the driver’s registry path as a parameter. When a driver is invoked in this manner, the driver is responsible for calling the RegisterDevice function on its own, and is not tracked by the Device Manager in the Drivers\Active key.

The function named in the Entry value must follow the prototype specified for PFN_DEV_ENTRY: DWORD (*PFN_DEV_ENTRY)(LPTSTR), where the LPSTR parameter is the registry path of the device’s key.

Index REG_DWORD This optional value specifies the device index, a value from 0 through 9, that the Device Manager should assign to the driver. If this value is not present, the Device Manager assigns the lowest available index value as the device driver's device file name index.
Keep REG_SZ The Keep value works in conjunction with the Entry value; if you have the Keep value, you must also have the Entry value. If the Keep value exists, the Device Manager does not call the FreeLibrary function after the entry point specified in the Entry value returns. This mechanism exists to provide a means to automatically load DLLs at boot time.
Order REG_DWORD The Order value specifies the load order for a driver. If two drivers have the same load order value, the drivers load in the order that they occur in the registry. This entry is useful when one driver must load after another. This value is required for non-PC Card devices and is ignored for loading PC Card drivers.
Prefix REG_SZ This required value specifies the driver’s device file name prefix. It is a three-character identifier, such as COM.

The following example shows the contents under the Builtin key for the standard serial port driver.

HKEY_LOCAL_MACHINE
    [Drivers]
        [BuiltIn]
            [Serial]
                SZ: Dll = Serial.DLL
                DWORD: Order = 0x00000000 (0)
                SZ: Prefix = COM
                hex: DevConfig = 10 00 00 00 02 00 00 00 10 01 00 00 00 4b 00
                DWORD: DeviceArrayIndex = 0x00000000 (0)
                DWORD: DeviceType = 0x00000000 (0)
                SZ: FriendlyName = Serial Cable on COM1:
                SZ: Tsp = Unimodem.dll