Rémi Bernon (@rbernon) commented about dlls/cfgmgr32/tests/cfgmgr32.c:
winetest_pop_context(); + } DevFreeObjects( len, objects ); + winetest_pop_context(); } - SetupDiDestroyDeviceInfoList( set ); + + /* Non-existent device properties will still have an entry in the returned DEV_OBJECT, albeit with Type set to + * DEVPROP_TYPE_EMPTY. */ + len = 0; + objects = NULL; + prop_key.Key = DEVPKEY_dummy; + hr = DevGetObjects( DevObjectTypeDeviceInterface, 0, 1, &prop_key, 0, NULL, &len, &objects ); + ok( hr == S_OK, "got hr %#lx\n", hr ); + ok( len, "got len %lu\n", len );
Maybe check that len == 1 and get rid of the loop? -- https://gitlab.winehq.org/wine/wine/-/merge_requests/8478#note_108812