Commit 8e6a15ff authored by Michael Stefaniuc's avatar Michael Stefaniuc Committed by Alexandre Julliard

dmstyle: COM cleanup for IDirectMusicStyle8.

parent 37700216
...@@ -105,7 +105,7 @@ typedef struct _DMUS_PRIVATE_STYLE_ITEM { ...@@ -105,7 +105,7 @@ typedef struct _DMUS_PRIVATE_STYLE_ITEM {
struct IDirectMusicStyle8Impl { struct IDirectMusicStyle8Impl {
/* IUnknown fields */ /* IUnknown fields */
const IUnknownVtbl *UnknownVtbl; const IUnknownVtbl *UnknownVtbl;
const IDirectMusicStyle8Vtbl *StyleVtbl; IDirectMusicStyle8 IDirectMusicStyle8_iface;
const IDirectMusicObjectVtbl *ObjectVtbl; const IDirectMusicObjectVtbl *ObjectVtbl;
const IPersistStreamVtbl *PersistStreamVtbl; const IPersistStreamVtbl *PersistStreamVtbl;
LONG ref; LONG ref;
......
...@@ -26,6 +26,11 @@ WINE_DECLARE_DEBUG_CHANNEL(dmfile); ...@@ -26,6 +26,11 @@ WINE_DECLARE_DEBUG_CHANNEL(dmfile);
/***************************************************************************** /*****************************************************************************
* IDirectMusicStyleImpl implementation * IDirectMusicStyleImpl implementation
*/ */
static inline IDirectMusicStyle8Impl *impl_from_IDirectMusicStyle8(IDirectMusicStyle8 *iface)
{
return CONTAINING_RECORD(iface, IDirectMusicStyle8Impl, IDirectMusicStyle8_iface);
}
/* IDirectMusicStyleImpl IUnknown part: */ /* IDirectMusicStyleImpl IUnknown part: */
static HRESULT WINAPI IDirectMusicStyle8Impl_IUnknown_QueryInterface (LPUNKNOWN iface, REFIID riid, LPVOID *ppobj) { static HRESULT WINAPI IDirectMusicStyle8Impl_IUnknown_QueryInterface (LPUNKNOWN iface, REFIID riid, LPVOID *ppobj) {
ICOM_THIS_MULTI(IDirectMusicStyle8Impl, UnknownVtbl, iface); ICOM_THIS_MULTI(IDirectMusicStyle8Impl, UnknownVtbl, iface);
...@@ -37,8 +42,8 @@ static HRESULT WINAPI IDirectMusicStyle8Impl_IUnknown_QueryInterface (LPUNKNOWN ...@@ -37,8 +42,8 @@ static HRESULT WINAPI IDirectMusicStyle8Impl_IUnknown_QueryInterface (LPUNKNOWN
return S_OK; return S_OK;
} else if (IsEqualIID(riid, &IID_IDirectMusicStyle) || } else if (IsEqualIID(riid, &IID_IDirectMusicStyle) ||
IsEqualIID(riid, &IID_IDirectMusicStyle8)) { IsEqualIID(riid, &IID_IDirectMusicStyle8)) {
*ppobj = &This->StyleVtbl; *ppobj = &This->IDirectMusicStyle8_iface;
IDirectMusicStyle8_AddRef((LPDIRECTMUSICSTYLE8)&This->StyleVtbl); IDirectMusicStyle8_AddRef(&This->IDirectMusicStyle8_iface);
return S_OK; return S_OK;
} else if (IsEqualIID (riid, &IID_IDirectMusicObject)) { } else if (IsEqualIID (riid, &IID_IDirectMusicObject)) {
*ppobj = &This->ObjectVtbl; *ppobj = &This->ObjectVtbl;
...@@ -90,19 +95,19 @@ static const IUnknownVtbl DirectMusicStyle8_Unknown_Vtbl = { ...@@ -90,19 +95,19 @@ static const IUnknownVtbl DirectMusicStyle8_Unknown_Vtbl = {
static HRESULT WINAPI IDirectMusicStyle8Impl_QueryInterface(IDirectMusicStyle8 *iface, REFIID riid, static HRESULT WINAPI IDirectMusicStyle8Impl_QueryInterface(IDirectMusicStyle8 *iface, REFIID riid,
void **ppobj) void **ppobj)
{ {
ICOM_THIS_MULTI(IDirectMusicStyle8Impl, StyleVtbl, iface); IDirectMusicStyle8Impl *This = impl_from_IDirectMusicStyle8(iface);
return IDirectMusicStyle8Impl_IUnknown_QueryInterface ((LPUNKNOWN)&This->UnknownVtbl, riid, ppobj); return IDirectMusicStyle8Impl_IUnknown_QueryInterface ((LPUNKNOWN)&This->UnknownVtbl, riid, ppobj);
} }
static ULONG WINAPI IDirectMusicStyle8Impl_AddRef(IDirectMusicStyle8 *iface) static ULONG WINAPI IDirectMusicStyle8Impl_AddRef(IDirectMusicStyle8 *iface)
{ {
ICOM_THIS_MULTI(IDirectMusicStyle8Impl, StyleVtbl, iface); IDirectMusicStyle8Impl *This = impl_from_IDirectMusicStyle8(iface);
return IDirectMusicStyle8Impl_IUnknown_AddRef ((LPUNKNOWN)&This->UnknownVtbl); return IDirectMusicStyle8Impl_IUnknown_AddRef ((LPUNKNOWN)&This->UnknownVtbl);
} }
static ULONG WINAPI IDirectMusicStyle8Impl_Release(IDirectMusicStyle8 *iface) static ULONG WINAPI IDirectMusicStyle8Impl_Release(IDirectMusicStyle8 *iface)
{ {
ICOM_THIS_MULTI(IDirectMusicStyle8Impl, StyleVtbl, iface); IDirectMusicStyle8Impl *This = impl_from_IDirectMusicStyle8(iface);
return IDirectMusicStyle8Impl_IUnknown_Release ((LPUNKNOWN)&This->UnknownVtbl); return IDirectMusicStyle8Impl_IUnknown_Release ((LPUNKNOWN)&This->UnknownVtbl);
} }
...@@ -110,7 +115,7 @@ static ULONG WINAPI IDirectMusicStyle8Impl_Release(IDirectMusicStyle8 *iface) ...@@ -110,7 +115,7 @@ static ULONG WINAPI IDirectMusicStyle8Impl_Release(IDirectMusicStyle8 *iface)
static HRESULT WINAPI IDirectMusicStyle8Impl_GetBand(IDirectMusicStyle8 *iface, WCHAR *pwszName, static HRESULT WINAPI IDirectMusicStyle8Impl_GetBand(IDirectMusicStyle8 *iface, WCHAR *pwszName,
IDirectMusicBand **ppBand) IDirectMusicBand **ppBand)
{ {
ICOM_THIS_MULTI(IDirectMusicStyle8Impl, StyleVtbl, iface); IDirectMusicStyle8Impl *This = impl_from_IDirectMusicStyle8(iface);
FIXME("(%p, %p, %p): stub\n", This, pwszName, ppBand); FIXME("(%p, %p, %p): stub\n", This, pwszName, ppBand);
return S_OK; return S_OK;
} }
...@@ -118,7 +123,7 @@ static HRESULT WINAPI IDirectMusicStyle8Impl_GetBand(IDirectMusicStyle8 *iface, ...@@ -118,7 +123,7 @@ static HRESULT WINAPI IDirectMusicStyle8Impl_GetBand(IDirectMusicStyle8 *iface,
static HRESULT WINAPI IDirectMusicStyle8Impl_EnumBand(IDirectMusicStyle8 *iface, DWORD dwIndex, static HRESULT WINAPI IDirectMusicStyle8Impl_EnumBand(IDirectMusicStyle8 *iface, DWORD dwIndex,
WCHAR *pwszName) WCHAR *pwszName)
{ {
ICOM_THIS_MULTI(IDirectMusicStyle8Impl, StyleVtbl, iface); IDirectMusicStyle8Impl *This = impl_from_IDirectMusicStyle8(iface);
FIXME("(%p, %d, %p): stub\n", This, dwIndex, pwszName); FIXME("(%p, %d, %p): stub\n", This, dwIndex, pwszName);
return S_OK; return S_OK;
} }
...@@ -126,7 +131,7 @@ static HRESULT WINAPI IDirectMusicStyle8Impl_EnumBand(IDirectMusicStyle8 *iface, ...@@ -126,7 +131,7 @@ static HRESULT WINAPI IDirectMusicStyle8Impl_EnumBand(IDirectMusicStyle8 *iface,
static HRESULT WINAPI IDirectMusicStyle8Impl_GetDefaultBand(IDirectMusicStyle8 *iface, static HRESULT WINAPI IDirectMusicStyle8Impl_GetDefaultBand(IDirectMusicStyle8 *iface,
IDirectMusicBand **ppBand) IDirectMusicBand **ppBand)
{ {
ICOM_THIS_MULTI(IDirectMusicStyle8Impl, StyleVtbl, iface); IDirectMusicStyle8Impl *This = impl_from_IDirectMusicStyle8(iface);
FIXME("(%p, %p): stub\n", This, ppBand); FIXME("(%p, %p): stub\n", This, ppBand);
return S_OK; return S_OK;
} }
...@@ -134,7 +139,7 @@ static HRESULT WINAPI IDirectMusicStyle8Impl_GetDefaultBand(IDirectMusicStyle8 * ...@@ -134,7 +139,7 @@ static HRESULT WINAPI IDirectMusicStyle8Impl_GetDefaultBand(IDirectMusicStyle8 *
static HRESULT WINAPI IDirectMusicStyle8Impl_EnumMotif(IDirectMusicStyle8 *iface, DWORD dwIndex, static HRESULT WINAPI IDirectMusicStyle8Impl_EnumMotif(IDirectMusicStyle8 *iface, DWORD dwIndex,
WCHAR *pwszName) WCHAR *pwszName)
{ {
ICOM_THIS_MULTI(IDirectMusicStyle8Impl, StyleVtbl, iface); IDirectMusicStyle8Impl *This = impl_from_IDirectMusicStyle8(iface);
FIXME("(%p, %d, %p): stub\n", This, dwIndex, pwszName); FIXME("(%p, %d, %p): stub\n", This, dwIndex, pwszName);
return S_OK; return S_OK;
} }
...@@ -142,7 +147,7 @@ static HRESULT WINAPI IDirectMusicStyle8Impl_EnumMotif(IDirectMusicStyle8 *iface ...@@ -142,7 +147,7 @@ static HRESULT WINAPI IDirectMusicStyle8Impl_EnumMotif(IDirectMusicStyle8 *iface
static HRESULT WINAPI IDirectMusicStyle8Impl_GetMotif(IDirectMusicStyle8 *iface, WCHAR *pwszName, static HRESULT WINAPI IDirectMusicStyle8Impl_GetMotif(IDirectMusicStyle8 *iface, WCHAR *pwszName,
IDirectMusicSegment **ppSegment) IDirectMusicSegment **ppSegment)
{ {
ICOM_THIS_MULTI(IDirectMusicStyle8Impl, StyleVtbl, iface); IDirectMusicStyle8Impl *This = impl_from_IDirectMusicStyle8(iface);
FIXME("(%p, %p, %p): stub\n", This, pwszName, ppSegment); FIXME("(%p, %p, %p): stub\n", This, pwszName, ppSegment);
return S_OK; return S_OK;
} }
...@@ -150,7 +155,7 @@ static HRESULT WINAPI IDirectMusicStyle8Impl_GetMotif(IDirectMusicStyle8 *iface, ...@@ -150,7 +155,7 @@ static HRESULT WINAPI IDirectMusicStyle8Impl_GetMotif(IDirectMusicStyle8 *iface,
static HRESULT WINAPI IDirectMusicStyle8Impl_GetDefaultChordMap(IDirectMusicStyle8 *iface, static HRESULT WINAPI IDirectMusicStyle8Impl_GetDefaultChordMap(IDirectMusicStyle8 *iface,
IDirectMusicChordMap **ppChordMap) IDirectMusicChordMap **ppChordMap)
{ {
ICOM_THIS_MULTI(IDirectMusicStyle8Impl, StyleVtbl, iface); IDirectMusicStyle8Impl *This = impl_from_IDirectMusicStyle8(iface);
FIXME("(%p, %p): stub\n", This, ppChordMap); FIXME("(%p, %p): stub\n", This, ppChordMap);
return S_OK; return S_OK;
} }
...@@ -158,7 +163,7 @@ static HRESULT WINAPI IDirectMusicStyle8Impl_GetDefaultChordMap(IDirectMusicStyl ...@@ -158,7 +163,7 @@ static HRESULT WINAPI IDirectMusicStyle8Impl_GetDefaultChordMap(IDirectMusicStyl
static HRESULT WINAPI IDirectMusicStyle8Impl_EnumChordMap(IDirectMusicStyle8 *iface, DWORD dwIndex, static HRESULT WINAPI IDirectMusicStyle8Impl_EnumChordMap(IDirectMusicStyle8 *iface, DWORD dwIndex,
WCHAR *pwszName) WCHAR *pwszName)
{ {
ICOM_THIS_MULTI(IDirectMusicStyle8Impl, StyleVtbl, iface); IDirectMusicStyle8Impl *This = impl_from_IDirectMusicStyle8(iface);
FIXME("(%p, %d, %p): stub\n", This, dwIndex, pwszName); FIXME("(%p, %d, %p): stub\n", This, dwIndex, pwszName);
return S_OK; return S_OK;
} }
...@@ -166,7 +171,7 @@ static HRESULT WINAPI IDirectMusicStyle8Impl_EnumChordMap(IDirectMusicStyle8 *if ...@@ -166,7 +171,7 @@ static HRESULT WINAPI IDirectMusicStyle8Impl_EnumChordMap(IDirectMusicStyle8 *if
static HRESULT WINAPI IDirectMusicStyle8Impl_GetChordMap(IDirectMusicStyle8 *iface, WCHAR *pwszName, static HRESULT WINAPI IDirectMusicStyle8Impl_GetChordMap(IDirectMusicStyle8 *iface, WCHAR *pwszName,
IDirectMusicChordMap **ppChordMap) IDirectMusicChordMap **ppChordMap)
{ {
ICOM_THIS_MULTI(IDirectMusicStyle8Impl, StyleVtbl, iface); IDirectMusicStyle8Impl *This = impl_from_IDirectMusicStyle8(iface);
FIXME("(%p, %p, %p): stub\n", This, pwszName, ppChordMap); FIXME("(%p, %p, %p): stub\n", This, pwszName, ppChordMap);
return S_OK; return S_OK;
} }
...@@ -174,7 +179,7 @@ static HRESULT WINAPI IDirectMusicStyle8Impl_GetChordMap(IDirectMusicStyle8 *ifa ...@@ -174,7 +179,7 @@ static HRESULT WINAPI IDirectMusicStyle8Impl_GetChordMap(IDirectMusicStyle8 *ifa
static HRESULT WINAPI IDirectMusicStyle8Impl_GetTimeSignature(IDirectMusicStyle8 *iface, static HRESULT WINAPI IDirectMusicStyle8Impl_GetTimeSignature(IDirectMusicStyle8 *iface,
DMUS_TIMESIGNATURE *pTimeSig) DMUS_TIMESIGNATURE *pTimeSig)
{ {
ICOM_THIS_MULTI(IDirectMusicStyle8Impl, StyleVtbl, iface); IDirectMusicStyle8Impl *This = impl_from_IDirectMusicStyle8(iface);
FIXME("(%p, %p): stub\n", This, pTimeSig); FIXME("(%p, %p): stub\n", This, pTimeSig);
return S_OK; return S_OK;
} }
...@@ -182,14 +187,14 @@ static HRESULT WINAPI IDirectMusicStyle8Impl_GetTimeSignature(IDirectMusicStyle8 ...@@ -182,14 +187,14 @@ static HRESULT WINAPI IDirectMusicStyle8Impl_GetTimeSignature(IDirectMusicStyle8
static HRESULT WINAPI IDirectMusicStyle8Impl_GetEmbellishmentLength(IDirectMusicStyle8 *iface, static HRESULT WINAPI IDirectMusicStyle8Impl_GetEmbellishmentLength(IDirectMusicStyle8 *iface,
DWORD dwType, DWORD dwLevel, DWORD *pdwMin, DWORD *pdwMax) DWORD dwType, DWORD dwLevel, DWORD *pdwMin, DWORD *pdwMax)
{ {
ICOM_THIS_MULTI(IDirectMusicStyle8Impl, StyleVtbl, iface); IDirectMusicStyle8Impl *This = impl_from_IDirectMusicStyle8(iface);
FIXME("(%p, %d, %d, %p, %p): stub\n", This, dwType, dwLevel, pdwMin, pdwMax); FIXME("(%p, %d, %d, %p, %p): stub\n", This, dwType, dwLevel, pdwMin, pdwMax);
return S_OK; return S_OK;
} }
static HRESULT WINAPI IDirectMusicStyle8Impl_GetTempo(IDirectMusicStyle8 *iface, double *pTempo) static HRESULT WINAPI IDirectMusicStyle8Impl_GetTempo(IDirectMusicStyle8 *iface, double *pTempo)
{ {
ICOM_THIS_MULTI(IDirectMusicStyle8Impl, StyleVtbl, iface); IDirectMusicStyle8Impl *This = impl_from_IDirectMusicStyle8(iface);
FIXME("(%p, %p): stub\n", This, pTempo); FIXME("(%p, %p): stub\n", This, pTempo);
return S_OK; return S_OK;
} }
...@@ -197,12 +202,12 @@ static HRESULT WINAPI IDirectMusicStyle8Impl_GetTempo(IDirectMusicStyle8 *iface, ...@@ -197,12 +202,12 @@ static HRESULT WINAPI IDirectMusicStyle8Impl_GetTempo(IDirectMusicStyle8 *iface,
static HRESULT WINAPI IDirectMusicStyle8Impl_EnumPattern(IDirectMusicStyle8 *iface, DWORD dwIndex, static HRESULT WINAPI IDirectMusicStyle8Impl_EnumPattern(IDirectMusicStyle8 *iface, DWORD dwIndex,
DWORD dwPatternType, WCHAR *pwszName) DWORD dwPatternType, WCHAR *pwszName)
{ {
ICOM_THIS_MULTI(IDirectMusicStyle8Impl, StyleVtbl, iface); IDirectMusicStyle8Impl *This = impl_from_IDirectMusicStyle8(iface);
FIXME("(%p, %d, %d, %p): stub\n", This, dwIndex, dwPatternType, pwszName); FIXME("(%p, %d, %d, %p): stub\n", This, dwIndex, dwPatternType, pwszName);
return S_OK; return S_OK;
} }
static const IDirectMusicStyle8Vtbl DirectMusicStyle8_Style_Vtbl = { static const IDirectMusicStyle8Vtbl dmstyle8_vtbl = {
IDirectMusicStyle8Impl_QueryInterface, IDirectMusicStyle8Impl_QueryInterface,
IDirectMusicStyle8Impl_AddRef, IDirectMusicStyle8Impl_AddRef,
IDirectMusicStyle8Impl_Release, IDirectMusicStyle8Impl_Release,
...@@ -1115,7 +1120,7 @@ HRESULT WINAPI create_dmstyle(REFIID lpcGUID, void **ppobj) ...@@ -1115,7 +1120,7 @@ HRESULT WINAPI create_dmstyle(REFIID lpcGUID, void **ppobj)
return E_OUTOFMEMORY; return E_OUTOFMEMORY;
} }
obj->UnknownVtbl = &DirectMusicStyle8_Unknown_Vtbl; obj->UnknownVtbl = &DirectMusicStyle8_Unknown_Vtbl;
obj->StyleVtbl = &DirectMusicStyle8_Style_Vtbl; obj->IDirectMusicStyle8_iface.lpVtbl = &dmstyle8_vtbl;
obj->ObjectVtbl = &DirectMusicStyle8_Object_Vtbl; obj->ObjectVtbl = &DirectMusicStyle8_Object_Vtbl;
obj->PersistStreamVtbl = &DirectMusicStyle8_PersistStream_Vtbl; obj->PersistStreamVtbl = &DirectMusicStyle8_PersistStream_Vtbl;
obj->pDesc = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(DMUS_OBJECTDESC)); obj->pDesc = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(DMUS_OBJECTDESC));
......
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