From: Alistair Leslie-Hughes leslie_alistair@hotmail.com
Signed-off-by: Alistair Leslie-Hughes leslie_alistair@hotmail.com Signed-off-by: Michael Stefaniuc mstefani@winehq.org --- v2: Get rid of the Hungarian notation for a parameter name
dlls/dmime/segtriggertrack.c | 15 +++++++++------ dlls/dmime/tests/dmime.c | 10 ++++++++++ 2 files changed, 19 insertions(+), 6 deletions(-)
diff --git a/dlls/dmime/segtriggertrack.c b/dlls/dmime/segtriggertrack.c index 37d7e46d20..4b3a71c9a4 100644 --- a/dlls/dmime/segtriggertrack.c +++ b/dlls/dmime/segtriggertrack.c @@ -136,14 +136,17 @@ static HRESULT WINAPI segment_track_SetParam(IDirectMusicTrack8 *iface, REFGUID return S_OK; }
-static HRESULT WINAPI segment_track_IsParamSupported(IDirectMusicTrack8 *iface, REFGUID rguidType) +static HRESULT WINAPI segment_track_IsParamSupported(IDirectMusicTrack8 *iface, REFGUID type) { - IDirectMusicSegTriggerTrack *This = impl_from_IDirectMusicTrack8(iface); + IDirectMusicSegTriggerTrack *This = impl_from_IDirectMusicTrack8(iface); + + TRACE("(%p, %s)\n", This, debugstr_dmguid(type)); + + if (IsEqualGUID(type, &GUID_IDirectMusicStyle)) + return S_OK;
- TRACE("(%p, %s)\n", This, debugstr_dmguid(rguidType)); - /* didn't find any params */ - TRACE("param unsupported\n"); - return DMUS_E_TYPE_UNSUPPORTED; + TRACE("param unsupported\n"); + return DMUS_E_TYPE_UNSUPPORTED; }
static HRESULT WINAPI segment_track_AddNotificationType(IDirectMusicTrack8 *iface, diff --git a/dlls/dmime/tests/dmime.c b/dlls/dmime/tests/dmime.c index b7bf542fd8..944a278dbb 100644 --- a/dlls/dmime/tests/dmime.c +++ b/dlls/dmime/tests/dmime.c @@ -565,6 +565,16 @@ static void test_track(void) ok(hr == E_NOTIMPL, "IDirectMusicTrack_SetParam failed: %08x\n", hr); hr = IDirectMusicTrack_IsParamSupported(dmt, NULL); ok(hr == E_NOTIMPL, "IDirectMusicTrack_IsParamSupported failed: %08x\n", hr); + + hr = IDirectMusicTrack_IsParamSupported(dmt, &GUID_IDirectMusicStyle); + ok(hr == E_NOTIMPL, "got: %08x\n", hr); + } + else { + hr = IDirectMusicTrack_IsParamSupported(dmt, &GUID_IDirectMusicStyle); + if (class[i].clsid == &CLSID_DirectMusicSegmentTriggerTrack) + ok(hr == S_OK, "got: %08x\n", hr); + else + ok(hr == DMUS_E_TYPE_UNSUPPORTED, "got: %08x\n", hr); } if (class[i].clsid != &CLSID_DirectMusicMarkerTrack && class[i].clsid != &CLSID_DirectMusicTimeSigTrack) {