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(dmime
);
31 /* IDirectMusicTool8 IUnknown part: */
32 HRESULT WINAPI
IDirectMusicTool8Impl_QueryInterface (LPDIRECTMUSICTOOL8 iface
, REFIID riid
, LPVOID
*ppobj
)
34 ICOM_THIS(IDirectMusicTool8Impl
,iface
);
36 if (IsEqualIID (riid
, &IID_IUnknown
) ||
37 IsEqualIID (riid
, &IID_IDirectMusicTool
) ||
38 IsEqualIID (riid
, &IID_IDirectMusicTool8
)) {
39 IDirectMusicTool8Impl_AddRef(iface
);
43 WARN("(%p)->(%s,%p),not found\n", This
, debugstr_guid(riid
), ppobj
);
47 ULONG WINAPI
IDirectMusicTool8Impl_AddRef (LPDIRECTMUSICTOOL8 iface
)
49 ICOM_THIS(IDirectMusicTool8Impl
,iface
);
50 TRACE("(%p) : AddRef from %ld\n", This
, This
->ref
);
54 ULONG WINAPI
IDirectMusicTool8Impl_Release (LPDIRECTMUSICTOOL8 iface
)
56 ICOM_THIS(IDirectMusicTool8Impl
,iface
);
57 ULONG ref
= --This
->ref
;
58 TRACE("(%p) : ReleaseRef to %ld\n", This
, This
->ref
);
60 HeapFree(GetProcessHeap(), 0, This
);
65 /* IDirectMusicTool8 IDirectMusicTool part: */
66 HRESULT WINAPI
IDirectMusicTool8Impl_Init (LPDIRECTMUSICTOOL8 iface
, IDirectMusicGraph
* pGraph
)
68 ICOM_THIS(IDirectMusicTool8Impl
,iface
);
70 FIXME("(%p, %p): stub\n", This
, pGraph
);
75 HRESULT WINAPI
IDirectMusicTool8Impl_GetMsgDeliveryType (LPDIRECTMUSICTOOL8 iface
, DWORD
* pdwDeliveryType
)
77 ICOM_THIS(IDirectMusicTool8Impl
,iface
);
79 FIXME("(%p, %p): stub\n", This
, pdwDeliveryType
);
84 HRESULT WINAPI
IDirectMusicTool8Impl_GetMediaTypeArraySize (LPDIRECTMUSICTOOL8 iface
, DWORD
* pdwNumElements
)
86 ICOM_THIS(IDirectMusicTool8Impl
,iface
);
88 FIXME("(%p, %p): stub\n", This
, pdwNumElements
);
93 HRESULT WINAPI
IDirectMusicTool8Impl_GetMediaTypes (LPDIRECTMUSICTOOL8 iface
, DWORD
** padwMediaTypes
, DWORD dwNumElements
)
95 ICOM_THIS(IDirectMusicTool8Impl
,iface
);
97 FIXME("(%p, %p, %ld): stub\n", This
, padwMediaTypes
, dwNumElements
);
102 HRESULT WINAPI
IDirectMusicTool8Impl_ProcessPMsg (LPDIRECTMUSICTOOL8 iface
, IDirectMusicPerformance
* pPerf
, DMUS_PMSG
* pPMSG
)
104 ICOM_THIS(IDirectMusicTool8Impl
,iface
);
106 FIXME("(%p, %p, %p): stub\n", This
, pPerf
, pPMSG
);
111 HRESULT WINAPI
IDirectMusicTool8Impl_Flush (LPDIRECTMUSICTOOL8 iface
, IDirectMusicPerformance
* pPerf
, DMUS_PMSG
* pPMSG
, REFERENCE_TIME rtTime
)
113 ICOM_THIS(IDirectMusicTool8Impl
,iface
);
115 FIXME("(%p, %p, %p, %lli): stub\n", This
, pPerf
, pPMSG
, rtTime
);
120 /* IDirectMusicTool8 IDirectMusicTool8 part: */
121 HRESULT WINAPI
IDirectMusicTool8Impl_Clone (LPDIRECTMUSICTOOL8 iface
, IDirectMusicTool
** ppTool
)
123 ICOM_THIS(IDirectMusicTool8Impl
,iface
);
125 FIXME("(%p, %p): stub\n", This
, ppTool
);
130 ICOM_VTABLE(IDirectMusicTool8
) DirectMusicTool8_Vtbl
=
132 ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
133 IDirectMusicTool8Impl_QueryInterface
,
134 IDirectMusicTool8Impl_AddRef
,
135 IDirectMusicTool8Impl_Release
,
136 IDirectMusicTool8Impl_Init
,
137 IDirectMusicTool8Impl_GetMsgDeliveryType
,
138 IDirectMusicTool8Impl_GetMediaTypeArraySize
,
139 IDirectMusicTool8Impl_GetMediaTypes
,
140 IDirectMusicTool8Impl_ProcessPMsg
,
141 IDirectMusicTool8Impl_Flush
,
142 IDirectMusicTool8Impl_Clone
145 /* for ClassFactory */
146 HRESULT WINAPI
DMUSIC_CreateDirectMusicTool (LPCGUID lpcGUID
, LPDIRECTMUSICTOOL8
*ppDMTool
, LPUNKNOWN pUnkOuter
)
148 if (IsEqualIID (lpcGUID
, &IID_IDirectMusicComposer
)) {
150 return E_NOINTERFACE
;
152 WARN("No interface found\n");
154 return E_NOINTERFACE
;