[PATCH 4/5] d3drm: Compare with the correct IID in IDirect3DRMVisualArrayImpl_QueryInterface().

Dmitry Timoshkov dmitry at baikal.ru
Wed Oct 9 04:26:19 CDT 2013


Henri Verbeet <hverbeet at codeweavers.com> wrote:

> +static HRESULT WINAPI IDirect3DRMVisualArrayImpl_QueryInterface(IDirect3DRMVisualArray *iface, REFIID riid, void **out)
>  {
> -    TRACE("(%p)->(%s, %p)\n", iface, debugstr_guid(riid), ret_iface);
> +    TRACE("iface %p, riid %s, out %p.\n", iface, debugstr_guid(riid), out);
>  
> -    if (IsEqualGUID(riid, &IID_IUnknown) ||
> -        IsEqualGUID(riid, &IID_IDirect3DRMFrameArray))
> +    if (IsEqualGUID(riid, &IID_IDirect3DRMVisualArray)
> +            || IsEqualGUID(riid, &IID_IUnknown))
>      {
> -        *ret_iface = iface;
>          IDirect3DRMVisualArray_AddRef(iface);
> +        *out = iface;
>          return S_OK;
>      }

Although this is existing code the assignment '*out = iface' is wrong,
especially since next patch introduces impl_from_IDirect3DRMVisualArray()
helper. Looks like that file needs a bit of COM clean up.

-- 
Dmitry.



More information about the wine-devel mailing list