SetupDiGetClassImageList function

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(
  PSP_CLASSIMAGELIST_DATA ClassImageListData
);

Parameters

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

   
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

SetupDiDestroyClassImageList

SetupDiGetClassImageListEx