Opening registry keys for a device setup class
Do not directly access the registry keys for device setup classes. As with any registry key, the location and name of these keys might change between different versions of Windows.
To safely open the registry keys of a device setup class, use one of the following functions:
CM_Open_Class_Key with the ulFlags parameter set to CM_OPEN_CLASS_KEY_INSTALLER
SetupDiOpenClassRegKeyEx with the Flags parameter set to DIOCR_INSTALLER