[PATCH 05/11] mfplat: Implement IMFattributes::{SetUInt32,SetUInt64,GetUInt32,GetUInt64}.

Nikolay Sivov nsivov at codeweavers.com
Fri Dec 28 13:27:33 CST 2018


On 12/28/18 6:43 PM, Jactry Zeng wrote:

>   static HRESULT WINAPI mfattributes_GetUINT32(IMFAttributes *iface, REFGUID key, UINT32 *value)
>   {
>       mfattributes *This = impl_from_IMFAttributes(iface);
> +    PROPVARIANT attrval;
> +    HRESULT hres;
>   
> -    FIXME("%p, %s, %p\n", This, debugstr_guid(key), value);
> +    TRACE("(%p, %s, %p)\n", This, debugstr_guid(key), value);
>   
> -    return E_NOTIMPL;
> +    PropVariantInit(&attrval);
> +    attrval.vt = MF_ATTRIBUTE_UINT32;
> +    hres = mfattributes_getitem(This, key, &attrval, TRUE);
> +    if(SUCCEEDED(hres))
> +        hres = PropVariantToUInt32(&attrval, value);
> +    return hres;
>   }

I think it's better to use VT_* naming.

Last argument of getitem helper is supposed to trigger type validation, 
so successful path implies that types are matching and you probably 
don't need additional coercion call.





More information about the wine-devel mailing list