Rémi Bernon (@rbernon) commented about dlls/windows.devices.enumeration/information.c:
case DEVPROP_TYPE_DOUBLE:
hr = IPropertyValueStatics_CreateDouble( propval_statics, *(DOUBLE *)prop->Buffer, &val );
break;
case DEVPROP_TYPE_GUID:
hr = IPropertyValueStatics_CreateGuid( propval_statics, *(GUID *)prop->Buffer, &val );
break;
case DEVPROP_TYPE_FILETIME:
hr = IPropertyValueStatics_CreateDateTime( propval_statics, *(DateTime *)prop->Buffer, &val );
break;
case DEVPROP_TYPE_STRING:
{
if (SUCCEEDED(hr = WindowsCreateString( prop->Buffer, wcslen( prop->Buffer ), &str )))
{
hr = IPropertyValueStatics_CreateString( propval_statics, str, &val );
WindowsDeleteString( str );
}
What about using WindowsCreateStringReference here too?