SetupDiGetClassImageList function (setupapi.h)

The SetupDiGetClassImageList function builds an image list that contains bitmaps for every installed class and returns the list in a data structure.

Syntax

WINSETUPAPI BOOL SetupDiGetClassImageList(
  [out] PSP_CLASSIMAGELIST_DATA ClassImageListData
);

Parameters

[out] ClassImageListData

A pointer to an SP_CLASSIMAGELIST_DATA structure to receive information regarding the class image list, including a handle to the image list. The cbSize field of this structure must be initialized with the size of the structure, in bytes, before calling this function or it will fail.

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

The image list built by this function should be destroyed by calling SetupDiDestroyClassImageList.

Call SetupDiGetClassImageListEx to retrieve the image list for classes installed on a remote computer.

Requirements

Requirement Value
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

SetupDiDestroyClassImageList

SetupDiGetClassImageListEx