dmusic: Simplify the IDirectMusicPort_QueryInterface implementation.
Signed-off-by: Michael Stefaniuc <mstefani@redhat.de> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
1dc5cc3470
commit
ca87c49390
|
@ -130,23 +130,21 @@ static HRESULT WINAPI SynthPortImpl_IDirectMusicPort_QueryInterface(LPDIRECTMUSI
|
||||||
|
|
||||||
TRACE("(%p/%p)->(%s, %p)\n", iface, This, debugstr_dmguid(riid), ret_iface);
|
TRACE("(%p/%p)->(%s, %p)\n", iface, This, debugstr_dmguid(riid), ret_iface);
|
||||||
|
|
||||||
if (IsEqualIID(riid, &IID_IUnknown) || IsEqualGUID(riid, &IID_IDirectMusicPort)) {
|
if (IsEqualIID(riid, &IID_IUnknown) || IsEqualGUID(riid, &IID_IDirectMusicPort))
|
||||||
*ret_iface = &This->IDirectMusicPort_iface;
|
*ret_iface = &This->IDirectMusicPort_iface;
|
||||||
IDirectMusicPort_AddRef((LPDIRECTMUSICPORT)*ret_iface);
|
else if (IsEqualGUID(riid, &IID_IDirectMusicPortDownload))
|
||||||
return S_OK;
|
|
||||||
} else if (IsEqualGUID(riid, &IID_IDirectMusicPortDownload)) {
|
|
||||||
*ret_iface = &This->IDirectMusicPortDownload_iface;
|
*ret_iface = &This->IDirectMusicPortDownload_iface;
|
||||||
IDirectMusicPortDownload_AddRef((LPDIRECTMUSICPORTDOWNLOAD)*ret_iface);
|
else if (IsEqualGUID(riid, &IID_IDirectMusicThru))
|
||||||
return S_OK;
|
|
||||||
} else if (IsEqualGUID(riid, &IID_IDirectMusicThru)) {
|
|
||||||
*ret_iface = &This->IDirectMusicThru_iface;
|
*ret_iface = &This->IDirectMusicThru_iface;
|
||||||
IDirectMusicThru_AddRef((LPDIRECTMUSICTHRU)*ret_iface);
|
else {
|
||||||
return S_OK;
|
WARN("(%p, %s, %p): not found\n", This, debugstr_dmguid(riid), ret_iface);
|
||||||
|
*ret_iface = NULL;
|
||||||
|
return E_NOINTERFACE;
|
||||||
}
|
}
|
||||||
|
|
||||||
WARN("(%p, %s, %p): not found\n", This, debugstr_dmguid(riid), ret_iface);
|
IUnknown_AddRef((IUnknown*)*ret_iface);
|
||||||
|
|
||||||
return E_NOINTERFACE;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static ULONG WINAPI SynthPortImpl_IDirectMusicPort_AddRef(LPDIRECTMUSICPORT iface)
|
static ULONG WINAPI SynthPortImpl_IDirectMusicPort_AddRef(LPDIRECTMUSICPORT iface)
|
||||||
|
|
Loading…
Reference in New Issue