Expand Minimize

SetupDiGetClassImageListEx function

The SetupDiGetClassImageListEx function builds an image list of bitmaps for every class installed on a local or remote system.

Syntax


BOOL SetupDiGetClassImageListEx(
  _Out_      PSP_CLASSIMAGELIST_DATA ClassImageListData,
  _In_opt_   PCTSTR                  MachineName,
  _Reserved_ PVOID                   Reserved
);

Parameters

ClassImageListData [out]

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.

MachineName [in, optional]

A pointer to NULL-terminated string that supplies the name of a remote system for whose classes SetupDiGetClassImageListEx must build the bitmap. This parameter is optional and can be NULL. If MachineName is NULL, SetupDiGetClassImageListEx builds the list for the local system.

Reserved

Must be NULL.

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.

Note   Class-specific icons on a remote computer can only be displayed if the class is also present on the local computer. Thus, if the remote computer has class X, but class X is not installed locally, then the generic (unknown) icon will be returned.

Requirements

Target platform

Desktop

Version

Available in Microsoft Windows 2000 and later versions of Windows.

Header

Setupapi.h (include Setupapi.h)

Library

Setupapi.lib

See also

SetupDiDestroyClassImageList
SetupDiGetClassImageList

 

 

Send comments about this topic to Microsoft

Show:
© 2015 Microsoft