Andrew Eikum (@aeikum) commented about dlls/mmdevapi/devenum.c:
pv.vt = VT_LPWSTR; pv.pwszVal = name;
if (SUCCEEDED(set_driver_prop_value(id, flow, &devicepath_key))) {
PROPVARIANT pv2;
PropVariantInit(&pv2);
if (SUCCEEDED(MMDevice_GetPropValue(id, flow, &devicepath_key, &pv2)) && pv2.vt == VT_LPWSTR) {
This isn't a blocker, but it feels a little silly to get the value in `set_driver_prop_value` and then get it again here. You could change the `set_driver_prop_value` API to (optionally?) pass back the value it gets to the caller, who would then free it.