SetupDiGetClassImageIndex function (setupapi.h)

The SetupDiGetClassImageIndex function retrieves the index within the class image list of a specified class.

Syntax

WINSETUPAPI BOOL SetupDiGetClassImageIndex(
  PSP_CLASSIMAGELIST_DATA ClassImageListData,
  const GUID              *ClassGuid,
  PINT                    ImageIndex
);

Parameters

ClassImageListData

A pointer to an SP_CLASSIMAGELIST_DATA structure that describes a class image list that includes the image for the device setup class that is specified by the ClassGuid parameter.

ClassGuid

A pointer to the GUID of the device setup class for which to retrieve the index of the class image in the specified class image list.

ImageIndex

A pointer to an INT-typed variable that receives the index of the specified class image in the class image list.

Return value

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

Remarks

If the specified device setup class is not included in the specified class image list, SetupDiGetClassImageIndex returns the image index for the Unknown device setup class in the ImageIndex parameter.

Requirements

   
Minimum supported client 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

SetupDiGetClassImageList

SetupDiGetClassImageListEx