The CM_Get_Class_Registry_Property function retrieves a device setup class property.
CMAPI CONFIGRET CM_Get_Class_Registry_PropertyW( LPGUID ClassGuid, ULONG ulProperty, PULONG pulRegDataType, PVOID Buffer, PULONG pulLength, ULONG ulFlags, HMACHINE hMachine );
A pointer to the GUID that represents the device setup class for which to retrieve a property.
A value of type ULONG that identifies the property to be retrieved. This value must be one of the following CM_CRP_Xxx values that are defined in Cfgmgr32.h:
Represents a REG_MULTI_SZ-type list of strings, where each string contains the name of an upper-level filter driver that is registered for the class.
Represents a REG_MULTI_SZ-typed list of strings, where each string contains the name of a lower-level filter drivers that is registered for the class.
Represents a value of type REG_BINARY that contains a variable-length, self-relative, SECURITY_DESCRIPTOR structure.
Represents a string of type REG_SZ that contains a security descriptor in the Security Descriptor Definition Language (SDDL) format.
Represents a value of type REG_DWORD that indicates the device type for the class. For more information, see Specifying Device Types.
Represents a value of type REG_DWORD that indicates whether users can obtain exclusive access to devices for this class. The returned value is 1 if exclusive access is allowed, or zero otherwise.
Represents a value of type DWORD that indicates the device characteristics for the class. For a list of characteristics flags, see the DeviceCharacteristics parameter of the IoCreateDevice routine.
A pointer to a variable of type ULONG that receives the REG_Xxx constant that represents the data type of the requested property. The REG_Xxx constants are defined in Winnt.h and are described in the Type member of the KEY_VALUE_BASIC_INFORMATION structure. This parameter is optional and can be set to NULL.
A pointer to a buffer that receives the requested property data. For more information about this parameter and the buffer-size parameter pulLength, see the following Remarks section.
A pointer to variable of type ULONG whose value, on input, is the size, in bytes, of the buffer that is supplied by Buffer. On return, CM_Get_Class_Registry_Property sets this variable to the size, in bytes, of the requested property.
Reserved for internal use only. Must be set to zero.
A handle to a remote machine from which to retrieve the specified device class property. This parameter is optional, and, if it is set to NULL, the property is retrieved from the local machine.
If the operation succeeds, CM_Get_Class_Registry_Property returns CR_SUCCESS. Otherwise, the function returns one of the other CR_Xxx status codes that are defined in Cfgmgr32.h.
To determine the size, in bytes, of a property before attempting to retrieve the property, first call CM_Get_Class_Registry_Property, supplying a NULLBuffer pointer and a pulLength value of zero. In response to such a call, the function does not retrieve the property, but sets pulLength to the size of the requested property and returns CR_BUFFER_SMALL. After obtaining the property size, call CM_Get_Class_Registry_Property again, supplying a Buffer pointer to the buffer to receive the property data and supplying the property size in *pulLength.
|Windows version||Available in Microsoft Windows 2000 and later versions of Windows.|
|Header||cfgmgr32.h (include Cfgmgr32.h)|