CM_Open_Device_Interface_KeyW function (cfgmgr32.h)
The CM_Open_Device_Interface_Key function opens the registry subkey that is used by applications and drivers to store information that is specific to a device interface.
CMAPI CONFIGRET CM_Open_Device_Interface_KeyW( [in] LPCWSTR pszDeviceInterface, [in] REGSAM samDesired, [in] REGDISPOSITION Disposition, [out] PHKEY phkDeviceInterface, [in] ULONG ulFlags );
Pointer to a string that identifies the device interface instance to open the registry subkey for.
The requested registry security access to the registry subkey.
Specifies how the registry key is to be opened. May be one of the following values:
Open the key if it exists. Otherwise, create the key.
Open the key only if it exists.
Pointer to an HKEY that will receive the opened key upon success.
Reserved. Must be set to zero.
If the operation succeeds, the function returns CR_SUCCESS. Otherwise, it returns one of the CR_-prefixed error codes defined in Cfgmgr32.h.
Close the handle returned from this function by calling RegCloseKey.
The cfgmgr32.h header defines CM_Open_Device_Interface_Key as an alias which automatically selects the ANSI or Unicode version of this function based on the definition of the UNICODE preprocessor constant. Mixing usage of the encoding-neutral alias with code that not encoding-neutral can lead to mismatches that result in compilation or runtime errors. For more information, see Conventions for Function Prototypes.
|Minimum supported client||Available in Microsoft Windows Vista and later versions of Windows.|
|Header||cfgmgr32.h (include Cfgmgr32.h)|