Commit 31bfc380 authored by Christian Costa's avatar Christian Costa Committed by Alexandre Julliard

dmusic: Check return codes and display name from port caps when enumerating microsoft synthetizer.

parent f13806e1
...@@ -138,12 +138,16 @@ static HRESULT WINAPI IDirectMusic8Impl_EnumPort(LPDIRECTMUSIC8 iface, DWORD ind ...@@ -138,12 +138,16 @@ static HRESULT WINAPI IDirectMusic8Impl_EnumPort(LPDIRECTMUSIC8 iface, DWORD ind
if (index == (nb_midi_in + nb_midi_out + 1)) if (index == (nb_midi_in + nb_midi_out + 1))
{ {
IDirectMusicSynth8* synth; IDirectMusicSynth8* synth = NULL;
TRACE("Enumerating port: 'Microsoft Software Synthesizer'\n"); HRESULT hr;
CoCreateInstance(&CLSID_DirectMusicSynth, NULL, CLSCTX_INPROC_SERVER, &IID_IDirectMusicSynth8, (void**)&synth); hr = CoCreateInstance(&CLSID_DirectMusicSynth, NULL, CLSCTX_INPROC_SERVER, &IID_IDirectMusicSynth8, (void**)&synth);
IDirectMusicSynth8_GetPortCaps(synth, port_caps); if (SUCCEEDED(hr))
IDirectMusicSynth8_Release(synth); IDirectMusicSynth8_GetPortCaps(synth, port_caps);
return S_OK; if (SUCCEEDED(hr))
TRACE("Enumerating port: %s\n", debugstr_w(port_caps->wszDescription));
if (synth)
IDirectMusicSynth8_Release(synth);
return hr;
} }
return S_FALSE; return S_FALSE;
......
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