1 /* IReferenceClock Implementation
2 * IDirectMusicThru Implementation
3 * IDirectMusicAudioPath Implementation
4 * IDirectMusicBand Implementation
5 * IDirectMusicSong Implementation
6 * IDirectMusicChordMap Implementation
8 * IDirectMusicContainer
12 * Copyright (C) 2003 Rok Mandeljc
14 * This program is free software; you can redistribute it and/or modify
15 * it under the terms of the GNU General Public License as published by
16 * the Free Software Foundation; either version 2 of the License, or
17 * (at your option) any later version.
19 * This program is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 * GNU Library General Public License for more details.
24 * You should have received a copy of the GNU General Public License
25 * along with this program; if not, write to the Free Software
26 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
33 #include "wine/debug.h"
35 #include "dmusic_private.h"
37 WINE_DEFAULT_DEBUG_CHANNEL(dmusic);
39 /* IReferenceClock IUnknown parts follow: */
40 HRESULT WINAPI IReferenceClockImpl_QueryInterface (LPREFERENCECLOCK iface, REFIID riid, LPVOID *ppobj)
42 ICOM_THIS(IReferenceClockImpl,iface);
44 if (IsEqualGUID(riid, &IID_IUnknown) || IsEqualGUID(riid, &IID_IReferenceClock))
46 IReferenceClockImpl_AddRef(iface);
50 WARN("(%p)->(%s,%p),not found\n",This,debugstr_guid(riid),ppobj);
54 ULONG WINAPI IReferenceClockImpl_AddRef (LPREFERENCECLOCK iface)
56 ICOM_THIS(IReferenceClockImpl,iface);
57 TRACE("(%p) : AddRef from %ld\n", This, This->ref);
61 ULONG WINAPI IReferenceClockImpl_Release (LPREFERENCECLOCK iface)
63 ICOM_THIS(IReferenceClockImpl,iface);
64 ULONG ref = --This->ref;
65 TRACE("(%p) : ReleaseRef to %ld\n", This, This->ref);
68 HeapFree(GetProcessHeap(), 0, This);
73 /* IReferenceClock Interface follow: */
74 HRESULT WINAPI IReferenceClockImpl_GetTime (LPREFERENCECLOCK iface, REFERENCE_TIME* pTime)
80 HRESULT WINAPI IReferenceClockImpl_AdviseTime (LPREFERENCECLOCK iface, REFERENCE_TIME baseTime, REFERENCE_TIME streamTime, HANDLE hEvent, DWORD* pdwAdviseCookie)
86 HRESULT WINAPI IReferenceClockImpl_AdvisePeriodic (LPREFERENCECLOCK iface, REFERENCE_TIME startTime, REFERENCE_TIME periodTime, HANDLE hSemaphore, DWORD* pdwAdviseCookie)
92 HRESULT WINAPI IReferenceClockImpl_Unadvise (LPREFERENCECLOCK iface, DWORD dwAdviseCookie)
98 ICOM_VTABLE(IReferenceClock) ReferenceClock_Vtbl =
100 ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
101 IReferenceClockImpl_QueryInterface,
102 IReferenceClockImpl_AddRef,
103 IReferenceClockImpl_Release,
104 IReferenceClockImpl_GetTime,
105 IReferenceClockImpl_AdviseTime,
106 IReferenceClockImpl_AdvisePeriodic,
107 IReferenceClockImpl_Unadvise
111 /* IDirectMusicThru IUnknown parts follow: */
112 HRESULT WINAPI IDirectMusicThruImpl_QueryInterface (LPDIRECTMUSICTHRU iface, REFIID riid, LPVOID *ppobj)
114 ICOM_THIS(IDirectMusicThruImpl,iface);
116 if (IsEqualGUID(riid, &IID_IUnknown) || IsEqualGUID(riid, &IID_IDirectMusicThru))
118 IDirectMusicThruImpl_AddRef(iface);
122 WARN("(%p)->(%s,%p),not found\n",This,debugstr_guid(riid),ppobj);
123 return E_NOINTERFACE;
126 ULONG WINAPI IDirectMusicThruImpl_AddRef (LPDIRECTMUSICTHRU iface)
128 ICOM_THIS(IDirectMusicThruImpl,iface);
129 TRACE("(%p) : AddRef from %ld\n", This, This->ref);
130 return ++(This->ref);
133 ULONG WINAPI IDirectMusicThruImpl_Release (LPDIRECTMUSICTHRU iface)
135 ICOM_THIS(IDirectMusicThruImpl,iface);
136 ULONG ref = --This->ref;
137 TRACE("(%p) : ReleaseRef to %ld\n", This, This->ref);
140 HeapFree(GetProcessHeap(), 0, This);
145 /* IDirectMusicThru Interface follow: */
146 HRESULT WINAPI IDirectMusicThruImpl_ThruChannel (LPDIRECTMUSICTHRU iface, DWORD dwSourceChannelGroup, DWORD dwSourceChannel, DWORD dwDestinationChannelGroup, DWORD dwDestinationChannel, LPDIRECTMUSICPORT pDestinationPort)
152 ICOM_VTABLE(IDirectMusicThru) DirectMusicThru_Vtbl =
154 ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
155 IDirectMusicThruImpl_QueryInterface,
156 IDirectMusicThruImpl_AddRef,
157 IDirectMusicThruImpl_Release,
158 IDirectMusicThruImpl_ThruChannel
162 /* IDirectMusicAudioPath IUnknown parts follow: */
163 HRESULT WINAPI IDirectMusicAudioPathImpl_QueryInterface (LPDIRECTMUSICAUDIOPATH iface, REFIID riid, LPVOID *ppobj)
165 ICOM_THIS(IDirectMusicAudioPathImpl,iface);
167 if (IsEqualGUID(riid, &IID_IUnknown) || IsEqualGUID(riid, &IID_IDirectMusicAudioPath))
169 IDirectMusicAudioPathImpl_AddRef(iface);
173 WARN("(%p)->(%s,%p),not found\n",This,debugstr_guid(riid),ppobj);
174 return E_NOINTERFACE;
177 ULONG WINAPI IDirectMusicAudioPathImpl_AddRef (LPDIRECTMUSICAUDIOPATH iface)
179 ICOM_THIS(IDirectMusicAudioPathImpl,iface);
180 TRACE("(%p) : AddRef from %ld\n", This, This->ref);
181 return ++(This->ref);
184 ULONG WINAPI IDirectMusicAudioPathImpl_Release (LPDIRECTMUSICAUDIOPATH iface)
186 ICOM_THIS(IDirectMusicAudioPathImpl,iface);
187 ULONG ref = --This->ref;
188 TRACE("(%p) : ReleaseRef to %ld\n", This, This->ref);
191 HeapFree(GetProcessHeap(), 0, This);
196 /* IDirectMusicAudioPath Interface follow: */
197 HRESULT WINAPI IDirectMusicAudioPathImpl_GetObjectInPath (LPDIRECTMUSICAUDIOPATH iface, DWORD dwPChannel, DWORD dwStage, DWORD dwBuffer, REFGUID guidObject, WORD dwIndex, REFGUID iidInterface, void** ppObject)
203 HRESULT WINAPI IDirectMusicAudioPathImpl_Activate (LPDIRECTMUSICAUDIOPATH iface, BOOL fActivate)
209 HRESULT WINAPI IDirectMusicAudioPathImpl_SetVolume (LPDIRECTMUSICAUDIOPATH iface, long lVolume, DWORD dwDuration)
215 HRESULT WINAPI IDirectMusicAudioPathImpl_ConvertPChannel (LPDIRECTMUSICAUDIOPATH iface, DWORD dwPChannelIn, DWORD* pdwPChannelOut)
221 ICOM_VTABLE(IDirectMusicAudioPath) DirectMusicAudioPath_Vtbl =
223 ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
224 IDirectMusicAudioPathImpl_QueryInterface,
225 IDirectMusicAudioPathImpl_AddRef,
226 IDirectMusicAudioPathImpl_Release,
231 /* IDirectMusicBand IUnknown parts follow: */
232 HRESULT WINAPI IDirectMusicBandImpl_QueryInterface (LPDIRECTMUSICBAND iface, REFIID riid, LPVOID *ppobj)
234 ICOM_THIS(IDirectMusicBandImpl,iface);
236 if (IsEqualGUID(riid, &IID_IUnknown) || IsEqualGUID(riid, &IID_IDirectMusicBand))
238 IDirectMusicBandImpl_AddRef(iface);
242 WARN("(%p)->(%s,%p),not found\n",This,debugstr_guid(riid),ppobj);
243 return E_NOINTERFACE;
246 ULONG WINAPI IDirectMusicBandImpl_AddRef (LPDIRECTMUSICBAND iface)
248 ICOM_THIS(IDirectMusicBandImpl,iface);
249 TRACE("(%p) : AddRef from %ld\n", This, This->ref);
250 return ++(This->ref);
253 ULONG WINAPI IDirectMusicBandImpl_Release (LPDIRECTMUSICBAND iface)
255 ICOM_THIS(IDirectMusicBandImpl,iface);
256 ULONG ref = --This->ref;
257 TRACE("(%p) : ReleaseRef to %ld\n", This, This->ref);
260 HeapFree(GetProcessHeap(), 0, This);
265 /* IDirectMusicBand Interface follow: */
266 HRESULT WINAPI IDirectMusicBandImpl_CreateSegment (LPDIRECTMUSICBAND iface, IDirectMusicSegment** ppSegment)
272 HRESULT WINAPI IDirectMusicBandImpl_Download (LPDIRECTMUSICBAND iface, IDirectMusicPerformance* pPerformance)
278 HRESULT WINAPI IDirectMusicBandImpl_Unload (LPDIRECTMUSICBAND iface, IDirectMusicPerformance* pPerformance)
284 ICOM_VTABLE(IDirectMusicBand) DirectMusicBand_Vtbl =
286 ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
287 IDirectMusicBandImpl_QueryInterface,
288 IDirectMusicBandImpl_AddRef,
289 IDirectMusicBandImpl_Release,
290 IDirectMusicBandImpl_CreateSegment,
291 IDirectMusicBandImpl_Download,
292 IDirectMusicBandImpl_Unload
296 /* IDirectMusicSong IUnknown parts follow: */
297 HRESULT WINAPI IDirectMusicSongImpl_QueryInterface (LPDIRECTMUSICSONG iface, REFIID riid, LPVOID *ppobj)
299 ICOM_THIS(IDirectMusicSongImpl,iface);
301 if (IsEqualGUID(riid, &IID_IUnknown) || IsEqualGUID(riid, &IID_IDirectMusicSong))
303 IDirectMusicSongImpl_AddRef(iface);
307 WARN("(%p)->(%s,%p),not found\n",This,debugstr_guid(riid),ppobj);
308 return E_NOINTERFACE;
311 ULONG WINAPI IDirectMusicSongImpl_AddRef (LPDIRECTMUSICSONG iface)
313 ICOM_THIS(IDirectMusicSongImpl,iface);
314 TRACE("(%p) : AddRef from %ld\n", This, This->ref);
315 return ++(This->ref);
318 ULONG WINAPI IDirectMusicSongImpl_Release (LPDIRECTMUSICSONG iface)
320 ICOM_THIS(IDirectMusicSongImpl,iface);
321 ULONG ref = --This->ref;
322 TRACE("(%p) : ReleaseRef to %ld\n", This, This->ref);
325 HeapFree(GetProcessHeap(), 0, This);
330 /* IDirectMusicSong Interface follow: */
331 HRESULT WINAPI IDirectMusicSongImpl_Compose (LPDIRECTMUSICSONG iface)
337 HRESULT WINAPI IDirectMusicSongImpl_GetParam (LPDIRECTMUSICSONG iface, REFGUID rguidType, DWORD dwGroupBits, DWORD dwIndex, MUSIC_TIME mtTime, MUSIC_TIME* pmtNext, void* pParam)
343 HRESULT WINAPI IDirectMusicSongImpl_GetSegment (LPDIRECTMUSICSONG iface, WCHAR* pwzName, IDirectMusicSegment** ppSegment)
349 HRESULT WINAPI IDirectMusicSongImpl_GetAudioPathConfig (LPDIRECTMUSICSONG iface, IUnknown** ppAudioPathConfig)
355 HRESULT WINAPI IDirectMusicSongImpl_Download (LPDIRECTMUSICSONG iface, IUnknown* pAudioPath)
361 HRESULT WINAPI IDirectMusicSongImpl_Unload (LPDIRECTMUSICSONG iface, IUnknown* pAudioPath)
367 HRESULT WINAPI IDirectMusicSongImpl_EnumSegment (LPDIRECTMUSICSONG iface, DWORD dwIndex, IDirectMusicSegment** ppSegment)
373 ICOM_VTABLE(IDirectMusicSong) DirectMusicSong_Vtbl =
375 ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
376 IDirectMusicSongImpl_QueryInterface,
377 IDirectMusicSongImpl_AddRef,
378 IDirectMusicSongImpl_Release,
379 IDirectMusicSongImpl_Compose,
380 IDirectMusicSongImpl_GetParam,
381 IDirectMusicSongImpl_GetSegment,
382 IDirectMusicSongImpl_GetAudioPathConfig,
383 IDirectMusicSongImpl_Download,
384 IDirectMusicSongImpl_Unload,
385 IDirectMusicSongImpl_EnumSegment
389 /* IDirectMusicChordMap IUnknown parts follow: */
390 HRESULT WINAPI IDirectMusicChordMapImpl_QueryInterface (LPDIRECTMUSICCHORDMAP iface, REFIID riid, LPVOID *ppobj)
392 ICOM_THIS(IDirectMusicChordMapImpl,iface);
394 if (IsEqualGUID(riid, &IID_IUnknown) || IsEqualGUID(riid, &IID_IDirectMusicChordMap))
396 IDirectMusicChordMapImpl_AddRef(iface);
400 WARN("(%p)->(%s,%p),not found\n",This,debugstr_guid(riid),ppobj);
401 return E_NOINTERFACE;
404 ULONG WINAPI IDirectMusicChordMapImpl_AddRef (LPDIRECTMUSICCHORDMAP iface)
406 ICOM_THIS(IDirectMusicChordMapImpl,iface);
407 TRACE("(%p) : AddRef from %ld\n", This, This->ref);
408 return ++(This->ref);
411 ULONG WINAPI IDirectMusicChordMapImpl_Release (LPDIRECTMUSICCHORDMAP iface)
413 ICOM_THIS(IDirectMusicChordMapImpl,iface);
414 ULONG ref = --This->ref;
415 TRACE("(%p) : ReleaseRef to %ld\n", This, This->ref);
418 HeapFree(GetProcessHeap(), 0, This);
423 /* IDirectMusicChordMap Interface follow: */
424 HRESULT WINAPI IDirectMusicChordMapImpl_GetScale (LPDIRECTMUSICCHORDMAP iface, DWORD* pdwScale)
430 ICOM_VTABLE(IDirectMusicChordMap) DirectMusicChordMap_Vtbl =
432 ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
433 IDirectMusicChordMapImpl_QueryInterface,
434 IDirectMusicChordMapImpl_AddRef,
435 IDirectMusicChordMapImpl_Release,
436 IDirectMusicChordMapImpl_GetScale
440 /* IDirectMusicComposer IUnknown parts follow: */
441 HRESULT WINAPI IDirectMusicComposerImpl_QueryInterface (LPDIRECTMUSICCOMPOSER iface, REFIID riid, LPVOID *ppobj)
443 ICOM_THIS(IDirectMusicComposerImpl,iface);
445 if (IsEqualGUID(riid, &IID_IUnknown) || IsEqualGUID(riid, &IID_IDirectMusicComposer))
447 IDirectMusicComposerImpl_AddRef(iface);
451 WARN("(%p)->(%s,%p),not found\n",This,debugstr_guid(riid),ppobj);
452 return E_NOINTERFACE;
455 ULONG WINAPI IDirectMusicComposerImpl_AddRef (LPDIRECTMUSICCOMPOSER iface)
457 ICOM_THIS(IDirectMusicComposerImpl,iface);
458 TRACE("(%p) : AddRef from %ld\n", This, This->ref);
459 return ++(This->ref);
462 ULONG WINAPI IDirectMusicComposerImpl_Release (LPDIRECTMUSICCOMPOSER iface)
464 ICOM_THIS(IDirectMusicComposerImpl,iface);
465 ULONG ref = --This->ref;
466 TRACE("(%p) : ReleaseRef to %ld\n", This, This->ref);
469 HeapFree(GetProcessHeap(), 0, This);
474 /* IDirectMusicComposer Interface follow: */
475 HRESULT WINAPI IDirectMusicComposerImpl_ComposeSegmentFromTemplate (LPDIRECTMUSICCOMPOSER iface, IDirectMusicStyle* pStyle, IDirectMusicSegment* pTemplate, WORD wActivity, IDirectMusicChordMap* pChordMap, IDirectMusicSegment** ppSegment)
481 HRESULT WINAPI IDirectMusicComposerImpl_ComposeSegmentFromShape (LPDIRECTMUSICCOMPOSER iface, IDirectMusicStyle* pStyle, WORD wNumMeasures, WORD wShape, WORD wActivity, BOOL fIntro, BOOL fEnd, IDirectMusicChordMap* pChordMap, IDirectMusicSegment** ppSegment)
487 HRESULT WINAPI IDirectMusicComposerImpl_ComposeTransition (LPDIRECTMUSICCOMPOSER iface, IDirectMusicSegment* pFromSeg, IDirectMusicSegment* pToSeg, MUSIC_TIME mtTime, WORD wCommand, DWORD dwFlags, IDirectMusicChordMap* pChordMap, IDirectMusicSegment** ppTransSeg)
493 HRESULT WINAPI IDirectMusicComposerImpl_AutoTransition (LPDIRECTMUSICCOMPOSER iface, IDirectMusicPerformance* pPerformance, IDirectMusicSegment* pToSeg, WORD wCommand, DWORD dwFlags, IDirectMusicChordMap* pChordMap, IDirectMusicSegment** ppTransSeg, IDirectMusicSegmentState** ppToSegState, IDirectMusicSegmentState** ppTransSegState)
499 HRESULT WINAPI IDirectMusicComposerImpl_ComposeTemplateFromShape (LPDIRECTMUSICCOMPOSER iface, WORD wNumMeasures, WORD wShape, BOOL fIntro, BOOL fEnd, WORD wEndLength, IDirectMusicSegment** ppTemplate)
505 HRESULT WINAPI IDirectMusicComposerImpl_ChangeChordMap (LPDIRECTMUSICCOMPOSER iface, IDirectMusicSegment* pSegment, BOOL fTrackScale, IDirectMusicChordMap* pChordMap)
511 ICOM_VTABLE(IDirectMusicComposer) DirectMusicComposer_Vtbl =
513 ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
514 IDirectMusicComposerImpl_QueryInterface,
515 IDirectMusicComposerImpl_AddRef,
516 IDirectMusicComposerImpl_Release,
517 IDirectMusicComposerImpl_ComposeSegmentFromTemplate,
518 IDirectMusicComposerImpl_ComposeSegmentFromShape,
519 IDirectMusicComposerImpl_ComposeTransition,
520 IDirectMusicComposerImpl_AutoTransition,
521 IDirectMusicComposerImpl_ComposeTemplateFromShape,
522 IDirectMusicComposerImpl_ChangeChordMap
526 /* IDirectMusicContainer IUnknown parts follow: */
527 HRESULT WINAPI IDirectMusicContainerImpl_QueryInterface (LPDIRECTMUSICCONTAINER iface, REFIID riid, LPVOID *ppobj)
529 ICOM_THIS(IDirectMusicContainerImpl,iface);
531 if (IsEqualGUID(riid, &IID_IUnknown) || IsEqualGUID(riid, &IID_IDirectMusicContainer))
533 IDirectMusicContainerImpl_AddRef(iface);
537 WARN("(%p)->(%s,%p),not found\n",This,debugstr_guid(riid),ppobj);
538 return E_NOINTERFACE;
541 ULONG WINAPI IDirectMusicContainerImpl_AddRef (LPDIRECTMUSICCONTAINER iface)
543 ICOM_THIS(IDirectMusicContainerImpl,iface);
544 TRACE("(%p) : AddRef from %ld\n", This, This->ref);
545 return ++(This->ref);
548 ULONG WINAPI IDirectMusicContainerImpl_Release (LPDIRECTMUSICCONTAINER iface)
550 ICOM_THIS(IDirectMusicContainerImpl,iface);
551 ULONG ref = --This->ref;
552 TRACE("(%p) : ReleaseRef to %ld\n", This, This->ref);
555 HeapFree(GetProcessHeap(), 0, This);
560 /* IDirectMusicContainer Interface follow: */
561 HRESULT WINAPI IDirectMusicContainerImpl_EnumObject (LPDIRECTMUSICCONTAINER iface, REFGUID rguidClass, DWORD dwIndex, LPDMUS_OBJECTDESC pDesc, WCHAR* pwszAlias)
567 ICOM_VTABLE(IDirectMusicContainer) DirectMusicContainer_Vtbl =
569 ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
570 IDirectMusicContainerImpl_QueryInterface,
571 IDirectMusicContainerImpl_AddRef,
572 IDirectMusicContainerImpl_Release,
573 IDirectMusicContainerImpl_EnumObject
577 /* IDirectMusicGraph IUnknown parts follow: */
578 HRESULT WINAPI IDirectMusicGraphImpl_QueryInterface (LPDIRECTMUSICGRAPH iface, REFIID riid, LPVOID *ppobj)
580 ICOM_THIS(IDirectMusicGraphImpl,iface);
582 if (IsEqualGUID(riid, &IID_IUnknown) || IsEqualGUID(riid, &IID_IDirectMusicGraph))
584 IDirectMusicGraphImpl_AddRef(iface);
588 WARN("(%p)->(%s,%p),not found\n",This,debugstr_guid(riid),ppobj);
589 return E_NOINTERFACE;
592 ULONG WINAPI IDirectMusicGraphImpl_AddRef (LPDIRECTMUSICGRAPH iface)
594 ICOM_THIS(IDirectMusicGraphImpl,iface);
595 TRACE("(%p) : AddRef from %ld\n", This, This->ref);
596 return ++(This->ref);
599 ULONG WINAPI IDirectMusicGraphImpl_Release (LPDIRECTMUSICGRAPH iface)
601 ICOM_THIS(IDirectMusicGraphImpl,iface);
602 ULONG ref = --This->ref;
603 TRACE("(%p) : ReleaseRef to %ld\n", This, This->ref);
606 HeapFree(GetProcessHeap(), 0, This);
611 /* IDirectMusicGraph Interface follow: */
612 HRESULT WINAPI IDirectMusicGraphImpl_StampPMsg (LPDIRECTMUSICGRAPH iface, DMUS_PMSG* pPMSG)
618 HRESULT WINAPI IDirectMusicGraphImpl_InsertTool (LPDIRECTMUSICGRAPH iface, IDirectMusicTool* pTool, DWORD* pdwPChannels, DWORD cPChannels, LONG lIndex)
624 HRESULT WINAPI IDirectMusicGraphImpl_GetTool (LPDIRECTMUSICGRAPH iface, DWORD dwIndex, IDirectMusicTool** ppTool)
630 HRESULT WINAPI IDirectMusicGraphImpl_RemoveTool (LPDIRECTMUSICGRAPH iface, IDirectMusicTool* pTool)
636 ICOM_VTABLE(IDirectMusicGraph) DirectMusicGraph_Vtbl =
638 ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
639 IDirectMusicGraphImpl_QueryInterface,
640 IDirectMusicGraphImpl_AddRef,
641 IDirectMusicGraphImpl_Release,
642 IDirectMusicGraphImpl_StampPMsg,
643 IDirectMusicGraphImpl_InsertTool,
644 IDirectMusicGraphImpl_GetTool,
645 IDirectMusicGraphImpl_RemoveTool
649 /* IDirectMusicScript IUnknown parts follow: */
650 HRESULT WINAPI IDirectMusicScriptImpl_QueryInterface (LPDIRECTMUSICSCRIPT iface, REFIID riid, LPVOID *ppobj)
652 ICOM_THIS(IDirectMusicScriptImpl,iface);
654 if (IsEqualGUID(riid, &IID_IUnknown) || IsEqualGUID(riid, &IID_IDirectMusicScript))
656 IDirectMusicScriptImpl_AddRef(iface);
660 WARN("(%p)->(%s,%p),not found\n",This,debugstr_guid(riid),ppobj);
661 return E_NOINTERFACE;
664 ULONG WINAPI IDirectMusicScriptImpl_AddRef (LPDIRECTMUSICSCRIPT iface)
666 ICOM_THIS(IDirectMusicScriptImpl,iface);
667 TRACE("(%p) : AddRef from %ld\n", This, This->ref);
668 return ++(This->ref);
671 ULONG WINAPI IDirectMusicScriptImpl_Release (LPDIRECTMUSICSCRIPT iface)
673 ICOM_THIS(IDirectMusicScriptImpl,iface);
674 ULONG ref = --This->ref;
675 TRACE("(%p) : ReleaseRef to %ld\n", This, This->ref);
678 HeapFree(GetProcessHeap(), 0, This);
683 /* IDirectMusicScript Interface follow: */
684 HRESULT WINAPI IDirectMusicScriptImpl_Init (LPDIRECTMUSICSCRIPT iface, IDirectMusicPerformance* pPerformance, DMUS_SCRIPT_ERRORINFO* pErrorInfo)
690 HRESULT WINAPI IDirectMusicScriptImpl_CallRoutine (LPDIRECTMUSICSCRIPT iface, WCHAR* pwszRoutineName, DMUS_SCRIPT_ERRORINFO* pErrorInfo)
696 HRESULT WINAPI IDirectMusicScriptImpl_SetVariableVariant (LPDIRECTMUSICSCRIPT iface, WCHAR* pwszVariableName, VARIANT varValue, BOOL fSetRef, DMUS_SCRIPT_ERRORINFO* pErrorInfo)
702 HRESULT WINAPI IDirectMusicScriptImpl_GetVariableVariant (LPDIRECTMUSICSCRIPT iface, WCHAR* pwszVariableName, VARIANT* pvarValue, DMUS_SCRIPT_ERRORINFO* pErrorInfo)
708 HRESULT WINAPI IDirectMusicScriptImpl_SetVariableNumber (LPDIRECTMUSICSCRIPT iface, WCHAR* pwszVariableName, LONG lValue, DMUS_SCRIPT_ERRORINFO* pErrorInfo)
714 HRESULT WINAPI IDirectMusicScriptImpl_GetVariableNumber (LPDIRECTMUSICSCRIPT iface, WCHAR* pwszVariableName, LONG* plValue, DMUS_SCRIPT_ERRORINFO* pErrorInfo)
720 HRESULT WINAPI IDirectMusicScriptImpl_SetVariableObject (LPDIRECTMUSICSCRIPT iface, WCHAR* pwszVariableName, IUnknown* punkValue, DMUS_SCRIPT_ERRORINFO* pErrorInfo)
726 HRESULT WINAPI IDirectMusicScriptImpl_GetVariableObject (LPDIRECTMUSICSCRIPT iface, WCHAR* pwszVariableName, REFIID riid, LPVOID* ppv, DMUS_SCRIPT_ERRORINFO* pErrorInfo)
732 HRESULT WINAPI IDirectMusicScriptImpl_EnumRoutine (LPDIRECTMUSICSCRIPT iface, DWORD dwIndex, WCHAR* pwszName)
738 HRESULT WINAPI IDirectMusicScriptImpl_EnumVariable (LPDIRECTMUSICSCRIPT iface, DWORD dwIndex, WCHAR* pwszName)
744 ICOM_VTABLE(IDirectMusicScript) DirectMusicScript_Vtbl =
746 ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
747 IDirectMusicScriptImpl_QueryInterface,
748 IDirectMusicScriptImpl_AddRef,
749 IDirectMusicScriptImpl_Release,
750 IDirectMusicScriptImpl_Init,
751 IDirectMusicScriptImpl_CallRoutine,
752 IDirectMusicScriptImpl_SetVariableVariant,
753 IDirectMusicScriptImpl_GetVariableVariant,
754 IDirectMusicScriptImpl_SetVariableNumber,
755 IDirectMusicScriptImpl_GetVariableNumber,
756 IDirectMusicScriptImpl_SetVariableObject,
757 IDirectMusicScriptImpl_GetVariableObject,
758 IDirectMusicScriptImpl_EnumRoutine,
759 IDirectMusicScriptImpl_EnumVariable