Commit ca87c493 authored by Michael Stefaniuc's avatar Michael Stefaniuc Committed by Alexandre Julliard

dmusic: Simplify the IDirectMusicPort_QueryInterface implementation.

parent 1dc5cc34
......@@ -130,23 +130,21 @@ static HRESULT WINAPI SynthPortImpl_IDirectMusicPort_QueryInterface(LPDIRECTMUSI
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;
IDirectMusicPort_AddRef((LPDIRECTMUSICPORT)*ret_iface);
return S_OK;
} else if (IsEqualGUID(riid, &IID_IDirectMusicPortDownload)) {
else if (IsEqualGUID(riid, &IID_IDirectMusicPortDownload))
*ret_iface = &This->IDirectMusicPortDownload_iface;
IDirectMusicPortDownload_AddRef((LPDIRECTMUSICPORTDOWNLOAD)*ret_iface);
return S_OK;
} else if (IsEqualGUID(riid, &IID_IDirectMusicThru)) {
else if (IsEqualGUID(riid, &IID_IDirectMusicThru))
*ret_iface = &This->IDirectMusicThru_iface;
IDirectMusicThru_AddRef((LPDIRECTMUSICTHRU)*ret_iface);
return S_OK;
else {
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)
......
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