SetupDiOpenClassRegKey

HKEY
SetupDiOpenClassRegKey(
IN PGUID ClassGuid,    /* optional */
IN REGSAM samDesired
);

SetupDiOpenClassRegKey opens the class registry key or a specific class' subkey.

Parameters

ClassGuid

Supplies the GUID of the class whose key is to be opened. If this parameter is NULL, the root of the class tree (HKLM\SYSTEM\CurrentControlSet\Control\Class) is opened.

samDesired

Specifies the access you require for the key.

Return Value

If the function is successful, it returns TRUE. If the function fails, it returns INVALID_HANDLE_VALUE. To get extended error information, call GetLastError.

Comments

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.

See Also

SetupDiOpenDevRegKey