d3dx9: Add stubs for the ID3DXRenderToSurface functions [PATCH 8/9]

H. Verbeet hverbeet at gmail.com
Sun Feb 24 01:38:41 CST 2008


On 23/02/2008, tony.wasserka at freenet.de <tony.wasserka at freenet.de> wrote:
>  +static HRESULT WINAPI ID3DXRenderToSurfaceImpl_QueryInterface(LPD3DXRENDERTOSURFACE iface, REFIID riid, LPVOID *object)
>  +{
>  +    ID3DXRenderToSurfaceImpl *This=(ID3DXRenderToSurfaceImpl*)iface;
>  +
>  +    if(IsEqualGUID(riid, &IID_IUnknown) || IsEqualGUID(riid, &IID_ID3DXRenderToSurface)) {
>  +        TRACE("(%p): QueryInterface from %sn", This, debugstr_guid(riid));
>  +        IUnknown_AddRef(iface);
>  +        *object=This;
>  +        return S_OK;
>  +    }
>  +    WARN("(%p)->(%s, %p): not foundn", iface, debugstr_guid(riid), object);
>  +    object=NULL;
>  +    return E_NOINTERFACE;
>  +}
>  +
Setting object to NULL here doesn't do a whole lot, you should set
*object to NULL (also goes for the other QueryInterface
implementations). Also, you'll probably want to put the TRACE before
the if block.



More information about the wine-patches mailing list