CM_Get_Class_Property_Keys function (cfgmgr32.h)

The CM_Get_Class_Property_Keys function retrieves an array of the device property keys that represent the device properties that are set for a device interface class or device setup class.

Syntax

CMAPI CONFIGRET CM_Get_Class_Property_Keys(
  LPCGUID    ClassGUID,
  DEVPROPKEY *PropertyKeyArray,
  PULONG     PropertyKeyCount,
  ULONG      ulFlags
);

Parameters

ClassGUID

Pointer to the GUID that identifies the device interface class or device setup class for which to retrieve the property keys for. For information about specifying the class type, see the ulFlags parameter.

PropertyKeyArray

Pointer to a buffer that receives an array of DEVPROPKEY-typed values, where each value is a device property key that represents a device property that is set for the device class. The pointer is optional and can be NULL.

PropertyKeyCount

The size, in DEVPROPKEY-typed units, of the PropertyKeyArray buffer. If PropertyKeyArray is set to NULL, *PropertyKeyCount must be set to zero. As output, if PropertyKeyArray is not large enough to hold all the property key data, CM_Get_Class_Property_Keys returns the count of the keys, in *PropertyKeyCount.

ulFlags

Class property key flags:

CM_CLASS_PROPERTY_INSTALLER

ClassGUID specifies a device setup class. Do not combine with CM_CLASS_PROPERTY_INTERFACE.

CM_CLASS_PROPERTY_INTERFACE

ClassGUID specifies a device interface class. Do not combine with CM_CLASS_PROPERTY_INSTALLER.

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

CM_Get_Class_Property_Keys is part of the Unified Device Property Model.

Requirements

   
Minimum supported client Available in Microsoft Windows Vista and later versions of Windows.
Target Platform Universal
Header cfgmgr32.h (include Cfgmgr32.h)
Library Cfgmgr32.lib; OneCoreUAP.lib on Windows 10
DLL CfgMgr32.dll

See also

SetupDiGetClassPropertyKeys