Commit d06aa8d8 authored by H. Verbeet's avatar H. Verbeet Committed by Alexandre Julliard

d3d8: 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.
parent 034fc473
......@@ -32,11 +32,12 @@ HRESULT WINAPI IDirect3DBaseTexture8Impl_QueryInterface(LPDIRECT3DBASETEXTURE8 i
|| IsEqualGUID(riid, &IID_IDirect3DBaseTexture8)) {
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 IDirect3DCubeTexture8Impl_QueryInterface(LPDIRECT3DCUBETEXTURE8 i
|| IsEqualGUID(riid, &IID_IDirect3DCubeTexture8)) {
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;
}
......
......@@ -45,10 +45,11 @@ HRESULT WINAPI IDirect3DDevice8Impl_QueryInterface(LPDIRECT3DDEVICE8 iface,REFII
|| IsEqualGUID(riid, &IID_IDirect3DDevice8)) {
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;
}
......
......@@ -46,10 +46,11 @@ HRESULT WINAPI IDirect3D8Impl_QueryInterface(LPDIRECT3D8 iface, REFIID riid,LPVO
|| IsEqualGUID(riid, &IID_IDirect3D8)) {
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 IDirect3DIndexBuffer8Impl_QueryInterface(LPDIRECT3DINDEXBUFFER8 i
|| IsEqualGUID(riid, &IID_IDirect3DIndexBuffer8)) {
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 IDirect3DPixelShader8Impl_QueryInterface(IDirect3DPixelShader8 *i
|| IsEqualGUID(riid, &IID_IDirect3DPixelShader8)) {
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;
}
......
......@@ -31,10 +31,11 @@ HRESULT WINAPI IDirect3DResource8Impl_QueryInterface(LPDIRECT3DRESOURCE8 iface,
|| IsEqualGUID(riid, &IID_IDirect3DResource8)) {
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 IDirect3DStateBlock8Impl_QueryInterface(IDirect3DStateBlock8 *ifa
|| IsEqualGUID(riid, &IID_IDirect3DStateBlock8)) {
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 IDirect3DSurface8Impl_QueryInterface(LPDIRECT3DSURFACE8 iface, RE
|| IsEqualGUID(riid, &IID_IDirect3DSurface8)) {
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 IDirect3DSwapChain8Impl_QueryInterface(LPDIRECT3DSWAPCHAIN8 iface
|| IsEqualGUID(riid, &IID_IDirect3DSwapChain8)) {
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 IDirect3DTexture8Impl_QueryInterface(LPDIRECT3DTEXTURE8 iface, RE
|| IsEqualGUID(riid, &IID_IDirect3DTexture8)) {
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,11 +32,12 @@ HRESULT WINAPI IDirect3DVertexBuffer8Impl_QueryInterface(LPDIRECT3DVERTEXBUFFER8
|| IsEqualGUID(riid, &IID_IDirect3DVertexBuffer8)) {
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 IDirect3DVertexShader8Impl_QueryInterface(IDirect3DVertexShader8
|| IsEqualGUID(riid, &IID_IDirect3DVertexShader8)) {
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;
}
......
......@@ -31,10 +31,11 @@ HRESULT WINAPI IDirect3DVolume8Impl_QueryInterface(LPDIRECT3DVOLUME8 iface, REFI
|| IsEqualGUID(riid, &IID_IDirect3DVolume8)) {
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 IDirect3DVolumeTexture8Impl_QueryInterface(LPDIRECT3DVOLUMETEXTUR
|| IsEqualGUID(riid, &IID_IDirect3DVolumeTexture8)) {
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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment