Expand Minimize

SetupDiGetClassImageIndex function

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

Syntax


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

Parameters

ClassImageListData [in]

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 [in]

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 [out]

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

Version

Available in Microsoft Windows 2000 and later versions of Windows.

Header

Setupapi.h (include Setupapi.h)

Library

Setupapi.lib

See also

SetupDiGetClassImageList
SetupDiGetClassImageListEx

 

 

Send comments about this topic to Microsoft

Show:
© 2014 Microsoft. All rights reserved.