diff --git a/dlls/dmstyle/styletrack.c b/dlls/dmstyle/styletrack.c index cc15bd81d12..06fe1c7ca88 100644 --- a/dlls/dmstyle/styletrack.c +++ b/dlls/dmstyle/styletrack.c @@ -132,15 +132,31 @@ static HRESULT WINAPI style_track_Play(IDirectMusicTrack8 *iface, void *pStateDa return S_OK; } -static HRESULT WINAPI style_track_GetParam(IDirectMusicTrack8 *iface, REFGUID rguidType, - MUSIC_TIME mtTime, MUSIC_TIME *pmtNext, void *pParam) +static HRESULT WINAPI style_track_GetParam(IDirectMusicTrack8 *iface, REFGUID type, + MUSIC_TIME time, MUSIC_TIME *next, void *param) { IDirectMusicStyleTrack *This = impl_from_IDirectMusicTrack8(iface); - FIXME("(%p, %s, %d, %p, %p): stub\n", This, debugstr_dmguid(rguidType), mtTime, pmtNext, pParam); + struct list *item = NULL; - if (!rguidType) + FIXME("(%p, %s, %d, %p, %p): stub\n", This, debugstr_dmguid(type), time, next, param); + + if (!type) return E_POINTER; + if (IsEqualGUID(&GUID_IDirectMusicStyle, type)) { + LIST_FOR_EACH (item, &This->Items) { + DMUS_PRIVATE_STYLE_ITEM *style = LIST_ENTRY(item, DMUS_PRIVATE_STYLE_ITEM, entry); + if (style->pObject) { + IDirectMusicStyle8_AddRef(style->pObject); + *((IDirectMusicStyle8**)param) = style->pObject; + + return S_OK; + } + } + + return DMUS_E_NOT_FOUND; + } + return S_OK; }