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

dmstyle: Implement IDirectMusicStyle8_EnumMotif().

parent e4e3c0b4
...@@ -158,11 +158,36 @@ static HRESULT WINAPI IDirectMusicStyle8Impl_GetDefaultBand(IDirectMusicStyle8 * ...@@ -158,11 +158,36 @@ static HRESULT WINAPI IDirectMusicStyle8Impl_GetDefaultBand(IDirectMusicStyle8 *
return S_OK; return S_OK;
} }
static HRESULT WINAPI IDirectMusicStyle8Impl_EnumMotif(IDirectMusicStyle8 *iface, DWORD dwIndex, static HRESULT WINAPI IDirectMusicStyle8Impl_EnumMotif(IDirectMusicStyle8 *iface, DWORD index,
WCHAR *pwszName) WCHAR *name)
{ {
IDirectMusicStyle8Impl *This = impl_from_IDirectMusicStyle8(iface); IDirectMusicStyle8Impl *This = impl_from_IDirectMusicStyle8(iface);
FIXME("(%p, %d, %p): stub\n", This, dwIndex, pwszName); const struct style_motif *motif = NULL;
const struct list *cursor;
unsigned int i = 0;
TRACE("(%p, %u, %p)\n", This, index, name);
if (!name)
return E_POINTER;
/* index is zero based */
LIST_FOR_EACH(cursor, &This->motifs) {
if (i == index) {
motif = LIST_ENTRY(cursor, struct style_motif, entry);
break;
}
i++;
}
if (!motif)
return S_FALSE;
if (motif->desc.dwValidData & DMUS_OBJ_NAME)
lstrcpynW(name, motif->desc.wszName, DMUS_MAX_NAME);
else
name[0] = 0;
TRACE("returning name: %s\n", debugstr_w(name));
return S_OK; return S_OK;
} }
......
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