SetupDiGetDeviceInfoListClass function

The SetupDiGetDeviceInfoListClass function retrieves the GUID for the device setup class associated with a device information set if the set has an associated class.

Syntax

WINSETUPAPI BOOL SetupDiGetDeviceInfoListClass(
  HDEVINFO DeviceInfoSet,
  LPGUID   ClassGuid
);

Parameters

DeviceInfoSet

A handle to the device information set to query.

ClassGuid

A pointer to variable of type GUID 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.

Remarks

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.

If a device information set is for a remote computer, use SetupDiGetDeviceInfoListDetail to get the associated remote computer handle and computer name.

Requirements

   
Windows version Available in Microsoft Windows 2000 and later versions of Windows.
Target Platform Desktop
Header setupapi.h (include Setupapi.h)
Library Setupapi.lib
DLL Setupapi.dll

See Also

SetupDiCreateDeviceInfoList

SetupDiGetClassDevs

SetupDiGetDeviceInfoListDetail