The Device Manager uses registry keys stored in the HKEY_LOCAL_MACHINE\Drivers\ key. The following are the major subkeys of the HKEY_LOCAL_MACHINE\Drivers\ key:
When a device driver is loaded, the Device Manager passes it the path to its Active\ key as the dwContext parameter in the device driver’s XXX_Init function. The device driver can rely on the presence of the following values:
Device handle from the RegisterDevice function
Device file name
Registry path within HKEY_LOCAL_MACHINE to the device driver key
The Active\ key for PC Card device drivers has the following additional values:
Plug and Play identifier string
Current socket and function pair of the PC Card
Once a device driver is loaded, it can add values to its Active\ key. However, the Device Manager deletes the device driver Active\ key and any values in it when the device driver is unloaded.