The following trees in the Registry are of particle interest to driver writers (whereHKLMRepresentsHKEY_LOCAL_MACHINE):
- The HKLM \ System \ CurrentControlSet \ Services tree
- The HKLM \ System \ CurrentControlSet \ Control tree
- The HKLM \ SYSTEM \ CurrentControlSet \ Enum tree
- The HKLM \ System \ CurrentControlSet \ hardwareprofiles tree
Drivers must Access Plug and Play (PNP) keys in the registry using system routines suchIogetdevicepropertyOrIoopendeviceregistrykey. User-mode setup components shocould use device installation functions suchSetupdigetdeviceregistrypropertyOrSetupdiopendevregkey. The Registry can be accessed from INF files using INF addreg directives.
Drivers must not access these keys directly.This discussion of registry information is solely for debugging a device installation or configuration problem.
The keys underHKLM \ System \ CurrentControlSetAre a safe place to preserve data that is vital to your driver because the data is stored in the system hive. the system takes extra precautions to protect the system hive (for example, keeping multiple copies ).