1 /* IDirectMusicTool8 Implementation
3 * Copyright (C) 2003 Rok Mandeljc
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU Library General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
24 #include "wine/debug.h"
26 #include "dmime_private.h"
28 WINE_DEFAULT_DEBUG_CHANNEL(dmusic
);
31 /* IDirectMusicTool8 IUnknown part follow: */
32 HRESULT WINAPI
IDirectMusicTool8Impl_QueryInterface (LPDIRECTMUSICTOOL8 iface
, REFIID riid
, LPVOID
*ppobj
)
34 ICOM_THIS(IDirectMusicTool8Impl
,iface
);
36 if (IsEqualGUID(riid
, &IID_IUnknown
) ||
37 IsEqualGUID(riid
, &IID_IDirectMusicTool
) ||
38 IsEqualGUID(riid
, &IID_IDirectMusicTool8
))
40 IDirectMusicTool8Impl_AddRef(iface
);
44 WARN("(%p)->(%s,%p),not found\n", This
, debugstr_guid(riid
), ppobj
);
48 ULONG WINAPI
IDirectMusicTool8Impl_AddRef (LPDIRECTMUSICTOOL8 iface
)
50 ICOM_THIS(IDirectMusicTool8Impl
,iface
);
51 TRACE("(%p) : AddRef from %ld\n", This
, This
->ref
);
55 ULONG WINAPI
IDirectMusicTool8Impl_Release (LPDIRECTMUSICTOOL8 iface
)
57 ICOM_THIS(IDirectMusicTool8Impl
,iface
);
58 ULONG ref
= --This
->ref
;
59 TRACE("(%p) : ReleaseRef to %ld\n", This
, This
->ref
);
62 HeapFree(GetProcessHeap(), 0, This
);
67 /* IDirectMusicTool Interface follow: */
68 HRESULT WINAPI
IDirectMusicTool8Impl_Init (LPDIRECTMUSICTOOL8 iface
, IDirectMusicGraph
* pGraph
)
70 ICOM_THIS(IDirectMusicTool8Impl
,iface
);
72 FIXME("(%p, %p): stub\n", This
, pGraph
);
77 HRESULT WINAPI
IDirectMusicTool8Impl_GetMsgDeliveryType (LPDIRECTMUSICTOOL8 iface
, DWORD
* pdwDeliveryType
)
79 ICOM_THIS(IDirectMusicTool8Impl
,iface
);
81 FIXME("(%p, %p): stub\n", This
, pdwDeliveryType
);
86 HRESULT WINAPI
IDirectMusicTool8Impl_GetMediaTypeArraySize (LPDIRECTMUSICTOOL8 iface
, DWORD
* pdwNumElements
)
88 ICOM_THIS(IDirectMusicTool8Impl
,iface
);
90 FIXME("(%p, %p): stub\n", This
, pdwNumElements
);
95 HRESULT WINAPI
IDirectMusicTool8Impl_GetMediaTypes (LPDIRECTMUSICTOOL8 iface
, DWORD
** padwMediaTypes
, DWORD dwNumElements
)
97 ICOM_THIS(IDirectMusicTool8Impl
,iface
);
99 FIXME("(%p, %p, %ld): stub\n", This
, padwMediaTypes
, dwNumElements
);
104 HRESULT WINAPI
IDirectMusicTool8Impl_ProcessPMsg (LPDIRECTMUSICTOOL8 iface
, IDirectMusicPerformance
* pPerf
, DMUS_PMSG
* pPMSG
)
106 ICOM_THIS(IDirectMusicTool8Impl
,iface
);
108 FIXME("(%p, %p, %p): stub\n", This
, pPerf
, pPMSG
);
113 HRESULT WINAPI
IDirectMusicTool8Impl_Flush (LPDIRECTMUSICTOOL8 iface
, IDirectMusicPerformance
* pPerf
, DMUS_PMSG
* pPMSG
, REFERENCE_TIME rtTime
)
115 ICOM_THIS(IDirectMusicTool8Impl
,iface
);
117 FIXME("(%p, %p, %p, %lli): stub\n", This
, pPerf
, pPMSG
, rtTime
);
122 /* IDirectMusicTool8 Interface part follow: */
123 HRESULT WINAPI
IDirectMusicTool8Impl_Clone (LPDIRECTMUSICTOOL8 iface
, IDirectMusicTool
** ppTool
)
125 ICOM_THIS(IDirectMusicTool8Impl
,iface
);
127 FIXME("(%p, %p): stub\n", This
, ppTool
);
132 ICOM_VTABLE(IDirectMusicTool8
) DirectMusicTool8_Vtbl
=
134 ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
135 IDirectMusicTool8Impl_QueryInterface
,
136 IDirectMusicTool8Impl_AddRef
,
137 IDirectMusicTool8Impl_Release
,
138 IDirectMusicTool8Impl_Init
,
139 IDirectMusicTool8Impl_GetMsgDeliveryType
,
140 IDirectMusicTool8Impl_GetMediaTypeArraySize
,
141 IDirectMusicTool8Impl_GetMediaTypes
,
142 IDirectMusicTool8Impl_ProcessPMsg
,
143 IDirectMusicTool8Impl_Flush
,
144 IDirectMusicTool8Impl_Clone
147 /* for ClassFactory */
148 HRESULT WINAPI
DMUSIC_CreateDirectMusicTool (LPCGUID lpcGUID
, LPDIRECTMUSICTOOL8
*ppDMTool
, LPUNKNOWN pUnkOuter
)
150 if (IsEqualGUID (lpcGUID
, &IID_IDirectMusicComposer
))
153 return E_NOINTERFACE
;
155 WARN("No interface found\n");
157 return E_NOINTERFACE
;