Registry

The registry is a system-wide database, accessed in both Windows® 95 and Windows NT® through the Microsoft Win32® API set. Additionally, Windows 95 provides real-mode access to the registry to allow its use during boot-up prior to the switch to protected mode.

The registry stores a hierarchical tree of "Keys" and "Values," similar to entries in Windows 3.1-format .INI files (except that Windows 3.1 .INI files have a flat structure, as opposed to the tree structure of the registry.) Windows 95 Plug and Play uses the registry to store information about which drivers should be loaded when a particular device is enumerated, as well as such information as the driver revision number, manufacturer, and potential logical configurations of the device.

Most Plug and Play registry entries are stored in the ENUM tree. (That is, \\HKEY_LOCAL_MACHINE\ENUM.) Under ENUM, each enumerator gets its own branch, with one child under the enumerator for each device it has ever enumerated and set up. There is one special enumerator branch called ENUM\ROOT which contains the registry entries for old-style, non-Plug and Play hardware for which there is no enumerator but which can be detected using other means. The Device Installer creates new registry entries when an enumerator detects a device for which there is no registry entry. Most of the information is provided either by the .INF file provided with the device or directly by the device's setup module.

The registry also stores configuration-specific information (that is, information which is relevant to whether a capable portable computer is docked or undocked) as well as user-specific information. For any particular setting, the application or device driver must determine whether it is configuration-aware or user-aware, and write the entries to the registry in the proper location.

General configuration-specific information is stored in the \\HKEY_LOCAL_MACHINE\CONFIG\configname branch of the registry. The rules for storing information in these configuration specific branches should be the same as the rules for their grandparents. Typically, creators and consumers of config- and user-specific information read and write to the predefined keys HKEY_CURRENT_CONFIG\ and HKEY_CURRENT_USER which automatically selects the appropriate subbranch of the CONFIG and HKEY_USERS trees.

Since information about static devices (that is, non-Plug and Play hardware) is stored in \\HKEY_LOCAL_MACHINE\ENUM\ROOT\*, information about static devices that only applies to a particular configuration is stored in: \\HKEY_LOCAL_MACHINE\CONFIG\xxxx\ENUM\ROOT.