CM_Open_Class_Key function
The CM_Open_Class_Key function opens the device setup class registry key, the device interface class registry key, or a specific subkey of a class.
Syntax
CMAPI CONFIGRET WINAPI CM_Open_Class_Key( _In_opt_ LPGUID ClassGuid, _In_opt_ LPCWSTR pszClassName, _In_ REGSAM samDesired, _In_ REGDISPOSITION Disposition, _Out_ PHKEY phkClass, _In_ ULONG ulFlags );
Parameters
- ClassGuid [in, optional]
-
Pointer to the GUID of the class whose registry key is to be opened. This parameter is optional and can be NULL. If this parameter is NULL, the root of the class tree is opened.
- pszClassName [in, optional]
-
Reserved. Must be set to NULL.
- samDesired [in]
-
The registry security access for the key to be opened.
- Disposition [in]
-
Specifies how the registry key is to be opened. May be one of the following values:
- phkClass [out]
-
Pointer to an HKEY that will receive the opened key upon success.
- ulFlags [in]
-
Open class key flags:
Return value
If the operation succeeds, the function returns CR_SUCCESS. Otherwise, it returns one of the CR_-prefixed error codes defined in Cfgmgr32.h.
Remarks
Close the handle returned from this function by calling RegCloseKey.
Requirements
|
Target platform |
|
|---|---|
|
Version |
Available in Microsoft Windows 2000 and later versions of Windows. |
|
Header |
|
|
Library |
|
|
Unicode and ANSI names |
CM_Open_Class_KeyW (Unicode) |
See also