The SetupDiOpenClassRegKey function opens the setup class registry key or a specific class's subkey.
- ClassGuid [in, optional]
A pointer to the GUID of the setup class whose key is to be opened. This parameter is optional and can be NULL. If this parameter is NULL, the root of the setup class tree (HKLM\SYSTEM\CurrentControlSet\Control\Class) is opened.
- samDesired [in]
The registry security access for the key to be opened. For information about registry security access values of type REGSAM, see the Microsoft Windows SDK documentation.
If the function is successful, it returns a handle to an opened registry key where information about this setup class can be stored/retrieved.
If the function fails, it returns INVALID_HANDLE_VALUE. To get extended error information, call GetLastError.
Depending on the value that is passed in the samDesired parameter, it might be necessary for the caller of this function to be a member of the Administrators group.
This function does not create a registry key if it does not already exist.
The handle returned from this function must be closed by calling RegCloseKey.
To open the interface class registry key or a specific interface class subkey, call SetupDiOpenClassRegKeyEx.
|Available in Microsoft Windows 2000 and later versions of Windows.|
Build date: 12/12/2013