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

2013-10-09 Thread Dmitry Timoshkov
Henri Verbeet hverb...@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.




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

2013-10-09 Thread Henri Verbeet
On 9 October 2013 11:26, Dmitry Timoshkov dmi...@baikal.ru wrote:
 Henri Verbeet hverb...@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.