Expand Minimize

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


BOOL SetupDiGetDeviceInfoListClass(
  _In_   HDEVINFO DeviceInfoSet,
  _Out_  LPGUID ClassGuid
);

Parameters

DeviceInfoSet [in]

A handle to the device information set to query.

ClassGuid [out]

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

Version

Available in Microsoft Windows 2000 and later versions of Windows.

Header

Setupapi.h (include Setupapi.h)

Library

Setupapi.lib

See also

SetupDiCreateDeviceInfoList
SetupDiGetClassDevs
SetupDiGetDeviceInfoListDetail

 

 

Send comments about this topic to Microsoft

Show:
© 2014 Microsoft