RETERR DiOpenDevRegKey(LPDEVICE_INFO lpdi, LPHKEY lphk, int iFlags)
This API will open either of the registry keys associated with a device.
DIREG_DEV | Open the hardware registry key for the device. This is a key that exists in the \ENUM\ROOT branch. |
DIREG_DRV | Open the software, or Driver, registry key for the device. This is a key that is in the HKLM\System\CurrentControlSet\Services\Class registry subkey. |
Note that it is the callers responsibility to close the returned registry key when it is finished with it.