diff --git a/dlls/dmsynth/synth.c b/dlls/dmsynth/synth.c index 657f3bda199..e5d5e1c89b9 100644 --- a/dlls/dmsynth/synth.c +++ b/dlls/dmsynth/synth.c @@ -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) diff --git a/dlls/dmsynth/synthsink.c b/dlls/dmsynth/synthsink.c index 42c2d4c3525..a63f36c3961 100644 --- a/dlls/dmsynth/synthsink.c +++ b/dlls/dmsynth/synthsink.c @@ -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)