BOOLEAN
SetupDiLoadClassIcon(
IN LPGUID ClassGuid,
OUT HICON *LargeIcon, /* optional */
OUT LPINT MiniIconIndex /* optional */
);
SetupDiLoadClassIcon loads both the large and mini-icon for the specified class.
The function returns TRUE if it is successful. Otherwise it returns FALSE and the logged error can be retrieved by a call to GetLastError.
The icons of the class are either predefined and loaded from the device installer’s internal cache, or they are loaded directly from the class installer’s executable. This function querys the registry value ICON in the specified class’ section. If the ICON value is specified, it indicates which mini-icon to load.
If the ICON value is negative, the absolute value represents a predefined icon in the class’ registry. See SetupDiDrawMiniIcon for a list of the predefined mini-icons.
If the ICON value is positive, it represents an icon in the class installer’s executable that will be extracted. The value 1 is reserved. This function also uses the INSTALLER32 registry value and then the ENUMPROPPAGES32 registry value to determine which executable to extract the icon(s) from.