SetupDiGetClassImageListExA function (setupapi.h)
The SetupDiGetClassImageListEx function builds an image list of bitmaps for every class installed on a local or remote system.
Syntax
WINSETUPAPI BOOL SetupDiGetClassImageListExA(
[out] PSP_CLASSIMAGELIST_DATA ClassImageListData,
[in, optional] PCSTR MachineName,
PVOID Reserved
);
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.
[in, optional] MachineName
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.
Caution
Using this function to access remote machines is not supported beginning with Windows 8 and Windows Server 2012, as this functionality has been removed.
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
The setupapi.h header defines SetupDiGetClassImageListEx as an alias that automatically selects the ANSI or Unicode version of this function based on the definition of the UNICODE preprocessor constant. Mixing usage of the encoding-neutral alias with code that is not encoding-neutral can lead to mismatches that result in compilation or runtime errors. For more information, see Conventions for Function Prototypes.
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 |