Removed unnecessary function link names.
[wine] / dlls / dmusic / dmusic_misc.c
1 /* IReferenceClock Implementation
2  * IDirectMusicThru Implementation
3  * IDirectMusicAudioPath Implementation
4  * IDirectMusicBand Implementation
5  * IDirectMusicSong Implementation
6  * IDirectMusicChordMap Implementation
7  * IDirectMusicComposer
8  * IDirectMusicContainer
9  * IDirectMusicGraph
10  * IDirectMusicScript
11  *
12  * Copyright (C) 2003 Rok Mandeljc
13  *
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.
18  *
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.
23  *
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.
27  */
28
29 #include "windef.h"
30 #include "winbase.h"
31 #include "winuser.h"
32 #include "wingdi.h"
33 #include "wine/debug.h"
34
35 #include "dmusic_private.h"
36
37 WINE_DEFAULT_DEBUG_CHANNEL(dmusic);
38
39 /* IReferenceClock IUnknown parts follow: */
40 HRESULT WINAPI IReferenceClockImpl_QueryInterface (LPREFERENCECLOCK iface, REFIID riid, LPVOID *ppobj)
41 {
42         ICOM_THIS(IReferenceClockImpl,iface);
43
44         if (IsEqualGUID(riid, &IID_IUnknown) || IsEqualGUID(riid, &IID_IReferenceClock))
45         {
46                 IReferenceClockImpl_AddRef(iface);
47                 *ppobj = This;
48                 return DS_OK;
49         }
50         WARN("(%p)->(%s,%p),not found\n",This,debugstr_guid(riid),ppobj);
51         return E_NOINTERFACE;
52 }
53
54 ULONG WINAPI IReferenceClockImpl_AddRef (LPREFERENCECLOCK iface)
55 {
56         ICOM_THIS(IReferenceClockImpl,iface);
57         TRACE("(%p) : AddRef from %ld\n", This, This->ref);
58         return ++(This->ref);
59 }
60
61 ULONG WINAPI IReferenceClockImpl_Release (LPREFERENCECLOCK iface)
62 {
63         ICOM_THIS(IReferenceClockImpl,iface);
64         ULONG ref = --This->ref;
65         TRACE("(%p) : ReleaseRef to %ld\n", This, This->ref);
66         if (ref == 0)
67         {
68                 HeapFree(GetProcessHeap(), 0, This);
69         }
70         return ref;
71 }
72
73 /* IReferenceClock Interface follow: */
74 HRESULT WINAPI IReferenceClockImpl_GetTime (LPREFERENCECLOCK iface, REFERENCE_TIME* pTime)
75 {
76         FIXME("stub\n");
77         return DS_OK;
78 }
79
80 HRESULT WINAPI IReferenceClockImpl_AdviseTime (LPREFERENCECLOCK iface, REFERENCE_TIME baseTime, REFERENCE_TIME streamTime, HANDLE hEvent, DWORD* pdwAdviseCookie)
81 {
82         FIXME("stub\n");
83         return DS_OK;
84 }
85
86 HRESULT WINAPI IReferenceClockImpl_AdvisePeriodic (LPREFERENCECLOCK iface, REFERENCE_TIME startTime, REFERENCE_TIME periodTime, HANDLE hSemaphore, DWORD* pdwAdviseCookie)
87 {
88         FIXME("stub\n");
89         return DS_OK;
90 }
91
92 HRESULT WINAPI IReferenceClockImpl_Unadvise (LPREFERENCECLOCK iface, DWORD dwAdviseCookie)
93 {
94         FIXME("stub\n");
95         return DS_OK;
96 }
97
98 ICOM_VTABLE(IReferenceClock) ReferenceClock_Vtbl =
99 {
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
108 };
109
110
111 /* IDirectMusicThru IUnknown parts follow: */
112 HRESULT WINAPI IDirectMusicThruImpl_QueryInterface (LPDIRECTMUSICTHRU iface, REFIID riid, LPVOID *ppobj)
113 {
114         ICOM_THIS(IDirectMusicThruImpl,iface);
115
116         if (IsEqualGUID(riid, &IID_IUnknown) || IsEqualGUID(riid, &IID_IDirectMusicThru))
117         {
118                 IDirectMusicThruImpl_AddRef(iface);
119                 *ppobj = This;
120                 return DS_OK;
121         }
122         WARN("(%p)->(%s,%p),not found\n",This,debugstr_guid(riid),ppobj);
123         return E_NOINTERFACE;
124 }
125
126 ULONG WINAPI IDirectMusicThruImpl_AddRef (LPDIRECTMUSICTHRU iface)
127 {
128         ICOM_THIS(IDirectMusicThruImpl,iface);
129         TRACE("(%p) : AddRef from %ld\n", This, This->ref);
130         return ++(This->ref);
131 }
132
133 ULONG WINAPI IDirectMusicThruImpl_Release (LPDIRECTMUSICTHRU iface)
134 {
135         ICOM_THIS(IDirectMusicThruImpl,iface);
136         ULONG ref = --This->ref;
137         TRACE("(%p) : ReleaseRef to %ld\n", This, This->ref);
138         if (ref == 0)
139         {
140                 HeapFree(GetProcessHeap(), 0, This);
141         }
142         return ref;
143 }
144
145 /* IDirectMusicThru Interface follow: */
146 HRESULT WINAPI IDirectMusicThruImpl_ThruChannel (LPDIRECTMUSICTHRU iface, DWORD dwSourceChannelGroup, DWORD dwSourceChannel, DWORD dwDestinationChannelGroup, DWORD dwDestinationChannel, LPDIRECTMUSICPORT pDestinationPort)
147 {
148         FIXME("stub\n");
149         return DS_OK;
150 }
151
152 ICOM_VTABLE(IDirectMusicThru) DirectMusicThru_Vtbl =
153 {
154     ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
155         IDirectMusicThruImpl_QueryInterface,
156         IDirectMusicThruImpl_AddRef,
157         IDirectMusicThruImpl_Release,
158         IDirectMusicThruImpl_ThruChannel
159 };
160
161
162 /* IDirectMusicAudioPath IUnknown parts follow: */
163 HRESULT WINAPI IDirectMusicAudioPathImpl_QueryInterface (LPDIRECTMUSICAUDIOPATH iface, REFIID riid, LPVOID *ppobj)
164 {
165         ICOM_THIS(IDirectMusicAudioPathImpl,iface);
166
167         if (IsEqualGUID(riid, &IID_IUnknown) || IsEqualGUID(riid, &IID_IDirectMusicAudioPath))
168         {
169                 IDirectMusicAudioPathImpl_AddRef(iface);
170                 *ppobj = This;
171                 return DS_OK;
172         }
173         WARN("(%p)->(%s,%p),not found\n",This,debugstr_guid(riid),ppobj);
174         return E_NOINTERFACE;
175 }
176
177 ULONG WINAPI IDirectMusicAudioPathImpl_AddRef (LPDIRECTMUSICAUDIOPATH iface)
178 {
179         ICOM_THIS(IDirectMusicAudioPathImpl,iface);
180         TRACE("(%p) : AddRef from %ld\n", This, This->ref);
181         return ++(This->ref);
182 }
183
184 ULONG WINAPI IDirectMusicAudioPathImpl_Release (LPDIRECTMUSICAUDIOPATH iface)
185 {
186         ICOM_THIS(IDirectMusicAudioPathImpl,iface);
187         ULONG ref = --This->ref;
188         TRACE("(%p) : ReleaseRef to %ld\n", This, This->ref);
189         if (ref == 0)
190         {
191                 HeapFree(GetProcessHeap(), 0, This);
192         }
193         return ref;
194 }
195
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)
198 {
199         FIXME("stub\n");
200         return DS_OK;
201 }
202
203 HRESULT WINAPI IDirectMusicAudioPathImpl_Activate (LPDIRECTMUSICAUDIOPATH iface, BOOL fActivate)
204 {
205         FIXME("stub\n");
206         return DS_OK;
207 }
208
209 HRESULT WINAPI IDirectMusicAudioPathImpl_SetVolume (LPDIRECTMUSICAUDIOPATH iface, long lVolume, DWORD dwDuration)
210 {
211         FIXME("stub\n");
212         return DS_OK;
213 }
214
215 HRESULT WINAPI IDirectMusicAudioPathImpl_ConvertPChannel (LPDIRECTMUSICAUDIOPATH iface, DWORD dwPChannelIn, DWORD* pdwPChannelOut)
216 {
217         FIXME("stub\n");
218         return DS_OK;
219 }
220
221 ICOM_VTABLE(IDirectMusicAudioPath) DirectMusicAudioPath_Vtbl =
222 {
223     ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
224         IDirectMusicAudioPathImpl_QueryInterface,
225         IDirectMusicAudioPathImpl_AddRef,
226         IDirectMusicAudioPathImpl_Release,
227
228 };
229
230
231 /* IDirectMusicBand IUnknown parts follow: */
232 HRESULT WINAPI IDirectMusicBandImpl_QueryInterface (LPDIRECTMUSICBAND iface, REFIID riid, LPVOID *ppobj)
233 {
234         ICOM_THIS(IDirectMusicBandImpl,iface);
235
236         if (IsEqualGUID(riid, &IID_IUnknown) || IsEqualGUID(riid, &IID_IDirectMusicBand))
237         {
238                 IDirectMusicBandImpl_AddRef(iface);
239                 *ppobj = This;
240                 return DS_OK;
241         }
242         WARN("(%p)->(%s,%p),not found\n",This,debugstr_guid(riid),ppobj);
243         return E_NOINTERFACE;
244 }
245
246 ULONG WINAPI IDirectMusicBandImpl_AddRef (LPDIRECTMUSICBAND iface)
247 {
248         ICOM_THIS(IDirectMusicBandImpl,iface);
249         TRACE("(%p) : AddRef from %ld\n", This, This->ref);
250         return ++(This->ref);
251 }
252
253 ULONG WINAPI IDirectMusicBandImpl_Release (LPDIRECTMUSICBAND iface)
254 {
255         ICOM_THIS(IDirectMusicBandImpl,iface);
256         ULONG ref = --This->ref;
257         TRACE("(%p) : ReleaseRef to %ld\n", This, This->ref);
258         if (ref == 0)
259         {
260                 HeapFree(GetProcessHeap(), 0, This);
261         }
262         return ref;
263 }
264
265 /* IDirectMusicBand Interface follow: */
266 HRESULT WINAPI IDirectMusicBandImpl_CreateSegment (LPDIRECTMUSICBAND iface, IDirectMusicSegment** ppSegment)
267 {
268         FIXME("stub\n");
269         return DS_OK;
270 }
271
272 HRESULT WINAPI IDirectMusicBandImpl_Download (LPDIRECTMUSICBAND iface, IDirectMusicPerformance* pPerformance)
273 {
274         FIXME("stub\n");
275         return DS_OK;
276 }
277
278 HRESULT WINAPI IDirectMusicBandImpl_Unload (LPDIRECTMUSICBAND iface, IDirectMusicPerformance* pPerformance)
279 {
280         FIXME("stub\n");
281         return DS_OK;
282 }
283
284 ICOM_VTABLE(IDirectMusicBand) DirectMusicBand_Vtbl =
285 {
286     ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
287         IDirectMusicBandImpl_QueryInterface,
288         IDirectMusicBandImpl_AddRef,
289         IDirectMusicBandImpl_Release,
290         IDirectMusicBandImpl_CreateSegment,
291         IDirectMusicBandImpl_Download,
292         IDirectMusicBandImpl_Unload
293 };
294
295
296 /* IDirectMusicSong IUnknown parts follow: */
297 HRESULT WINAPI IDirectMusicSongImpl_QueryInterface (LPDIRECTMUSICSONG iface, REFIID riid, LPVOID *ppobj)
298 {
299         ICOM_THIS(IDirectMusicSongImpl,iface);
300
301         if (IsEqualGUID(riid, &IID_IUnknown) || IsEqualGUID(riid, &IID_IDirectMusicSong))
302         {
303                 IDirectMusicSongImpl_AddRef(iface);
304                 *ppobj = This;
305                 return DS_OK;
306         }
307         WARN("(%p)->(%s,%p),not found\n",This,debugstr_guid(riid),ppobj);
308         return E_NOINTERFACE;
309 }
310
311 ULONG WINAPI IDirectMusicSongImpl_AddRef (LPDIRECTMUSICSONG iface)
312 {
313         ICOM_THIS(IDirectMusicSongImpl,iface);
314         TRACE("(%p) : AddRef from %ld\n", This, This->ref);
315         return ++(This->ref);
316 }
317
318 ULONG WINAPI IDirectMusicSongImpl_Release (LPDIRECTMUSICSONG iface)
319 {
320         ICOM_THIS(IDirectMusicSongImpl,iface);
321         ULONG ref = --This->ref;
322         TRACE("(%p) : ReleaseRef to %ld\n", This, This->ref);
323         if (ref == 0)
324         {
325                 HeapFree(GetProcessHeap(), 0, This);
326         }
327         return ref;
328 }
329
330 /* IDirectMusicSong Interface follow: */
331 HRESULT WINAPI IDirectMusicSongImpl_Compose (LPDIRECTMUSICSONG iface)
332 {
333         FIXME("stub\n");
334         return DS_OK;
335 }
336
337 HRESULT WINAPI IDirectMusicSongImpl_GetParam (LPDIRECTMUSICSONG iface, REFGUID rguidType, DWORD dwGroupBits, DWORD dwIndex, MUSIC_TIME mtTime, MUSIC_TIME* pmtNext, void* pParam)
338 {
339         FIXME("stub\n");
340         return DS_OK;
341 }
342
343 HRESULT WINAPI IDirectMusicSongImpl_GetSegment (LPDIRECTMUSICSONG iface, WCHAR* pwzName, IDirectMusicSegment** ppSegment)
344 {
345         FIXME("stub\n");
346         return DS_OK;
347 }
348
349 HRESULT WINAPI IDirectMusicSongImpl_GetAudioPathConfig (LPDIRECTMUSICSONG iface, IUnknown** ppAudioPathConfig)
350 {
351         FIXME("stub\n");
352         return DS_OK;
353 }
354
355 HRESULT WINAPI IDirectMusicSongImpl_Download (LPDIRECTMUSICSONG iface, IUnknown* pAudioPath)
356 {
357         FIXME("stub\n");
358         return DS_OK;
359 }
360
361 HRESULT WINAPI IDirectMusicSongImpl_Unload (LPDIRECTMUSICSONG iface, IUnknown* pAudioPath)
362 {
363         FIXME("stub\n");
364         return DS_OK;
365 }
366
367 HRESULT WINAPI IDirectMusicSongImpl_EnumSegment (LPDIRECTMUSICSONG iface, DWORD dwIndex, IDirectMusicSegment** ppSegment)
368 {
369         FIXME("stub\n");
370         return DS_OK;
371 }
372
373 ICOM_VTABLE(IDirectMusicSong) DirectMusicSong_Vtbl =
374 {
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
386 };
387
388
389 /* IDirectMusicChordMap IUnknown parts follow: */
390 HRESULT WINAPI IDirectMusicChordMapImpl_QueryInterface (LPDIRECTMUSICCHORDMAP iface, REFIID riid, LPVOID *ppobj)
391 {
392         ICOM_THIS(IDirectMusicChordMapImpl,iface);
393
394         if (IsEqualGUID(riid, &IID_IUnknown) || IsEqualGUID(riid, &IID_IDirectMusicChordMap))
395         {
396                 IDirectMusicChordMapImpl_AddRef(iface);
397                 *ppobj = This;
398                 return DS_OK;
399         }
400         WARN("(%p)->(%s,%p),not found\n",This,debugstr_guid(riid),ppobj);
401         return E_NOINTERFACE;
402 }
403
404 ULONG WINAPI IDirectMusicChordMapImpl_AddRef (LPDIRECTMUSICCHORDMAP iface)
405 {
406         ICOM_THIS(IDirectMusicChordMapImpl,iface);
407         TRACE("(%p) : AddRef from %ld\n", This, This->ref);
408         return ++(This->ref);
409 }
410
411 ULONG WINAPI IDirectMusicChordMapImpl_Release (LPDIRECTMUSICCHORDMAP iface)
412 {
413         ICOM_THIS(IDirectMusicChordMapImpl,iface);
414         ULONG ref = --This->ref;
415         TRACE("(%p) : ReleaseRef to %ld\n", This, This->ref);
416         if (ref == 0)
417         {
418                 HeapFree(GetProcessHeap(), 0, This);
419         }
420         return ref;
421 }
422
423 /* IDirectMusicChordMap Interface follow: */
424 HRESULT WINAPI IDirectMusicChordMapImpl_GetScale (LPDIRECTMUSICCHORDMAP iface, DWORD* pdwScale)
425 {
426         FIXME("stub\n");
427         return DS_OK;
428 }
429
430 ICOM_VTABLE(IDirectMusicChordMap) DirectMusicChordMap_Vtbl =
431 {
432     ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
433         IDirectMusicChordMapImpl_QueryInterface,
434         IDirectMusicChordMapImpl_AddRef,
435         IDirectMusicChordMapImpl_Release,
436         IDirectMusicChordMapImpl_GetScale
437 };
438
439
440 /* IDirectMusicComposer IUnknown parts follow: */
441 HRESULT WINAPI IDirectMusicComposerImpl_QueryInterface (LPDIRECTMUSICCOMPOSER iface, REFIID riid, LPVOID *ppobj)
442 {
443         ICOM_THIS(IDirectMusicComposerImpl,iface);
444
445         if (IsEqualGUID(riid, &IID_IUnknown) || IsEqualGUID(riid, &IID_IDirectMusicComposer))
446         {
447                 IDirectMusicComposerImpl_AddRef(iface);
448                 *ppobj = This;
449                 return DS_OK;
450         }
451         WARN("(%p)->(%s,%p),not found\n",This,debugstr_guid(riid),ppobj);
452         return E_NOINTERFACE;
453 }
454
455 ULONG WINAPI IDirectMusicComposerImpl_AddRef (LPDIRECTMUSICCOMPOSER iface)
456 {
457         ICOM_THIS(IDirectMusicComposerImpl,iface);
458         TRACE("(%p) : AddRef from %ld\n", This, This->ref);
459         return ++(This->ref);
460 }
461
462 ULONG WINAPI IDirectMusicComposerImpl_Release (LPDIRECTMUSICCOMPOSER iface)
463 {
464         ICOM_THIS(IDirectMusicComposerImpl,iface);
465         ULONG ref = --This->ref;
466         TRACE("(%p) : ReleaseRef to %ld\n", This, This->ref);
467         if (ref == 0)
468         {
469                 HeapFree(GetProcessHeap(), 0, This);
470         }
471         return ref;
472 }
473
474 /* IDirectMusicComposer Interface follow: */
475 HRESULT WINAPI IDirectMusicComposerImpl_ComposeSegmentFromTemplate (LPDIRECTMUSICCOMPOSER iface, IDirectMusicStyle* pStyle, IDirectMusicSegment* pTemplate, WORD wActivity, IDirectMusicChordMap* pChordMap, IDirectMusicSegment** ppSegment)
476 {
477         FIXME("stub\n");
478         return DS_OK;
479 }
480
481 HRESULT WINAPI IDirectMusicComposerImpl_ComposeSegmentFromShape (LPDIRECTMUSICCOMPOSER iface, IDirectMusicStyle* pStyle, WORD wNumMeasures, WORD wShape, WORD wActivity, BOOL fIntro, BOOL fEnd, IDirectMusicChordMap* pChordMap, IDirectMusicSegment** ppSegment)
482 {
483         FIXME("stub\n");
484         return DS_OK;
485 }
486
487 HRESULT WINAPI IDirectMusicComposerImpl_ComposeTransition (LPDIRECTMUSICCOMPOSER iface, IDirectMusicSegment* pFromSeg, IDirectMusicSegment* pToSeg, MUSIC_TIME mtTime, WORD wCommand, DWORD dwFlags, IDirectMusicChordMap* pChordMap, IDirectMusicSegment** ppTransSeg)
488 {
489         FIXME("stub\n");
490         return DS_OK;
491 }
492
493 HRESULT WINAPI IDirectMusicComposerImpl_AutoTransition (LPDIRECTMUSICCOMPOSER iface, IDirectMusicPerformance* pPerformance, IDirectMusicSegment* pToSeg, WORD wCommand, DWORD dwFlags, IDirectMusicChordMap* pChordMap, IDirectMusicSegment** ppTransSeg, IDirectMusicSegmentState** ppToSegState, IDirectMusicSegmentState** ppTransSegState)
494 {
495         FIXME("stub\n");
496         return DS_OK;
497 }
498
499 HRESULT WINAPI IDirectMusicComposerImpl_ComposeTemplateFromShape (LPDIRECTMUSICCOMPOSER iface, WORD wNumMeasures, WORD wShape, BOOL fIntro, BOOL fEnd, WORD wEndLength, IDirectMusicSegment** ppTemplate)
500 {
501         FIXME("stub\n");
502         return DS_OK;
503 }
504
505 HRESULT WINAPI IDirectMusicComposerImpl_ChangeChordMap (LPDIRECTMUSICCOMPOSER iface, IDirectMusicSegment* pSegment, BOOL fTrackScale, IDirectMusicChordMap* pChordMap)
506 {
507         FIXME("stub\n");
508         return DS_OK;
509 }
510
511 ICOM_VTABLE(IDirectMusicComposer) DirectMusicComposer_Vtbl =
512 {
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
523 };
524
525
526 /* IDirectMusicContainer IUnknown parts follow: */
527 HRESULT WINAPI IDirectMusicContainerImpl_QueryInterface (LPDIRECTMUSICCONTAINER iface, REFIID riid, LPVOID *ppobj)
528 {
529         ICOM_THIS(IDirectMusicContainerImpl,iface);
530
531         if (IsEqualGUID(riid, &IID_IUnknown) || IsEqualGUID(riid, &IID_IDirectMusicContainer))
532         {
533                 IDirectMusicContainerImpl_AddRef(iface);
534                 *ppobj = This;
535                 return DS_OK;
536         }
537         WARN("(%p)->(%s,%p),not found\n",This,debugstr_guid(riid),ppobj);
538         return E_NOINTERFACE;
539 }
540
541 ULONG WINAPI IDirectMusicContainerImpl_AddRef (LPDIRECTMUSICCONTAINER iface)
542 {
543         ICOM_THIS(IDirectMusicContainerImpl,iface);
544         TRACE("(%p) : AddRef from %ld\n", This, This->ref);
545         return ++(This->ref);
546 }
547
548 ULONG WINAPI IDirectMusicContainerImpl_Release (LPDIRECTMUSICCONTAINER iface)
549 {
550         ICOM_THIS(IDirectMusicContainerImpl,iface);
551         ULONG ref = --This->ref;
552         TRACE("(%p) : ReleaseRef to %ld\n", This, This->ref);
553         if (ref == 0)
554         {
555                 HeapFree(GetProcessHeap(), 0, This);
556         }
557         return ref;
558 }
559
560 /* IDirectMusicContainer Interface follow: */
561 HRESULT WINAPI IDirectMusicContainerImpl_EnumObject (LPDIRECTMUSICCONTAINER iface, REFGUID rguidClass, DWORD dwIndex, LPDMUS_OBJECTDESC pDesc, WCHAR* pwszAlias)
562 {
563         FIXME("stub\n");
564         return DS_OK;
565 }
566
567 ICOM_VTABLE(IDirectMusicContainer) DirectMusicContainer_Vtbl =
568 {
569     ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
570         IDirectMusicContainerImpl_QueryInterface,
571         IDirectMusicContainerImpl_AddRef,
572         IDirectMusicContainerImpl_Release,
573         IDirectMusicContainerImpl_EnumObject
574 };
575
576
577 /* IDirectMusicGraph IUnknown parts follow: */
578 HRESULT WINAPI IDirectMusicGraphImpl_QueryInterface (LPDIRECTMUSICGRAPH iface, REFIID riid, LPVOID *ppobj)
579 {
580         ICOM_THIS(IDirectMusicGraphImpl,iface);
581
582         if (IsEqualGUID(riid, &IID_IUnknown) || IsEqualGUID(riid, &IID_IDirectMusicGraph))
583         {
584                 IDirectMusicGraphImpl_AddRef(iface);
585                 *ppobj = This;
586                 return DS_OK;
587         }
588         WARN("(%p)->(%s,%p),not found\n",This,debugstr_guid(riid),ppobj);
589         return E_NOINTERFACE;
590 }
591
592 ULONG WINAPI IDirectMusicGraphImpl_AddRef (LPDIRECTMUSICGRAPH iface)
593 {
594         ICOM_THIS(IDirectMusicGraphImpl,iface);
595         TRACE("(%p) : AddRef from %ld\n", This, This->ref);
596         return ++(This->ref);
597 }
598
599 ULONG WINAPI IDirectMusicGraphImpl_Release (LPDIRECTMUSICGRAPH iface)
600 {
601         ICOM_THIS(IDirectMusicGraphImpl,iface);
602         ULONG ref = --This->ref;
603         TRACE("(%p) : ReleaseRef to %ld\n", This, This->ref);
604         if (ref == 0)
605         {
606                 HeapFree(GetProcessHeap(), 0, This);
607         }
608         return ref;
609 }
610
611 /* IDirectMusicGraph Interface follow: */
612 HRESULT WINAPI IDirectMusicGraphImpl_StampPMsg (LPDIRECTMUSICGRAPH iface, DMUS_PMSG* pPMSG)
613 {
614         FIXME("stub\n");
615         return DS_OK;
616 }
617
618 HRESULT WINAPI IDirectMusicGraphImpl_InsertTool (LPDIRECTMUSICGRAPH iface, IDirectMusicTool* pTool, DWORD* pdwPChannels, DWORD cPChannels, LONG lIndex)
619 {
620         FIXME("stub\n");
621         return DS_OK;
622 }
623
624 HRESULT WINAPI IDirectMusicGraphImpl_GetTool (LPDIRECTMUSICGRAPH iface, DWORD dwIndex, IDirectMusicTool** ppTool)
625 {
626         FIXME("stub\n");
627         return DS_OK;
628 }
629
630 HRESULT WINAPI IDirectMusicGraphImpl_RemoveTool (LPDIRECTMUSICGRAPH iface, IDirectMusicTool* pTool)
631 {
632         FIXME("stub\n");
633         return DS_OK;
634 }
635
636 ICOM_VTABLE(IDirectMusicGraph) DirectMusicGraph_Vtbl =
637 {
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
646 };
647
648
649 /* IDirectMusicScript IUnknown parts follow: */
650 HRESULT WINAPI IDirectMusicScriptImpl_QueryInterface (LPDIRECTMUSICSCRIPT iface, REFIID riid, LPVOID *ppobj)
651 {
652         ICOM_THIS(IDirectMusicScriptImpl,iface);
653
654         if (IsEqualGUID(riid, &IID_IUnknown) || IsEqualGUID(riid, &IID_IDirectMusicScript))
655         {
656                 IDirectMusicScriptImpl_AddRef(iface);
657                 *ppobj = This;
658                 return DS_OK;
659         }
660         WARN("(%p)->(%s,%p),not found\n",This,debugstr_guid(riid),ppobj);
661         return E_NOINTERFACE;
662 }
663
664 ULONG WINAPI IDirectMusicScriptImpl_AddRef (LPDIRECTMUSICSCRIPT iface)
665 {
666         ICOM_THIS(IDirectMusicScriptImpl,iface);
667         TRACE("(%p) : AddRef from %ld\n", This, This->ref);
668         return ++(This->ref);
669 }
670
671 ULONG WINAPI IDirectMusicScriptImpl_Release (LPDIRECTMUSICSCRIPT iface)
672 {
673         ICOM_THIS(IDirectMusicScriptImpl,iface);
674         ULONG ref = --This->ref;
675         TRACE("(%p) : ReleaseRef to %ld\n", This, This->ref);
676         if (ref == 0)
677         {
678                 HeapFree(GetProcessHeap(), 0, This);
679         }
680         return ref;
681 }
682
683 /* IDirectMusicScript Interface follow: */
684 HRESULT WINAPI IDirectMusicScriptImpl_Init (LPDIRECTMUSICSCRIPT iface, IDirectMusicPerformance* pPerformance, DMUS_SCRIPT_ERRORINFO* pErrorInfo)
685 {
686         FIXME("stub\n");
687         return DS_OK;
688 }
689
690 HRESULT WINAPI IDirectMusicScriptImpl_CallRoutine (LPDIRECTMUSICSCRIPT iface, WCHAR* pwszRoutineName, DMUS_SCRIPT_ERRORINFO* pErrorInfo)
691 {
692         FIXME("stub\n");
693         return DS_OK;
694 }
695
696 HRESULT WINAPI IDirectMusicScriptImpl_SetVariableVariant (LPDIRECTMUSICSCRIPT iface, WCHAR* pwszVariableName, VARIANT varValue, BOOL fSetRef, DMUS_SCRIPT_ERRORINFO* pErrorInfo)
697 {
698         FIXME("stub\n");
699         return DS_OK;
700 }
701
702 HRESULT WINAPI IDirectMusicScriptImpl_GetVariableVariant (LPDIRECTMUSICSCRIPT iface, WCHAR* pwszVariableName, VARIANT* pvarValue, DMUS_SCRIPT_ERRORINFO* pErrorInfo)
703 {
704         FIXME("stub\n");
705         return DS_OK;
706 }
707
708 HRESULT WINAPI IDirectMusicScriptImpl_SetVariableNumber (LPDIRECTMUSICSCRIPT iface, WCHAR* pwszVariableName, LONG lValue, DMUS_SCRIPT_ERRORINFO* pErrorInfo)
709 {
710         FIXME("stub\n");
711         return DS_OK;
712 }
713
714 HRESULT WINAPI IDirectMusicScriptImpl_GetVariableNumber (LPDIRECTMUSICSCRIPT iface, WCHAR* pwszVariableName, LONG* plValue, DMUS_SCRIPT_ERRORINFO* pErrorInfo)
715 {
716         FIXME("stub\n");
717         return DS_OK;
718 }
719
720 HRESULT WINAPI IDirectMusicScriptImpl_SetVariableObject (LPDIRECTMUSICSCRIPT iface, WCHAR* pwszVariableName, IUnknown* punkValue, DMUS_SCRIPT_ERRORINFO* pErrorInfo)
721 {
722         FIXME("stub\n");
723         return DS_OK;
724 }
725
726 HRESULT WINAPI IDirectMusicScriptImpl_GetVariableObject (LPDIRECTMUSICSCRIPT iface, WCHAR* pwszVariableName, REFIID riid, LPVOID* ppv, DMUS_SCRIPT_ERRORINFO* pErrorInfo)
727 {
728         FIXME("stub\n");
729         return DS_OK;
730 }
731
732 HRESULT WINAPI IDirectMusicScriptImpl_EnumRoutine (LPDIRECTMUSICSCRIPT iface, DWORD dwIndex, WCHAR* pwszName)
733 {
734         FIXME("stub\n");
735         return DS_OK;
736 }
737
738 HRESULT WINAPI IDirectMusicScriptImpl_EnumVariable (LPDIRECTMUSICSCRIPT iface, DWORD dwIndex, WCHAR* pwszName)
739 {
740         FIXME("stub\n");
741         return DS_OK;
742 }
743
744 ICOM_VTABLE(IDirectMusicScript) DirectMusicScript_Vtbl =
745 {
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
760 };