Zhiyi Zhang (@zhiyi) commented about dlls/gdi32/tests/driver.c:
- iface_data = (SP_DEVICE_INTERFACE_DETAIL_DATA_W *)iface_detail_buffer;
- iface_data->cbSize = sizeof(*iface_data);
- i = 0;
- while (SetupDiEnumDeviceInterfaces(set, NULL, devinterface_guid, i, &iface))
- {
ret = SetupDiGetDeviceInterfaceDetailW(set, &iface, iface_data,
sizeof(iface_detail_buffer), NULL, &device_data );
ok(ret, "Got unexpected ret %d, GetLastError() %lu.\n", ret, GetLastError());
ret = SetupDiGetDevicePropertyW(set, &device_data, &DEVPKEY_Device_MatchingDeviceId, &type,
(BYTE *)device_id, sizeof(device_id), NULL, 0);
ok(ret, "Got unexpected ret %d, GetLastError() %lu.\n", ret, GetLastError());
ok(type == DEVPROP_TYPE_STRING, "Got type %ld.\n", type);
++i;
I think you should check that there are indeed devices with these properties found.