Commit 6894f384 authored by Christian Costa's avatar Christian Costa Committed by Alexandre Julliard

dmsynth: Cleanup QueryInterface methods.

parent 91208527
......@@ -34,27 +34,32 @@ static inline IDirectMusicSynth8Impl *impl_from_IDirectMusicSynth8(IDirectMusicS
}
/* IDirectMusicSynth8Impl IUnknown part: */
static HRESULT WINAPI IDirectMusicSynth8Impl_QueryInterface(LPDIRECTMUSICSYNTH8 iface, REFIID riid, LPVOID *ppobj)
static HRESULT WINAPI IDirectMusicSynth8Impl_QueryInterface(LPDIRECTMUSICSYNTH8 iface, REFIID riid, LPVOID *ret_iface)
{
IDirectMusicSynth8Impl *This = impl_from_IDirectMusicSynth8(iface);
IDirectMusicSynth8Impl *This = impl_from_IDirectMusicSynth8(iface);
TRACE("(%p, %s, %p)\n", This, debugstr_dmguid(riid), ppobj);
TRACE("(%p)->(%s, %p)\n", iface, debugstr_dmguid(riid), ret_iface);
if (IsEqualIID (riid, &IID_IUnknown) ||
IsEqualIID (riid, &IID_IDirectMusicSynth) ||
IsEqualIID (riid, &IID_IDirectMusicSynth8)) {
IUnknown_AddRef(iface);
*ppobj = This;
return S_OK;
}
else if (IsEqualIID(riid, &IID_IKsControl)) {
IUnknown_AddRef(iface);
*ppobj = &This->IKsControl_iface;
return S_OK;
if (IsEqualIID (riid, &IID_IUnknown) ||
IsEqualIID (riid, &IID_IDirectMusicSynth) ||
IsEqualIID (riid, &IID_IDirectMusicSynth8))
{
IUnknown_AddRef(iface);
*ret_iface = iface;
return S_OK;
}
else if (IsEqualIID(riid, &IID_IKsControl))
{
IUnknown_AddRef(iface);
*ret_iface = &This->IKsControl_iface;
return S_OK;
}
WARN("(%p, %s, %p): not found\n", This, debugstr_dmguid(riid), ppobj);
return E_NOINTERFACE;
*ret_iface = NULL;
WARN("(%p)->(%s, %p): not found\n", iface, debugstr_dmguid(riid), ret_iface);
return E_NOINTERFACE;
}
static ULONG WINAPI IDirectMusicSynth8Impl_AddRef(LPDIRECTMUSICSYNTH8 iface)
......
......@@ -30,25 +30,31 @@ static inline IDirectMusicSynthSinkImpl *impl_from_IDirectMusicSynthSink(IDirect
}
/* IDirectMusicSynthSinkImpl IUnknown part: */
static HRESULT WINAPI IDirectMusicSynthSinkImpl_QueryInterface(LPDIRECTMUSICSYNTHSINK iface, REFIID riid, LPVOID *ppobj)
static HRESULT WINAPI IDirectMusicSynthSinkImpl_QueryInterface(LPDIRECTMUSICSYNTHSINK iface, REFIID riid, LPVOID *ret_iface)
{
IDirectMusicSynthSinkImpl *This = impl_from_IDirectMusicSynthSink(iface);
TRACE("(%p, %s, %p)\n", This, debugstr_dmguid(riid), ppobj);
if (IsEqualIID (riid, &IID_IUnknown) ||
IsEqualIID (riid, &IID_IDirectMusicSynthSink)) {
IUnknown_AddRef(iface);
*ppobj = This;
return S_OK;
}
else if (IsEqualIID(riid, &IID_IKsControl)) {
IUnknown_AddRef(iface);
*ppobj = &This->IKsControl_iface;
return S_OK;
IDirectMusicSynthSinkImpl *This = impl_from_IDirectMusicSynthSink(iface);
TRACE("(%p)->(%s, %p)\n", iface, debugstr_dmguid(riid), ret_iface);
if (IsEqualIID (riid, &IID_IUnknown) ||
IsEqualIID (riid, &IID_IDirectMusicSynthSink))
{
IUnknown_AddRef(iface);
*ret_iface = iface;
return S_OK;
}
else if (IsEqualIID(riid, &IID_IKsControl))
{
IUnknown_AddRef(iface);
*ret_iface = &This->IKsControl_iface;
return S_OK;
}
*ret_iface = NULL;
WARN("(%p)->(%s, %p): not found\n", iface, debugstr_dmguid(riid), ret_iface);
WARN("(%p, %s, %p): not found\n", This, debugstr_dmguid(riid), ppobj);
return E_NOINTERFACE;
return E_NOINTERFACE;
}
static ULONG WINAPI IDirectMusicSynthSinkImpl_AddRef(LPDIRECTMUSICSYNTHSINK iface)
......
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