ddrawex: Don't return a pointer to the implementation in IDirectDrawClassFactoryImpl_QueryInterface().

This commit is contained in:
Henri Verbeet 2012-04-04 20:37:24 +02:00 committed by Alexandre Julliard
parent d8d89887d1
commit 13f483a2a2
1 changed files with 5 additions and 5 deletions

View File

@ -58,19 +58,19 @@ static inline IClassFactoryImpl *impl_from_IClassFactory(IClassFactory *iface)
static HRESULT WINAPI IDirectDrawClassFactoryImpl_QueryInterface(IClassFactory *iface, REFIID riid,
void **obj)
{
IClassFactoryImpl *This = impl_from_IClassFactory(iface);
TRACE("(%p)->(%s,%p)\n", This, debugstr_guid(riid), obj);
TRACE("(%p)->(%s,%p)\n", iface, debugstr_guid(riid), obj);
if (IsEqualGUID(riid, &IID_IUnknown)
|| IsEqualGUID(riid, &IID_IClassFactory))
{
IClassFactory_AddRef(iface);
*obj = This;
*obj = iface;
return S_OK;
}
WARN("(%p)->(%s,%p),not found\n",This,debugstr_guid(riid),obj);
WARN("%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid(riid));
*obj = NULL;
return E_NOINTERFACE;
}