Platform SDK: Hardware |
The SetupDiOpenClassRegKeyEx function opens the registry key for the device setup or interface class, or a subkey for a specific class. This function opens the specified key on the local computer or on a remote computer.
HKEY SetupDiOpenClassRegKeyEx( CONST LPGUID ClassGuid, REGSAM samDesired, DWORD Flags, PCTSTR MachineName, PVOID Reserved );
Value | Meaning |
---|---|
DIOCR_INSTALLER | Open a setup class key. If the ClassGuid parameter is NULL, open the root key of the class installer branch. |
DIOCR_INTERFACE | Open an interface class key. If ClassGuid is NULL, open the root key of the interface class branch. |
If the function succeeds, the return value is a handle to an opened registry key where information pertaining to this setup class can be stored or retrieved.
If the function fails, the return value is INVALID_HANDLE_VALUE. To get extended error information, call GetLastError.
The SetupDiOpenClassRegKeyEx function does not create a registry key if it does not already exist.
To close the handle returned from this function, call the RegCloseKey function.
Windows NT/2000: Requires Windows 2000.
Windows 95/98: Requires Windows 98.
Header: Declared in Setupapi.h.
Library: Use Setupapi.lib.
Device Management Overview, Device Management Functions, SetupDiCreateDeviceInterfaceRegKey, SetupDiOpenDeviceInterfaceRegKey