d3d9: Fix QueryInterface.
QueryInterface should return S_OK on success and set the object pointer to NULL on failure. This is similar to the patch Ivan submitted a while ago for wined3d.
This commit is contained in:
parent
d06aa8d857
commit
34e2e2bd39
|
@ -33,10 +33,11 @@ HRESULT WINAPI IDirect3DBaseTexture9Impl_QueryInterface(LPDIRECT3DBASETEXTURE9 i
|
|||
|| IsEqualGUID(riid, &IID_IDirect3DBaseTexture9)) {
|
||||
IUnknown_AddRef(iface);
|
||||
*ppobj = This;
|
||||
return D3D_OK;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
WARN("(%p)->(%s,%p),not found\n", This, debugstr_guid(riid), ppobj);
|
||||
*ppobj = NULL;
|
||||
return E_NOINTERFACE;
|
||||
}
|
||||
|
||||
|
|
|
@ -35,10 +35,11 @@ HRESULT WINAPI IDirect3DCubeTexture9Impl_QueryInterface(LPDIRECT3DCUBETEXTURE9 i
|
|||
|| IsEqualGUID(riid, &IID_IDirect3DCubeTexture9)) {
|
||||
IUnknown_AddRef(iface);
|
||||
*ppobj = This;
|
||||
return D3D_OK;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
WARN("(%p)->(%s,%p),not found\n", This, debugstr_guid(riid), ppobj);
|
||||
*ppobj = NULL;
|
||||
return E_NOINTERFACE;
|
||||
}
|
||||
|
||||
|
|
|
@ -34,10 +34,11 @@ HRESULT WINAPI IDirect3DDevice9Impl_QueryInterface(LPDIRECT3DDEVICE9 iface, REFI
|
|||
|| IsEqualGUID(riid, &IID_IDirect3DDevice9)) {
|
||||
IUnknown_AddRef(iface);
|
||||
*ppobj = This;
|
||||
return D3D_OK;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
WARN("(%p)->(%s,%p),not found\n", This, debugstr_guid(riid), ppobj);
|
||||
*ppobj = NULL;
|
||||
return E_NOINTERFACE;
|
||||
}
|
||||
|
||||
|
|
|
@ -33,10 +33,11 @@ HRESULT WINAPI IDirect3D9Impl_QueryInterface(LPDIRECT3D9 iface, REFIID riid, LPV
|
|||
|| IsEqualGUID(riid, &IID_IDirect3D9)) {
|
||||
IUnknown_AddRef(iface);
|
||||
*ppobj = This;
|
||||
return D3D_OK;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
WARN("(%p)->(%s,%p),not found\n", This, debugstr_guid(riid), ppobj);
|
||||
*ppobj = NULL;
|
||||
return E_NOINTERFACE;
|
||||
}
|
||||
|
||||
|
|
|
@ -33,10 +33,11 @@ HRESULT WINAPI IDirect3DIndexBuffer9Impl_QueryInterface(LPDIRECT3DINDEXBUFFER9 i
|
|||
|| IsEqualGUID(riid, &IID_IDirect3DIndexBuffer9)) {
|
||||
IUnknown_AddRef(iface);
|
||||
*ppobj = This;
|
||||
return D3D_OK;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
WARN("(%p)->(%s,%p),not found\n", This, debugstr_guid(riid), ppobj);
|
||||
*ppobj = NULL;
|
||||
return E_NOINTERFACE;
|
||||
}
|
||||
|
||||
|
|
|
@ -32,10 +32,11 @@ HRESULT WINAPI IDirect3DPixelShader9Impl_QueryInterface(LPDIRECT3DPIXELSHADER9 i
|
|||
|| IsEqualGUID(riid, &IID_IDirect3DPixelShader9)) {
|
||||
IUnknown_AddRef(iface);
|
||||
*ppobj = This;
|
||||
return D3D_OK;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
WARN("(%p)->(%s,%p),not found\n", This, debugstr_guid(riid), ppobj);
|
||||
*ppobj = NULL;
|
||||
return E_NOINTERFACE;
|
||||
}
|
||||
|
||||
|
|
|
@ -34,10 +34,11 @@ HRESULT WINAPI IDirect3DQuery9Impl_QueryInterface(LPDIRECT3DQUERY9 iface, REFIID
|
|||
|| IsEqualGUID(riid, &IID_IDirect3DQuery9)) {
|
||||
IUnknown_AddRef(iface);
|
||||
*ppobj = This;
|
||||
return D3D_OK;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
WARN("(%p)->(%s,%p),not found\n", This, debugstr_guid(riid), ppobj);
|
||||
*ppobj = NULL;
|
||||
return E_NOINTERFACE;
|
||||
}
|
||||
|
||||
|
|
|
@ -32,10 +32,11 @@ HRESULT WINAPI IDirect3DResource9Impl_QueryInterface(LPDIRECT3DRESOURCE9 iface,
|
|||
|| IsEqualGUID(riid, &IID_IDirect3DResource9)) {
|
||||
IDirect3DResource9Impl_AddRef(iface);
|
||||
*ppobj = This;
|
||||
return D3D_OK;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
WARN("(%p)->(%s,%p),not found\n", This, debugstr_guid(riid), ppobj);
|
||||
*ppobj = NULL;
|
||||
return E_NOINTERFACE;
|
||||
}
|
||||
|
||||
|
|
|
@ -33,10 +33,11 @@ HRESULT WINAPI IDirect3DStateBlock9Impl_QueryInterface(LPDIRECT3DSTATEBLOCK9 ifa
|
|||
|| IsEqualGUID(riid, &IID_IDirect3DStateBlock9)) {
|
||||
IUnknown_AddRef(iface);
|
||||
*ppobj = This;
|
||||
return D3D_OK;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
WARN("(%p)->(%s,%p),not found\n", This, debugstr_guid(riid), ppobj);
|
||||
*ppobj = NULL;
|
||||
return E_NOINTERFACE;
|
||||
}
|
||||
|
||||
|
|
|
@ -33,10 +33,11 @@ HRESULT WINAPI IDirect3DSurface9Impl_QueryInterface(LPDIRECT3DSURFACE9 iface, RE
|
|||
|| IsEqualGUID(riid, &IID_IDirect3DSurface9)) {
|
||||
IUnknown_AddRef(iface);
|
||||
*ppobj = This;
|
||||
return D3D_OK;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
WARN("(%p)->(%s,%p),not found\n", This, debugstr_guid(riid), ppobj);
|
||||
*ppobj = NULL;
|
||||
return E_NOINTERFACE;
|
||||
}
|
||||
|
||||
|
|
|
@ -34,10 +34,11 @@ HRESULT WINAPI IDirect3DSwapChain9Impl_QueryInterface(LPDIRECT3DSWAPCHAIN9 iface
|
|||
|| IsEqualGUID(riid, &IID_IDirect3DSwapChain9)) {
|
||||
IUnknown_AddRef(iface);
|
||||
*ppobj = This;
|
||||
return D3D_OK;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
WARN("(%p)->(%s,%p),not found\n", This, debugstr_guid(riid), ppobj);
|
||||
*ppobj = NULL;
|
||||
return E_NOINTERFACE;
|
||||
}
|
||||
|
||||
|
|
|
@ -35,10 +35,11 @@ HRESULT WINAPI IDirect3DTexture9Impl_QueryInterface(LPDIRECT3DTEXTURE9 iface, RE
|
|||
|| IsEqualGUID(riid, &IID_IDirect3DTexture9)) {
|
||||
IUnknown_AddRef(iface);
|
||||
*ppobj = This;
|
||||
return D3D_OK;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
WARN("(%p)->(%s,%p) not found\n", This, debugstr_guid(riid), ppobj);
|
||||
*ppobj = NULL;
|
||||
return E_NOINTERFACE;
|
||||
}
|
||||
|
||||
|
|
|
@ -34,10 +34,11 @@ HRESULT WINAPI IDirect3DVertexBuffer9Impl_QueryInterface(LPDIRECT3DVERTEXBUFFER9
|
|||
|| IsEqualGUID(riid, &IID_IDirect3DVertexBuffer9)) {
|
||||
IUnknown_AddRef(iface);
|
||||
*ppobj = This;
|
||||
return D3D_OK;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
WARN("(%p)->(%s,%p),not found\n", This, debugstr_guid(riid), ppobj);
|
||||
*ppobj = NULL;
|
||||
return E_NOINTERFACE;
|
||||
}
|
||||
|
||||
|
|
|
@ -32,10 +32,11 @@ HRESULT WINAPI IDirect3DVertexDeclaration9Impl_QueryInterface(LPDIRECT3DVERTEXDE
|
|||
|| IsEqualGUID(riid, &IID_IDirect3DVertexDeclaration9)) {
|
||||
IUnknown_AddRef(iface);
|
||||
*ppobj = This;
|
||||
return D3D_OK;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
WARN("(%p)->(%s,%p),not found\n", This, debugstr_guid(riid), ppobj);
|
||||
*ppobj = NULL;
|
||||
return E_NOINTERFACE;
|
||||
}
|
||||
|
||||
|
|
|
@ -32,10 +32,11 @@ HRESULT WINAPI IDirect3DVertexShader9Impl_QueryInterface(LPDIRECT3DVERTEXSHADER9
|
|||
|| IsEqualGUID(riid, &IID_IDirect3DVertexShader9)) {
|
||||
IUnknown_AddRef(iface);
|
||||
*ppobj = This;
|
||||
return D3D_OK;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
WARN("(%p)->(%s,%p),not found\n", This, debugstr_guid(riid), ppobj);
|
||||
*ppobj = NULL;
|
||||
return E_NOINTERFACE;
|
||||
}
|
||||
|
||||
|
|
|
@ -32,10 +32,11 @@ HRESULT WINAPI IDirect3DVolume9Impl_QueryInterface(LPDIRECT3DVOLUME9 iface, REFI
|
|||
|| IsEqualGUID(riid, &IID_IDirect3DVolume9)) {
|
||||
IUnknown_AddRef(iface);
|
||||
*ppobj = This;
|
||||
return D3D_OK;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
WARN("(%p)->(%s,%p),not found\n", This, debugstr_guid(riid), ppobj);
|
||||
*ppobj = NULL;
|
||||
return E_NOINTERFACE;
|
||||
}
|
||||
|
||||
|
|
|
@ -34,10 +34,11 @@ HRESULT WINAPI IDirect3DVolumeTexture9Impl_QueryInterface(LPDIRECT3DVOLUMETEXTUR
|
|||
|| IsEqualGUID(riid, &IID_IDirect3DVolumeTexture9)) {
|
||||
IUnknown_AddRef(iface);
|
||||
*ppobj = This;
|
||||
return D3D_OK;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
WARN("(%p)->(%s,%p),not found\n", This, debugstr_guid(riid), ppobj);
|
||||
*ppobj = NULL;
|
||||
return E_NOINTERFACE;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue