mirror of
git://source.winehq.org/git/wine.git
synced 2024-07-21 20:24:09 +00:00
dmstyle: Implement IDirectMusicStyle8 GetBand.
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com> Signed-off-by: Michael Stefaniuc <mstefani@winehq.org> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
7bb9d62e70
commit
3636779f92
|
@ -134,12 +134,39 @@ static ULONG WINAPI IDirectMusicStyle8Impl_Release(IDirectMusicStyle8 *iface)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* IDirectMusicStyle8Impl IDirectMusicStyle(8) part: */
|
/* IDirectMusicStyle8Impl IDirectMusicStyle(8) part: */
|
||||||
static HRESULT WINAPI IDirectMusicStyle8Impl_GetBand(IDirectMusicStyle8 *iface, WCHAR *pwszName,
|
static HRESULT WINAPI IDirectMusicStyle8Impl_GetBand(IDirectMusicStyle8 *iface, WCHAR *name,
|
||||||
IDirectMusicBand **ppBand)
|
IDirectMusicBand **band)
|
||||||
{
|
{
|
||||||
IDirectMusicStyle8Impl *This = impl_from_IDirectMusicStyle8(iface);
|
IDirectMusicStyle8Impl *This = impl_from_IDirectMusicStyle8(iface);
|
||||||
FIXME("(%p, %p, %p): stub\n", This, pwszName, ppBand);
|
struct style_band *sband;
|
||||||
return S_OK;
|
HRESULT hr;
|
||||||
|
|
||||||
|
TRACE("(%p, %s, %p)\n", This, debugstr_w(name), band);
|
||||||
|
|
||||||
|
if (!name)
|
||||||
|
return E_POINTER;
|
||||||
|
|
||||||
|
LIST_FOR_EACH_ENTRY(sband, &This->bands, struct style_band, entry) {
|
||||||
|
IDirectMusicObject *obj;
|
||||||
|
|
||||||
|
hr = IDirectMusicBand_QueryInterface(sband->pBand, &IID_IDirectMusicObject, (void**)&obj);
|
||||||
|
if (SUCCEEDED(hr)) {
|
||||||
|
DMUS_OBJECTDESC desc;
|
||||||
|
|
||||||
|
if (IDirectMusicObject_GetDescriptor(obj, &desc) == S_OK) {
|
||||||
|
if (desc.dwValidData & DMUS_OBJ_NAME && !lstrcmpW(name, desc.wszName)) {
|
||||||
|
IDirectMusicObject_Release(obj);
|
||||||
|
IDirectMusicBand_AddRef(sband->pBand);
|
||||||
|
*band = sband->pBand;
|
||||||
|
return S_OK;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
IDirectMusicObject_Release(obj);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return S_FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI IDirectMusicStyle8Impl_EnumBand(IDirectMusicStyle8 *iface, DWORD dwIndex,
|
static HRESULT WINAPI IDirectMusicStyle8Impl_EnumBand(IDirectMusicStyle8 *iface, DWORD dwIndex,
|
||||||
|
|
Loading…
Reference in a new issue