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.
This commit is contained in:
H. Verbeet 2006-06-07 15:13:29 +02:00 committed by Alexandre Julliard
parent 034fc473ec
commit d06aa8d857
15 changed files with 30 additions and 15 deletions

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}