[PATCH 3/7] d3d11: Add ID3D11Texture3D interface stub.

Józef Kucia joseph.kucia at gmail.com
Tue Sep 1 11:56:47 CDT 2015


On Tue, Sep 1, 2015 at 3:53 PM, Henri Verbeet <hverbeet at gmail.com> wrote:
> On 1 September 2015 at 00:27, Józef Kucia <jkucia at codeweavers.com> wrote:
>> +    else if (IsEqualGUID(riid, &IID_ID3D10Texture3D)
>> +            || IsEqualGUID(riid, &IID_ID3D10Resource)
>> +            || IsEqualGUID(riid, &IID_ID3D10DeviceChild))
>> +    {
>> +        IUnknown_AddRef(iface);
>> +        *object = &texture->ID3D10Texture3D_iface;
> For what it's worth, this works here because the d3d10 and d3d11
> interfaces share the reference count, but in general you should
> AddRef() the actual interface you're returning.
>
>

IMHO, this is somehow clearer than IUnknown_AddRef((IUnknown
*)*object). On the other hand, it seems suspicious when AddRef() is
called on other interface than the one returned.



More information about the wine-devel mailing list