Accessing Icon Properties of a Device Setup Class

In Windows Vista and later versions of Windows, the unified device property model includes device setup class properties that represent icon properties of a device setup class. The unified device property model uses the DEVPKEY_DeviceClass_Icon property key and the DEVPKEY_DeviceClass_IconPath property key to represent these properties.

Windows Server 2003, Windows XP, and Windows 2000 do not directly support these device setup class properties. However, these earlier versions of Windows do support the following mechanisms to retrieve information about device setup class icons:

  • Call SetupDiLoadClassIcon to retrieve the index of the mini-icon for a device setup class in the MiniIconIndex output parameter. You can then pass the retrieved mini-icon index to SetupDiDrawMiniIcon to draw a mini-icon of the retrieved class icon in a specified device context.

  • Call SetupDiLoadClassIcon to load the large icon for a device setup class in the context of the caller and return a handle to the large icon to the caller.

To maintain compatibility with these earlier versions of Windows, Windows Vista and later versions also support these mechanisms to access the icons of a device setup class. However, you should use the property keys to access the icon properties in Windows Vista and later versions.