SetupDiGetDeviceInfoListClass

BOOLEAN
SetupDiGetDeviceInfoListClass(
IN HDEVINFO DeviceInfoSet,
OUT LPGUID ClassGuid
);

SetupDiGetDeviceInfoListClass retrieves the class GUID associated with a device information set if it has an associated class.

Parameters

DeviceInfoSet

Supplies a handle to the device information set to query.

ClassGuid

Supplies a pointer to the variable that receives the GUID for the associated class.

Return Value

The function returns TRUE if it is successful. Otherwise it returns FALSE and the logged error can be retrieved with a call to GetLastError.

Comments

If the specified device information set does not have an associated class because a class GUID was not specified when the set was created with SetupDiCreateDeviceInfoList, the function fails. In this case, a call to GetLastError returns ERROR_NO_ASSOCIATED_CLASS.

See Also

SetupDiCreateDeviceInfoList, SetupDiGetClassDevs