[PATCH 4/5] d3drm: Compare with the correct IID in IDirect3DRMVisualArrayImpl_QueryInterface().
Henri Verbeet
hverbeet at gmail.com
Wed Oct 9 04:31:22 CDT 2013
On 9 October 2013 11:26, Dmitry Timoshkov <dmitry at baikal.ru> wrote:
> 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.
>
The entire dll needs some cleanup in general, but that assignment is
correct, since it's querying for the same interface that gets passed
in.
More information about the wine-devel
mailing list