1 /* DirectMusicInteractiveEngine Main
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.
20 #include "dmime_private.h"
22 WINE_DEFAULT_DEBUG_CHANNEL(dmime
);
27 ICOM_VFIELD(IClassFactory
);
31 /******************************************************************
32 * DirectMusicPerformance ClassFactory
34 static HRESULT WINAPI
PerformanceCF_QueryInterface(LPCLASSFACTORY iface
,REFIID riid
,LPVOID
*ppobj
)
36 ICOM_THIS(IClassFactoryImpl
,iface
);
38 FIXME("(%p)->(%s,%p),stub!\n",This
,debugstr_guid(riid
),ppobj
);
42 static ULONG WINAPI
PerformanceCF_AddRef(LPCLASSFACTORY iface
)
44 ICOM_THIS(IClassFactoryImpl
,iface
);
48 static ULONG WINAPI
PerformanceCF_Release(LPCLASSFACTORY iface
)
50 ICOM_THIS(IClassFactoryImpl
,iface
);
51 /* static class, won't be freed */
55 static HRESULT WINAPI
PerformanceCF_CreateInstance(LPCLASSFACTORY iface
, LPUNKNOWN pOuter
, REFIID riid
, LPVOID
*ppobj
)
57 ICOM_THIS(IClassFactoryImpl
,iface
);
59 TRACE ("(%p)->(%p,%s,%p)\n", This
, pOuter
, debugstr_guid(riid
), ppobj
);
60 if (IsEqualIID (riid
, &IID_IDirectMusicPerformance
) ||
61 IsEqualIID (riid
, &IID_IDirectMusicPerformance8
)) {
62 return DMUSIC_CreateDirectMusicPerformance (riid
, (LPDIRECTMUSICPERFORMANCE8
*) ppobj
, pOuter
);
65 WARN("(%p)->(%s,%p),not found\n", This
, debugstr_guid(riid
), ppobj
);
69 static HRESULT WINAPI
PerformanceCF_LockServer(LPCLASSFACTORY iface
,BOOL dolock
)
71 ICOM_THIS(IClassFactoryImpl
,iface
);
72 FIXME("(%p)->(%d),stub!\n", This
, dolock
);
76 static ICOM_VTABLE(IClassFactory
) PerformanceCF_Vtbl
= {
77 ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
78 PerformanceCF_QueryInterface
,
80 PerformanceCF_Release
,
81 PerformanceCF_CreateInstance
,
82 PerformanceCF_LockServer
85 static IClassFactoryImpl Performance_CF
= {&PerformanceCF_Vtbl
, 1 };
87 /******************************************************************
88 * DirectMusicSegment ClassFactory
90 static HRESULT WINAPI
SegmentCF_QueryInterface(LPCLASSFACTORY iface
,REFIID riid
,LPVOID
*ppobj
)
92 ICOM_THIS(IClassFactoryImpl
,iface
);
94 FIXME("(%p)->(%s,%p),stub!\n",This
,debugstr_guid(riid
),ppobj
);
98 static ULONG WINAPI
SegmentCF_AddRef(LPCLASSFACTORY iface
)
100 ICOM_THIS(IClassFactoryImpl
,iface
);
101 return ++(This
->ref
);
104 static ULONG WINAPI
SegmentCF_Release(LPCLASSFACTORY iface
)
106 ICOM_THIS(IClassFactoryImpl
,iface
);
107 /* static class, won't be freed */
108 return --(This
->ref
);
111 static HRESULT WINAPI
SegmentCF_CreateInstance(LPCLASSFACTORY iface
, LPUNKNOWN pOuter
, REFIID riid
, LPVOID
*ppobj
)
113 ICOM_THIS(IClassFactoryImpl
,iface
);
115 TRACE ("(%p)->(%p,%s,%p)\n", This
, pOuter
, debugstr_guid(riid
), ppobj
);
116 if (IsEqualIID (riid
, &IID_IDirectMusicSegment
) ||
117 IsEqualIID (riid
, &IID_IDirectMusicSegment8
)) {
118 return DMUSIC_CreateDirectMusicSegment (riid
, (LPDIRECTMUSICSEGMENT8
*) ppobj
, pOuter
);
119 } else if (IsEqualIID (riid
, &IID_IDirectMusicObject
)) {
120 return DMUSIC_CreateDirectMusicSegmentObject (riid
, (LPDIRECTMUSICOBJECT
*) ppobj
, pOuter
);
123 WARN("(%p)->(%s,%p),not found\n", This
, debugstr_guid(riid
), ppobj
);
124 return E_NOINTERFACE
;
127 static HRESULT WINAPI
SegmentCF_LockServer(LPCLASSFACTORY iface
,BOOL dolock
)
129 ICOM_THIS(IClassFactoryImpl
,iface
);
130 FIXME("(%p)->(%d),stub!\n", This
, dolock
);
134 static ICOM_VTABLE(IClassFactory
) SegmentCF_Vtbl
= {
135 ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
136 SegmentCF_QueryInterface
,
139 SegmentCF_CreateInstance
,
143 static IClassFactoryImpl Segment_CF
= {&SegmentCF_Vtbl
, 1 };
145 /******************************************************************
146 * DirectMusicSegmentState ClassFactory
148 static HRESULT WINAPI
SegmentStateCF_QueryInterface(LPCLASSFACTORY iface
,REFIID riid
,LPVOID
*ppobj
)
150 ICOM_THIS(IClassFactoryImpl
,iface
);
152 FIXME("(%p)->(%s,%p),stub!\n",This
,debugstr_guid(riid
),ppobj
);
153 return E_NOINTERFACE
;
156 static ULONG WINAPI
SegmentStateCF_AddRef(LPCLASSFACTORY iface
)
158 ICOM_THIS(IClassFactoryImpl
,iface
);
159 return ++(This
->ref
);
162 static ULONG WINAPI
SegmentStateCF_Release(LPCLASSFACTORY iface
)
164 ICOM_THIS(IClassFactoryImpl
,iface
);
165 /* static class, won't be freed */
166 return --(This
->ref
);
169 static HRESULT WINAPI
SegmentStateCF_CreateInstance(LPCLASSFACTORY iface
, LPUNKNOWN pOuter
, REFIID riid
, LPVOID
*ppobj
)
171 ICOM_THIS(IClassFactoryImpl
,iface
);
173 TRACE ("(%p)->(%p,%s,%p)\n", This
, pOuter
, debugstr_guid(riid
), ppobj
);
174 if (IsEqualIID (riid
, &IID_IDirectMusicSegmentState
) ||
175 IsEqualIID (riid
, &IID_IDirectMusicSegmentState8
)) {
176 return DMUSIC_CreateDirectMusicSegmentState (riid
, (LPDIRECTMUSICSEGMENTSTATE8
*) ppobj
, pOuter
);
179 WARN("(%p)->(%s,%p),not found\n", This
, debugstr_guid(riid
), ppobj
);
180 return E_NOINTERFACE
;
183 static HRESULT WINAPI
SegmentStateCF_LockServer(LPCLASSFACTORY iface
,BOOL dolock
)
185 ICOM_THIS(IClassFactoryImpl
,iface
);
186 FIXME("(%p)->(%d),stub!\n", This
, dolock
);
190 static ICOM_VTABLE(IClassFactory
) SegmentStateCF_Vtbl
= {
191 ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
192 SegmentStateCF_QueryInterface
,
193 SegmentStateCF_AddRef
,
194 SegmentStateCF_Release
,
195 SegmentStateCF_CreateInstance
,
196 SegmentStateCF_LockServer
199 static IClassFactoryImpl SegmentState_CF
= {&SegmentStateCF_Vtbl
, 1 };
201 /******************************************************************
202 * DirectMusicGraph ClassFactory
204 static HRESULT WINAPI
GraphCF_QueryInterface(LPCLASSFACTORY iface
,REFIID riid
,LPVOID
*ppobj
)
206 ICOM_THIS(IClassFactoryImpl
,iface
);
208 FIXME("(%p)->(%s,%p),stub!\n",This
,debugstr_guid(riid
),ppobj
);
209 return E_NOINTERFACE
;
212 static ULONG WINAPI
GraphCF_AddRef(LPCLASSFACTORY iface
)
214 ICOM_THIS(IClassFactoryImpl
,iface
);
215 return ++(This
->ref
);
218 static ULONG WINAPI
GraphCF_Release(LPCLASSFACTORY iface
)
220 ICOM_THIS(IClassFactoryImpl
,iface
);
221 /* static class, won't be freed */
222 return --(This
->ref
);
225 static HRESULT WINAPI
GraphCF_CreateInstance(LPCLASSFACTORY iface
, LPUNKNOWN pOuter
, REFIID riid
, LPVOID
*ppobj
)
227 ICOM_THIS(IClassFactoryImpl
,iface
);
229 TRACE ("(%p)->(%p,%s,%p)\n", This
, pOuter
, debugstr_guid(riid
), ppobj
);
230 if (IsEqualIID (riid
, &IID_IDirectMusicGraph
)) {
231 return DMUSIC_CreateDirectMusicGraph (riid
, (LPDIRECTMUSICGRAPH
*) ppobj
, pOuter
);
232 } else if (IsEqualIID (riid
, &IID_IDirectMusicObject
)) {
233 return DMUSIC_CreateDirectMusicGraphObject (riid
, (LPDIRECTMUSICOBJECT
*) ppobj
, pOuter
);
236 WARN("(%p)->(%s,%p),not found\n", This
, debugstr_guid(riid
), ppobj
);
237 return E_NOINTERFACE
;
240 static HRESULT WINAPI
GraphCF_LockServer(LPCLASSFACTORY iface
,BOOL dolock
)
242 ICOM_THIS(IClassFactoryImpl
,iface
);
243 FIXME("(%p)->(%d),stub!\n", This
, dolock
);
247 static ICOM_VTABLE(IClassFactory
) GraphCF_Vtbl
= {
248 ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
249 GraphCF_QueryInterface
,
252 GraphCF_CreateInstance
,
256 static IClassFactoryImpl Graph_CF
= {&GraphCF_Vtbl
, 1 };
258 /******************************************************************
259 * DirectMusicTempoTrack ClassFactory
261 static HRESULT WINAPI
TempoTrackCF_QueryInterface(LPCLASSFACTORY iface
,REFIID riid
,LPVOID
*ppobj
)
263 ICOM_THIS(IClassFactoryImpl
,iface
);
265 FIXME("(%p)->(%s,%p),stub!\n",This
,debugstr_guid(riid
),ppobj
);
266 return E_NOINTERFACE
;
269 static ULONG WINAPI
TempoTrackCF_AddRef(LPCLASSFACTORY iface
)
271 ICOM_THIS(IClassFactoryImpl
,iface
);
272 return ++(This
->ref
);
275 static ULONG WINAPI
TempoTrackCF_Release(LPCLASSFACTORY iface
)
277 ICOM_THIS(IClassFactoryImpl
,iface
);
278 /* static class, won't be freed */
279 return --(This
->ref
);
282 static HRESULT WINAPI
TempoTrackCF_CreateInstance(LPCLASSFACTORY iface
, LPUNKNOWN pOuter
, REFIID riid
, LPVOID
*ppobj
)
284 ICOM_THIS(IClassFactoryImpl
,iface
);
286 TRACE ("(%p)->(%p,%s,%p)\n", This
, pOuter
, debugstr_guid(riid
), ppobj
);
287 if (IsEqualIID (riid
, &IID_IDirectMusicTrack
) ||
288 IsEqualIID (riid
, &IID_IDirectMusicTrack8
)) {
289 return DMUSIC_CreateDirectMusicTempoTrack (riid
, (LPDIRECTMUSICTRACK8
*) ppobj
, pOuter
);
292 WARN("(%p)->(%s,%p),not found\n", This
, debugstr_guid(riid
), ppobj
);
293 return E_NOINTERFACE
;
296 static HRESULT WINAPI
TempoTrackCF_LockServer(LPCLASSFACTORY iface
,BOOL dolock
)
298 ICOM_THIS(IClassFactoryImpl
,iface
);
299 FIXME("(%p)->(%d),stub!\n", This
, dolock
);
303 static ICOM_VTABLE(IClassFactory
) TempoTrackCF_Vtbl
= {
304 ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
305 TempoTrackCF_QueryInterface
,
307 TempoTrackCF_Release
,
308 TempoTrackCF_CreateInstance
,
309 TempoTrackCF_LockServer
312 static IClassFactoryImpl TempoTrack_CF
= {&TempoTrackCF_Vtbl
, 1 };
314 /******************************************************************
315 * DirectMusicSeqTrack ClassFactory
317 static HRESULT WINAPI
SeqTrackCF_QueryInterface(LPCLASSFACTORY iface
,REFIID riid
,LPVOID
*ppobj
)
319 ICOM_THIS(IClassFactoryImpl
,iface
);
321 FIXME("(%p)->(%s,%p),stub!\n",This
,debugstr_guid(riid
),ppobj
);
322 return E_NOINTERFACE
;
325 static ULONG WINAPI
SeqTrackCF_AddRef(LPCLASSFACTORY iface
)
327 ICOM_THIS(IClassFactoryImpl
,iface
);
328 return ++(This
->ref
);
331 static ULONG WINAPI
SeqTrackCF_Release(LPCLASSFACTORY iface
)
333 ICOM_THIS(IClassFactoryImpl
,iface
);
334 /* static class, won't be freed */
335 return --(This
->ref
);
338 static HRESULT WINAPI
SeqTrackCF_CreateInstance(LPCLASSFACTORY iface
, LPUNKNOWN pOuter
, REFIID riid
, LPVOID
*ppobj
)
340 ICOM_THIS(IClassFactoryImpl
,iface
);
342 TRACE ("(%p)->(%p,%s,%p)\n", This
, pOuter
, debugstr_guid(riid
), ppobj
);
343 if (IsEqualIID (riid
, &IID_IDirectMusicTrack
) ||
344 IsEqualIID (riid
, &IID_IDirectMusicTrack8
)) {
345 return DMUSIC_CreateDirectMusicSeqTrack (riid
, (LPDIRECTMUSICTRACK8
*) ppobj
, pOuter
);
348 WARN("(%p)->(%s,%p),not found\n", This
, debugstr_guid(riid
), ppobj
);
349 return E_NOINTERFACE
;
352 static HRESULT WINAPI
SeqTrackCF_LockServer(LPCLASSFACTORY iface
,BOOL dolock
)
354 ICOM_THIS(IClassFactoryImpl
,iface
);
355 FIXME("(%p)->(%d),stub!\n", This
, dolock
);
359 static ICOM_VTABLE(IClassFactory
) SeqTrackCF_Vtbl
= {
360 ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
361 SeqTrackCF_QueryInterface
,
364 SeqTrackCF_CreateInstance
,
365 SeqTrackCF_LockServer
368 static IClassFactoryImpl SeqTrack_CF
= {&SeqTrackCF_Vtbl
, 1 };
370 /******************************************************************
371 * DirectMusicSysExTrack ClassFactory
373 static HRESULT WINAPI
SysExTrackCF_QueryInterface(LPCLASSFACTORY iface
,REFIID riid
,LPVOID
*ppobj
)
375 ICOM_THIS(IClassFactoryImpl
,iface
);
377 FIXME("(%p)->(%s,%p),stub!\n",This
,debugstr_guid(riid
),ppobj
);
378 return E_NOINTERFACE
;
381 static ULONG WINAPI
SysExTrackCF_AddRef(LPCLASSFACTORY iface
)
383 ICOM_THIS(IClassFactoryImpl
,iface
);
384 return ++(This
->ref
);
387 static ULONG WINAPI
SysExTrackCF_Release(LPCLASSFACTORY iface
)
389 ICOM_THIS(IClassFactoryImpl
,iface
);
390 /* static class, won't be freed */
391 return --(This
->ref
);
394 static HRESULT WINAPI
SysExTrackCF_CreateInstance(LPCLASSFACTORY iface
, LPUNKNOWN pOuter
, REFIID riid
, LPVOID
*ppobj
)
396 ICOM_THIS(IClassFactoryImpl
,iface
);
398 TRACE ("(%p)->(%p,%s,%p)\n", This
, pOuter
, debugstr_guid(riid
), ppobj
);
399 if (IsEqualIID (riid
, &IID_IDirectMusicTrack
) ||
400 IsEqualIID (riid
, &IID_IDirectMusicTrack8
)) {
401 return DMUSIC_CreateDirectMusicSysExTrack (riid
, (LPDIRECTMUSICTRACK8
*) ppobj
, pOuter
);
404 WARN("(%p)->(%s,%p),not found\n", This
, debugstr_guid(riid
), ppobj
);
405 return E_NOINTERFACE
;
408 static HRESULT WINAPI
SysExTrackCF_LockServer(LPCLASSFACTORY iface
,BOOL dolock
)
410 ICOM_THIS(IClassFactoryImpl
,iface
);
411 FIXME("(%p)->(%d),stub!\n", This
, dolock
);
415 static ICOM_VTABLE(IClassFactory
) SysExTrackCF_Vtbl
= {
416 ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
417 SysExTrackCF_QueryInterface
,
419 SysExTrackCF_Release
,
420 SysExTrackCF_CreateInstance
,
421 SysExTrackCF_LockServer
424 static IClassFactoryImpl SysExTrack_CF
= {&SysExTrackCF_Vtbl
, 1 };
426 /******************************************************************
427 * DirectMusicTimeSigTrack ClassFactory
429 static HRESULT WINAPI
TimeSigTrackCF_QueryInterface(LPCLASSFACTORY iface
,REFIID riid
,LPVOID
*ppobj
)
431 ICOM_THIS(IClassFactoryImpl
,iface
);
433 FIXME("(%p)->(%s,%p),stub!\n",This
,debugstr_guid(riid
),ppobj
);
434 return E_NOINTERFACE
;
437 static ULONG WINAPI
TimeSigTrackCF_AddRef(LPCLASSFACTORY iface
)
439 ICOM_THIS(IClassFactoryImpl
,iface
);
440 return ++(This
->ref
);
443 static ULONG WINAPI
TimeSigTrackCF_Release(LPCLASSFACTORY iface
)
445 ICOM_THIS(IClassFactoryImpl
,iface
);
446 /* static class, won't be freed */
447 return --(This
->ref
);
450 static HRESULT WINAPI
TimeSigTrackCF_CreateInstance(LPCLASSFACTORY iface
, LPUNKNOWN pOuter
, REFIID riid
, LPVOID
*ppobj
)
452 ICOM_THIS(IClassFactoryImpl
,iface
);
454 TRACE ("(%p)->(%p,%s,%p)\n", This
, pOuter
, debugstr_guid(riid
), ppobj
);
455 if (IsEqualIID (riid
, &IID_IDirectMusicTrack
) ||
456 IsEqualIID (riid
, &IID_IDirectMusicTrack8
)) {
457 return DMUSIC_CreateDirectMusicTimeSigTrack (riid
, (LPDIRECTMUSICTRACK8
*) ppobj
, pOuter
);
460 WARN("(%p)->(%s,%p),not found\n", This
, debugstr_guid(riid
), ppobj
);
461 return E_NOINTERFACE
;
464 static HRESULT WINAPI
TimeSigTrackCF_LockServer(LPCLASSFACTORY iface
,BOOL dolock
)
466 ICOM_THIS(IClassFactoryImpl
,iface
);
467 FIXME("(%p)->(%d),stub!\n", This
, dolock
);
471 static ICOM_VTABLE(IClassFactory
) TimeSigTrackCF_Vtbl
= {
472 ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
473 TimeSigTrackCF_QueryInterface
,
474 TimeSigTrackCF_AddRef
,
475 TimeSigTrackCF_Release
,
476 TimeSigTrackCF_CreateInstance
,
477 TimeSigTrackCF_LockServer
480 static IClassFactoryImpl TimeSigTrack_CF
= {&TimeSigTrackCF_Vtbl
, 1 };
482 /******************************************************************
483 * DirectMusicParamControlTrack ClassFactory
485 static HRESULT WINAPI
ParamControlTrackCF_QueryInterface(LPCLASSFACTORY iface
,REFIID riid
,LPVOID
*ppobj
)
487 ICOM_THIS(IClassFactoryImpl
,iface
);
489 FIXME("(%p)->(%s,%p),stub!\n",This
,debugstr_guid(riid
),ppobj
);
490 return E_NOINTERFACE
;
493 static ULONG WINAPI
ParamControlTrackCF_AddRef(LPCLASSFACTORY iface
)
495 ICOM_THIS(IClassFactoryImpl
,iface
);
496 return ++(This
->ref
);
499 static ULONG WINAPI
ParamControlTrackCF_Release(LPCLASSFACTORY iface
)
501 ICOM_THIS(IClassFactoryImpl
,iface
);
502 /* static class, won't be freed */
503 return --(This
->ref
);
506 static HRESULT WINAPI
ParamControlTrackCF_CreateInstance(LPCLASSFACTORY iface
, LPUNKNOWN pOuter
, REFIID riid
, LPVOID
*ppobj
)
508 ICOM_THIS(IClassFactoryImpl
,iface
);
510 TRACE ("(%p)->(%p,%s,%p)\n", This
, pOuter
, debugstr_guid(riid
), ppobj
);
511 if (IsEqualIID (riid
, &IID_IDirectMusicTrack
) ||
512 IsEqualIID (riid
, &IID_IDirectMusicTrack8
)) {
513 return DMUSIC_CreateDirectMusicParamControlTrack (riid
, (LPDIRECTMUSICTRACK8
*) ppobj
, pOuter
);
516 WARN("(%p)->(%s,%p),not found\n", This
, debugstr_guid(riid
), ppobj
);
517 return E_NOINTERFACE
;
520 static HRESULT WINAPI
ParamControlTrackCF_LockServer(LPCLASSFACTORY iface
,BOOL dolock
)
522 ICOM_THIS(IClassFactoryImpl
,iface
);
523 FIXME("(%p)->(%d),stub!\n", This
, dolock
);
527 static ICOM_VTABLE(IClassFactory
) ParamControlTrackCF_Vtbl
= {
528 ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
529 ParamControlTrackCF_QueryInterface
,
530 ParamControlTrackCF_AddRef
,
531 ParamControlTrackCF_Release
,
532 ParamControlTrackCF_CreateInstance
,
533 ParamControlTrackCF_LockServer
536 static IClassFactoryImpl ParamControlTrack_CF
= {&ParamControlTrackCF_Vtbl
, 1 };
538 /******************************************************************
539 * DirectMusicMarkerTrack ClassFactory
541 static HRESULT WINAPI
MarkerTrackCF_QueryInterface(LPCLASSFACTORY iface
,REFIID riid
,LPVOID
*ppobj
)
543 ICOM_THIS(IClassFactoryImpl
,iface
);
545 FIXME("(%p)->(%s,%p),stub!\n",This
,debugstr_guid(riid
),ppobj
);
546 return E_NOINTERFACE
;
549 static ULONG WINAPI
MarkerTrackCF_AddRef(LPCLASSFACTORY iface
)
551 ICOM_THIS(IClassFactoryImpl
,iface
);
552 return ++(This
->ref
);
555 static ULONG WINAPI
MarkerTrackCF_Release(LPCLASSFACTORY iface
)
557 ICOM_THIS(IClassFactoryImpl
,iface
);
558 /* static class, won't be freed */
559 return --(This
->ref
);
562 static HRESULT WINAPI
MarkerTrackCF_CreateInstance(LPCLASSFACTORY iface
, LPUNKNOWN pOuter
, REFIID riid
, LPVOID
*ppobj
)
564 ICOM_THIS(IClassFactoryImpl
,iface
);
566 TRACE ("(%p)->(%p,%s,%p)\n", This
, pOuter
, debugstr_guid(riid
), ppobj
);
567 if (IsEqualIID (riid
, &IID_IDirectMusicTrack
) ||
568 IsEqualIID (riid
, &IID_IDirectMusicTrack8
)) {
569 return DMUSIC_CreateDirectMusicMarkerTrack (riid
, (LPDIRECTMUSICTRACK8
*) ppobj
, pOuter
);
572 WARN("(%p)->(%s,%p),not found\n", This
, debugstr_guid(riid
), ppobj
);
573 return E_NOINTERFACE
;
576 static HRESULT WINAPI
MarkerTrackCF_LockServer(LPCLASSFACTORY iface
,BOOL dolock
)
578 ICOM_THIS(IClassFactoryImpl
,iface
);
579 FIXME("(%p)->(%d),stub!\n", This
, dolock
);
583 static ICOM_VTABLE(IClassFactory
) MarkerTrackCF_Vtbl
= {
584 ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
585 MarkerTrackCF_QueryInterface
,
586 MarkerTrackCF_AddRef
,
587 MarkerTrackCF_Release
,
588 MarkerTrackCF_CreateInstance
,
589 MarkerTrackCF_LockServer
592 static IClassFactoryImpl MarkerTrack_CF
= {&MarkerTrackCF_Vtbl
, 1 };
594 /******************************************************************
595 * DirectMusicLyricsTrack ClassFactory
597 static HRESULT WINAPI
LyricsTrackCF_QueryInterface(LPCLASSFACTORY iface
,REFIID riid
,LPVOID
*ppobj
)
599 ICOM_THIS(IClassFactoryImpl
,iface
);
601 FIXME("(%p)->(%s,%p),stub!\n",This
,debugstr_guid(riid
),ppobj
);
602 return E_NOINTERFACE
;
605 static ULONG WINAPI
LyricsTrackCF_AddRef(LPCLASSFACTORY iface
)
607 ICOM_THIS(IClassFactoryImpl
,iface
);
608 return ++(This
->ref
);
611 static ULONG WINAPI
LyricsTrackCF_Release(LPCLASSFACTORY iface
)
613 ICOM_THIS(IClassFactoryImpl
,iface
);
614 /* static class, won't be freed */
615 return --(This
->ref
);
618 static HRESULT WINAPI
LyricsTrackCF_CreateInstance(LPCLASSFACTORY iface
, LPUNKNOWN pOuter
, REFIID riid
, LPVOID
*ppobj
)
620 ICOM_THIS(IClassFactoryImpl
,iface
);
622 TRACE ("(%p)->(%p,%s,%p)\n", This
, pOuter
, debugstr_guid(riid
), ppobj
);
623 if (IsEqualIID (riid
, &IID_IDirectMusicTrack
) ||
624 IsEqualIID (riid
, &IID_IDirectMusicTrack8
)) {
625 return DMUSIC_CreateDirectMusicLyricsTrack (riid
, (LPDIRECTMUSICTRACK8
*) ppobj
, pOuter
);
628 WARN("(%p)->(%s,%p),not found\n", This
, debugstr_guid(riid
), ppobj
);
629 return E_NOINTERFACE
;
632 static HRESULT WINAPI
LyricsTrackCF_LockServer(LPCLASSFACTORY iface
,BOOL dolock
)
634 ICOM_THIS(IClassFactoryImpl
,iface
);
635 FIXME("(%p)->(%d),stub!\n", This
, dolock
);
639 static ICOM_VTABLE(IClassFactory
) LyricsTrackCF_Vtbl
= {
640 ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
641 LyricsTrackCF_QueryInterface
,
642 LyricsTrackCF_AddRef
,
643 LyricsTrackCF_Release
,
644 LyricsTrackCF_CreateInstance
,
645 LyricsTrackCF_LockServer
648 static IClassFactoryImpl LyricsTrack_CF
= {&LyricsTrackCF_Vtbl
, 1 };
650 /******************************************************************
651 * DirectMusicSong ClassFactory
653 static HRESULT WINAPI
SongCF_QueryInterface(LPCLASSFACTORY iface
,REFIID riid
,LPVOID
*ppobj
)
655 ICOM_THIS(IClassFactoryImpl
,iface
);
657 FIXME("(%p)->(%s,%p),stub!\n",This
,debugstr_guid(riid
),ppobj
);
658 return E_NOINTERFACE
;
661 static ULONG WINAPI
SongCF_AddRef(LPCLASSFACTORY iface
)
663 ICOM_THIS(IClassFactoryImpl
,iface
);
664 return ++(This
->ref
);
667 static ULONG WINAPI
SongCF_Release(LPCLASSFACTORY iface
)
669 ICOM_THIS(IClassFactoryImpl
,iface
);
670 /* static class, won't be freed */
671 return --(This
->ref
);
674 static HRESULT WINAPI
SongCF_CreateInstance(LPCLASSFACTORY iface
, LPUNKNOWN pOuter
, REFIID riid
, LPVOID
*ppobj
)
676 ICOM_THIS(IClassFactoryImpl
,iface
);
678 TRACE ("(%p)->(%p,%s,%p)\n", This
, pOuter
, debugstr_guid(riid
), ppobj
);
679 if (IsEqualIID (riid
, &IID_IDirectMusicSong
)) {
680 return DMUSIC_CreateDirectMusicPerformance (riid
, (LPDIRECTMUSICPERFORMANCE8
*) ppobj
, pOuter
);
681 } else if (IsEqualIID (riid
, &IID_IDirectMusicObject
)) {
682 return DMUSIC_CreateDirectMusicSongObject (riid
, (LPDIRECTMUSICOBJECT
*) ppobj
, pOuter
);
685 WARN("(%p)->(%s,%p),not found\n", This
, debugstr_guid(riid
), ppobj
);
686 return E_NOINTERFACE
;
689 static HRESULT WINAPI
SongCF_LockServer(LPCLASSFACTORY iface
,BOOL dolock
)
691 ICOM_THIS(IClassFactoryImpl
,iface
);
692 FIXME("(%p)->(%d),stub!\n", This
, dolock
);
696 static ICOM_VTABLE(IClassFactory
) SongCF_Vtbl
= {
697 ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
698 SongCF_QueryInterface
,
701 SongCF_CreateInstance
,
705 static IClassFactoryImpl Song_CF
= {&SongCF_Vtbl
, 1 };
707 /******************************************************************
708 * DirectMusicSegTriggerTrack ClassFactory
710 static HRESULT WINAPI
SegTriggerTrackCF_QueryInterface(LPCLASSFACTORY iface
,REFIID riid
,LPVOID
*ppobj
)
712 ICOM_THIS(IClassFactoryImpl
,iface
);
714 FIXME("(%p)->(%s,%p),stub!\n",This
,debugstr_guid(riid
),ppobj
);
715 return E_NOINTERFACE
;
718 static ULONG WINAPI
SegTriggerTrackCF_AddRef(LPCLASSFACTORY iface
)
720 ICOM_THIS(IClassFactoryImpl
,iface
);
721 return ++(This
->ref
);
724 static ULONG WINAPI
SegTriggerTrackCF_Release(LPCLASSFACTORY iface
)
726 ICOM_THIS(IClassFactoryImpl
,iface
);
727 /* static class, won't be freed */
728 return --(This
->ref
);
731 static HRESULT WINAPI
SegTriggerTrackCF_CreateInstance(LPCLASSFACTORY iface
, LPUNKNOWN pOuter
, REFIID riid
, LPVOID
*ppobj
)
733 ICOM_THIS(IClassFactoryImpl
,iface
);
735 TRACE ("(%p)->(%p,%s,%p)\n", This
, pOuter
, debugstr_guid(riid
), ppobj
);
736 if (IsEqualIID (riid
, &IID_IDirectMusicTrack
) ||
737 IsEqualIID (riid
, &IID_IDirectMusicTrack8
)) {
738 return DMUSIC_CreateDirectMusicSegTriggerTrack (riid
, (LPDIRECTMUSICTRACK8
*) ppobj
, pOuter
);
741 WARN("(%p)->(%s,%p),not found\n", This
, debugstr_guid(riid
), ppobj
);
742 return E_NOINTERFACE
;
745 static HRESULT WINAPI
SegTriggerTrackCF_LockServer(LPCLASSFACTORY iface
,BOOL dolock
)
747 ICOM_THIS(IClassFactoryImpl
,iface
);
748 FIXME("(%p)->(%d),stub!\n", This
, dolock
);
752 static ICOM_VTABLE(IClassFactory
) SegTriggerTrackCF_Vtbl
= {
753 ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
754 SegTriggerTrackCF_QueryInterface
,
755 SegTriggerTrackCF_AddRef
,
756 SegTriggerTrackCF_Release
,
757 SegTriggerTrackCF_CreateInstance
,
758 SegTriggerTrackCF_LockServer
761 static IClassFactoryImpl SegTriggerTrack_CF
= {&SegTriggerTrackCF_Vtbl
, 1 };
766 /******************************************************************
767 * DirectMusicAudioPath ClassFactory
769 static HRESULT WINAPI
AudioPathCF_QueryInterface(LPCLASSFACTORY iface
,REFIID riid
,LPVOID
*ppobj
)
771 ICOM_THIS(IClassFactoryImpl
,iface
);
773 FIXME("(%p)->(%s,%p),stub!\n",This
,debugstr_guid(riid
),ppobj
);
774 return E_NOINTERFACE
;
777 static ULONG WINAPI
AudioPathCF_AddRef(LPCLASSFACTORY iface
)
779 ICOM_THIS(IClassFactoryImpl
,iface
);
780 return ++(This
->ref
);
783 static ULONG WINAPI
AudioPathCF_Release(LPCLASSFACTORY iface
)
785 ICOM_THIS(IClassFactoryImpl
,iface
);
786 /* static class, won't be freed */
787 return --(This
->ref
);
790 static HRESULT WINAPI
AudioPathCF_CreateInstance(LPCLASSFACTORY iface
, LPUNKNOWN pOuter
, REFIID riid
, LPVOID
*ppobj
)
792 ICOM_THIS(IClassFactoryImpl
,iface
);
794 TRACE ("(%p)->(%p,%s,%p)\n", This
, pOuter
, debugstr_guid(riid
), ppobj
);
795 if (IsEqualIID (riid
, &IID_IDirectMusicAudioPath
)) {
796 return DMUSIC_CreateDirectMusicAudioPath (riid
, (LPDIRECTMUSICAUDIOPATH
*) ppobj
, pOuter
);
797 } else if (IsEqualIID (riid
, &IID_IDirectMusicObject
)) {
798 return DMUSIC_CreateDirectMusicAudioPathObject (riid
, (LPDIRECTMUSICOBJECT
*) ppobj
, pOuter
);
801 WARN("(%p)->(%s,%p),not found\n", This
, debugstr_guid(riid
), ppobj
);
802 return E_NOINTERFACE
;
805 static HRESULT WINAPI
AudioPathCF_LockServer(LPCLASSFACTORY iface
,BOOL dolock
)
807 ICOM_THIS(IClassFactoryImpl
,iface
);
808 FIXME("(%p)->(%d),stub!\n", This
, dolock
);
812 static ICOM_VTABLE(IClassFactory
) AudioPathCF_Vtbl
= {
813 ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
814 AudioPathCF_QueryInterface
,
817 AudioPathCF_CreateInstance
,
818 AudioPathCF_LockServer
821 static IClassFactoryImpl AudioPath_CF
= {&AudioPathCF_Vtbl
, 1 };
823 /******************************************************************
824 * DirectMusicWaveTrack ClassFactory
826 static HRESULT WINAPI
WaveTrackCF_QueryInterface(LPCLASSFACTORY iface
,REFIID riid
,LPVOID
*ppobj
)
828 ICOM_THIS(IClassFactoryImpl
,iface
);
830 FIXME("(%p)->(%s,%p),stub!\n",This
,debugstr_guid(riid
),ppobj
);
831 return E_NOINTERFACE
;
834 static ULONG WINAPI
WaveTrackCF_AddRef(LPCLASSFACTORY iface
)
836 ICOM_THIS(IClassFactoryImpl
,iface
);
837 return ++(This
->ref
);
840 static ULONG WINAPI
WaveTrackCF_Release(LPCLASSFACTORY iface
)
842 ICOM_THIS(IClassFactoryImpl
,iface
);
843 /* static class, won't be freed */
844 return --(This
->ref
);
847 static HRESULT WINAPI
WaveTrackCF_CreateInstance(LPCLASSFACTORY iface
, LPUNKNOWN pOuter
, REFIID riid
, LPVOID
*ppobj
)
849 ICOM_THIS(IClassFactoryImpl
,iface
);
851 TRACE ("(%p)->(%p,%s,%p)\n", This
, pOuter
, debugstr_guid(riid
), ppobj
);
852 if (IsEqualIID (riid
, &IID_IDirectMusicTrack
) ||
853 IsEqualIID (riid
, &IID_IDirectMusicTrack8
)) {
854 return DMUSIC_CreateDirectMusicWaveTrack (riid
, (LPDIRECTMUSICTRACK8
*) ppobj
, pOuter
);
857 WARN("(%p)->(%s,%p),not found\n", This
, debugstr_guid(riid
), ppobj
);
858 return E_NOINTERFACE
;
861 static HRESULT WINAPI
WaveTrackCF_LockServer(LPCLASSFACTORY iface
,BOOL dolock
)
863 ICOM_THIS(IClassFactoryImpl
,iface
);
864 FIXME("(%p)->(%d),stub!\n", This
, dolock
);
868 static ICOM_VTABLE(IClassFactory
) WaveTrackCF_Vtbl
= {
869 ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
870 WaveTrackCF_QueryInterface
,
873 WaveTrackCF_CreateInstance
,
874 WaveTrackCF_LockServer
877 static IClassFactoryImpl WaveTrack_CF
= {&WaveTrackCF_Vtbl
, 1 };
879 /******************************************************************
884 BOOL WINAPI
DllMain(HINSTANCE hinstDLL
, DWORD fdwReason
, LPVOID lpvReserved
)
886 if (fdwReason
== DLL_PROCESS_ATTACH
)
888 DisableThreadLibraryCalls(hinstDLL
);
889 /* FIXME: Initialisation */
891 else if (fdwReason
== DLL_PROCESS_DETACH
)
900 /******************************************************************
901 * DllCanUnloadNow (DMIME.1)
905 HRESULT WINAPI
DMIME_DllCanUnloadNow(void)
907 FIXME("(void): stub\n");
913 /******************************************************************
914 * DllGetClassObject (DMIME.2)
918 HRESULT WINAPI
DMIME_DllGetClassObject(REFCLSID rclsid
, REFIID riid
, LPVOID
*ppv
)
920 TRACE("(%p,%p,%p)\n", debugstr_guid(rclsid
), debugstr_guid(riid
), ppv
);
921 if (IsEqualCLSID (rclsid
, &CLSID_DirectMusicPerformance
) && IsEqualIID (riid
, &IID_IClassFactory
)) {
922 *ppv
= (LPVOID
) &Performance_CF
;
923 IClassFactory_AddRef((IClassFactory
*)*ppv
);
925 } else if (IsEqualCLSID (rclsid
, &CLSID_DirectMusicSegment
) && IsEqualIID (riid
, &IID_IClassFactory
)) {
926 *ppv
= (LPVOID
) &Segment_CF
;
927 IClassFactory_AddRef((IClassFactory
*)*ppv
);
929 } else if (IsEqualCLSID (rclsid
, &CLSID_DirectMusicSegmentState
) && IsEqualIID (riid
, &IID_IClassFactory
)) {
930 *ppv
= (LPVOID
) &SegmentState_CF
;
931 IClassFactory_AddRef((IClassFactory
*)*ppv
);
933 } else if (IsEqualCLSID (rclsid
, &CLSID_DirectMusicGraph
) && IsEqualIID (riid
, &IID_IClassFactory
)) {
934 *ppv
= (LPVOID
) &Graph_CF
;
935 IClassFactory_AddRef((IClassFactory
*)*ppv
);
937 } else if (IsEqualCLSID (rclsid
, &CLSID_DirectMusicTempoTrack
) && IsEqualIID (riid
, &IID_IClassFactory
)) {
938 *ppv
= (LPVOID
) &TempoTrack_CF
;
939 IClassFactory_AddRef((IClassFactory
*)*ppv
);
941 } else if (IsEqualCLSID (rclsid
, &CLSID_DirectMusicSeqTrack
) && IsEqualIID (riid
, &IID_IClassFactory
)) {
942 *ppv
= (LPVOID
) &SeqTrack_CF
;
943 IClassFactory_AddRef((IClassFactory
*)*ppv
);
945 } else if (IsEqualCLSID (rclsid
, &CLSID_DirectMusicSysExTrack
) && IsEqualIID (riid
, &IID_IClassFactory
)) {
946 *ppv
= (LPVOID
) &SysExTrack_CF
;
947 IClassFactory_AddRef((IClassFactory
*)*ppv
);
949 } else if (IsEqualCLSID (rclsid
, &CLSID_DirectMusicTimeSigTrack
) && IsEqualIID (riid
, &IID_IClassFactory
)) {
950 *ppv
= (LPVOID
) &TimeSigTrack_CF
;
951 IClassFactory_AddRef((IClassFactory
*)*ppv
);
953 } else if (IsEqualCLSID (rclsid
, &CLSID_DirectMusicParamControlTrack
) && IsEqualIID (riid
, &IID_IClassFactory
)) {
954 *ppv
= (LPVOID
) &ParamControlTrack_CF
;
955 IClassFactory_AddRef((IClassFactory
*)*ppv
);
957 } else if (IsEqualCLSID (rclsid
, &CLSID_DirectMusicMarkerTrack
) && IsEqualIID (riid
, &IID_IClassFactory
)) {
958 *ppv
= (LPVOID
) &MarkerTrack_CF
;
959 IClassFactory_AddRef((IClassFactory
*)*ppv
);
961 } else if (IsEqualCLSID (rclsid
, &CLSID_DirectMusicLyricsTrack
) && IsEqualIID (riid
, &IID_IClassFactory
)) {
962 *ppv
= (LPVOID
) &LyricsTrack_CF
;
963 IClassFactory_AddRef((IClassFactory
*)*ppv
);
965 } else if (IsEqualCLSID (rclsid
, &CLSID_DirectMusicSong
) && IsEqualIID (riid
, &IID_IClassFactory
)) {
966 *ppv
= (LPVOID
) &Song_CF
;
967 IClassFactory_AddRef((IClassFactory
*)*ppv
);
969 } else if (IsEqualCLSID (rclsid
, &CLSID_DirectMusicSegTriggerTrack
) && IsEqualIID (riid
, &IID_IClassFactory
)) {
970 *ppv
= (LPVOID
) &SegTriggerTrack_CF
;
971 IClassFactory_AddRef((IClassFactory
*)*ppv
);
973 } else if (IsEqualCLSID (rclsid
, &CLSID_DirectMusicAudioPath
) && IsEqualIID (riid
, &IID_IClassFactory
)) {
974 *ppv
= (LPVOID
) &AudioPath_CF
;
975 IClassFactory_AddRef((IClassFactory
*)*ppv
);
977 } else if (IsEqualCLSID (rclsid
, &CLSID_DirectMusicWaveTrack
) && IsEqualIID (riid
, &IID_IClassFactory
)) {
978 *ppv
= (LPVOID
) &WaveTrack_CF
;
979 IClassFactory_AddRef((IClassFactory
*)*ppv
);
983 WARN("(%p,%p,%p): no interface found.\n", debugstr_guid(rclsid
), debugstr_guid(riid
), ppv
);
984 return CLASS_E_CLASSNOTAVAILABLE
;