On 22 March 2012 00:50, Michael Stefaniuc mstefani@redhat.de wrote:
-static HRESULT STDMETHODCALLTYPE d3d10_device_inner_QueryInterface(IUnknown *iface, REFIID riid, void **object) +static HRESULT STDMETHODCALLTYPE d3d10_device_inner_QueryInterface(IUnknown *iface, REFIID riid,
- void **ppv)
{
- struct d3d10_device *This = d3d10_device_from_inner_unknown(iface);
- struct d3d10_device *This = impl_from_IUnknown(iface);
- TRACE("iface %p, riid %s, object %p\n", iface, debugstr_guid(riid), object);
- TRACE("iface %p, riid %s, object %p\n", iface, debugstr_guid(riid), ppv);
- if (IsEqualGUID(riid, &IID_IUnknown)
- || IsEqualGUID(riid, &IID_ID3D10Device))
- if (IsEqualGUID(riid, &IID_IUnknown) || IsEqualGUID(riid, &IID_ID3D10Device))
- *ppv = This;
- else if (IsEqualGUID(riid, &IID_IWineDXGIDeviceParent))
- *ppv = &This->IWineDXGIDeviceParent_iface;
- else
{
- ID3D10Device_AddRef(&This->ID3D10Device_iface);
- *object = This;
- return S_OK;
- WARN("%s not implemented, returning E_NOINTERFACE\n", debugstr_guid(riid));
- *ppv = NULL;
- return E_NOINTERFACE;
}
- if (IsEqualGUID(riid, &IID_IWineDXGIDeviceParent))
- {
- IWineDXGIDeviceParent_AddRef(&This->IWineDXGIDeviceParent_iface);
- *object = &This->IWineDXGIDeviceParent_iface;
- return S_OK;
- }
- WARN("%s not implemented, returning E_NOINTERFACE\n", debugstr_guid(riid));
- *object = NULL;
- return E_NOINTERFACE;
- IUnknown_AddRef((IUnknown*)*ppv);
- return S_OK;
}
I'm not sure this really makes it much better, but I guess it's mostly up to how Alexandre wants these.