The SetupDiGetClassRegistryProperty function retrieves a property for a specified device setup class from the registry.
WINSETUPAPI BOOL SetupDiGetClassRegistryPropertyA( CONST GUID *ClassGuid, DWORD Property, PDWORD PropertyRegDataType, PBYTE PropertyBuffer, DWORD PropertyBufferSize, PDWORD RequiredSize, PCSTR MachineName, PVOID Reserved );
A pointer to a GUID representing the device setup class for which a property is to be retrieved.
A value that identifies the property to be retrieved. This must be one of the following values:
The function returns flags indicating device characteristics for the class. For a list of characteristics flags, see the DeviceCharacteristics parameter to IoCreateDevice.
The function returns a DWORD value that represents the device type for the class. For more information, see Specifying Device Types.
The function returns a DWORD value indicating whether users can obtain exclusive access to devices for this class. The returned value is one if exclusive access is allowed, or zero otherwise.
(Windows Vista and later) The function returns a REG_MULTI_SZ list of the service names of the lower filter drivers that are installed for the device setup class.
The function returns the device's security descriptor as a SECURITY_DESCRIPTOR structure in self-relative format (described in the Microsoft Windows SDK documentation).
The function returns the device's security descriptor as a text string. For information about security descriptor strings, see Security Descriptor Definition Language (Windows). For information about the format of security descriptor strings, see Security Descriptor Definition Language (Windows).
(Windows Vista and later) The function returns a REG_MULTI_SZ list of the service names of the upper filter drivers that are installed for the device setup class.
A pointer to a variable of type DWORD that receives the property data type as one of the REG_-prefixed registry data types. This parameter is optional and can be NULL. If this parameter is NULL, SetupDiGetClassRegistryProperty does not return the data type.
A pointer to a buffer that receives the requested property.
The size, in bytes, of the PropertyBuffer buffer.
A pointer to a variable of type DWORD that receives the required size, in bytes, of the PropertyBuffer buffer. If the PropertyBuffer buffer is too small, and RequiredSize is not NULL, the function sets RequiredSize to the minimum buffer size that is required to receive the requested property.
A pointer to a NULL-terminated string that contains the name of a remote system from which to retrieve the specified device class property. This parameter is optional and can be NULL. If this parameter is NULL, the property is retrieved from the local system.
Reserved, must be NULL.
The function returns TRUE if it is successful. Otherwise, it returns FALSE and the logged error can be retrieved with a call to GetLastError.
|Windows version||Available in Windows XP and later versions of Windows.|
|Target Platform||DesktopFor universal, call CM_Get_Class_Registry_Property|
|Header||setupapi.h (include Setupapi.h)|