mirror of
https://github.com/reactos/wine.git
synced 2024-11-28 06:00:45 +00:00
dmsynth: Cleanup QueryInterface methods.
This commit is contained in:
parent
9120852797
commit
6894f384f1
@ -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);
|
||||
IDirectMusicSynthSinkImpl *This = impl_from_IDirectMusicSynthSink(iface);
|
||||
|
||||
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;
|
||||
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;
|
||||
}
|
||||
|
||||
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 IDirectMusicSynthSinkImpl_AddRef(LPDIRECTMUSICSYNTHSINK iface)
|
||||
|
Loading…
Reference in New Issue
Block a user