I'm using the SetupDi...
functions to enumerate HID devices.
If I'm looking at these devices in the windows settings, they have nice hi-res icons (photos). I'm looking for the API to receive those.
I've tried SetupDiLoadDeviceIcon
, but the result is underwelming:
This is when I request a 100x100 icon. I've tried larger and smaller sizes as well.
Here's the code I'm using (somewhat simplified, iterating through index
gives all HID devices):
GUID guid;
HidD_GetHidGuid(&guid);
device_info_set = SetupDiGetClassDevs(guid,
NULL, NULL,
DIGCF_PRESENT|DIGCF_DEVICEINTERFACE);
SP_DEVINFO_DATA dev_info;
SetupDiEnumDeviceInfo(device_info_set, index, &dev_info);
SetupDiLoadDeviceIcon(device_info_set,
dev_info,
100, 100,
0,
&hicon);
This is the small icon used in the device manager (missing the alpha mask). How can I get the pretty ones?
Just to be clear, these are kind of icons / images I'm looking for. The logitech HID device, for example, is not a stock picture: