[PATCH] mfplat: Implement MFCreateAttributes

Nikolay Sivov nsivov at codeweavers.com
Thu Apr 20 04:17:38 CDT 2017



On 04/20/2017 10:44 AM, Alistair Leslie-Hughes wrote:
> +{
> +    mfattributes *This = impl_from_IMFAttributes(iface);
> +
> +    if(IsEqualGUID(riid, &IID_IUnknown) ||
> +       IsEqualGUID(riid, &IID_IMFAttributes))
> +    {
> +        TRACE("(IID_IUnknown %p)\n", object);
> +        *object = This;
> +    }
> +    else
> +    {
> +        FIXME("(%s, %p)\n", debugstr_guid(riid), object);
> +        *object = NULL;
> +        return E_NOINTERFACE;
> +    }
> +
> +    IUnknown_AddRef((IUnknown*)*object);
> +    return S_OK;
> +}
Please add a regular TRACE for this method, and return iface or 
interface pointer from This, instead of This itself.
Trace you have now is inaccurate.

> +HRESULT WINAPI MFCreateAttributes(IMFAttributes **attributes, UINT32 size)
> +{
> +    mfattributes *object;
> +
> +    TRACE("%p, %d\n", attributes, size);
> +
> +    object = HeapAlloc( GetProcessHeap(), 0, sizeof(*attributes) );
> +    if(!object)
> +        return E_OUTOFMEMORY;
This should use sizeof(*object).



More information about the wine-devel mailing list