Re: d3dx9: Add stubs for the ID3DXRenderToSurface functions [PATCH 8/9]
On 23/02/2008, tony.wasserka(a)freenet.de <tony.wasserka(a)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.
participants (1)
-
H. Verbeet