1 /* DirectMusicInteractiveEngine Main
3 * Copyright (C) 2003-2004 Rok Mandeljc
4 * Copyright (C) 2003-2004 Raphael Junqueira
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
21 #include "dmime_private.h"
24 WINE_DEFAULT_DEBUG_CHANNEL(dmime
);
26 static HINSTANCE instance
;
27 LONG DMIME_refCount
= 0;
30 const IClassFactoryVtbl
*lpVtbl
;
33 /******************************************************************
34 * DirectMusicPerformance ClassFactory
36 static HRESULT WINAPI
PerformanceCF_QueryInterface(LPCLASSFACTORY iface
,REFIID riid
,LPVOID
*ppobj
) {
37 FIXME("- no interface IID: %s\n", debugstr_guid(riid
));
39 if (ppobj
== NULL
) return E_POINTER
;
44 static ULONG WINAPI
PerformanceCF_AddRef(LPCLASSFACTORY iface
) {
47 return 2; /* non-heap based object */
50 static ULONG WINAPI
PerformanceCF_Release(LPCLASSFACTORY iface
) {
53 return 1; /* non-heap based object */
56 static HRESULT WINAPI
PerformanceCF_CreateInstance(LPCLASSFACTORY iface
, LPUNKNOWN pOuter
, REFIID riid
, LPVOID
*ppobj
) {
57 TRACE ("(%p, %s, %p)\n", pOuter
, debugstr_dmguid(riid
), ppobj
);
59 return DMUSIC_CreateDirectMusicPerformanceImpl (riid
, ppobj
, pOuter
);
62 static HRESULT WINAPI
PerformanceCF_LockServer(LPCLASSFACTORY iface
,BOOL dolock
) {
63 TRACE("(%d)\n", dolock
);
73 static const IClassFactoryVtbl PerformanceCF_Vtbl
= {
74 PerformanceCF_QueryInterface
,
76 PerformanceCF_Release
,
77 PerformanceCF_CreateInstance
,
78 PerformanceCF_LockServer
81 static IClassFactoryImpl Performance_CF
= {&PerformanceCF_Vtbl
};
83 /******************************************************************
84 * DirectMusicSegment ClassFactory
86 static HRESULT WINAPI
SegmentCF_QueryInterface(LPCLASSFACTORY iface
,REFIID riid
,LPVOID
*ppobj
) {
87 FIXME("- no interface IID: %s\n", debugstr_guid(riid
));
89 if (ppobj
== NULL
) return E_POINTER
;
94 static ULONG WINAPI
SegmentCF_AddRef(LPCLASSFACTORY iface
) {
97 return 2; /* non-heap based object */
100 static ULONG WINAPI
SegmentCF_Release(LPCLASSFACTORY iface
) {
101 DMIME_UnlockModule();
103 return 1; /* non-heap based object */
106 static HRESULT WINAPI
SegmentCF_CreateInstance(LPCLASSFACTORY iface
, LPUNKNOWN pOuter
, REFIID riid
, LPVOID
*ppobj
) {
107 TRACE ("(%p, %s, %p)\n", pOuter
, debugstr_dmguid(riid
), ppobj
);
109 return DMUSIC_CreateDirectMusicSegmentImpl (riid
, ppobj
, pOuter
);
112 static HRESULT WINAPI
SegmentCF_LockServer(LPCLASSFACTORY iface
,BOOL dolock
) {
113 TRACE("(%d)\n", dolock
);
118 DMIME_UnlockModule();
123 static const IClassFactoryVtbl SegmentCF_Vtbl
= {
124 SegmentCF_QueryInterface
,
127 SegmentCF_CreateInstance
,
131 static IClassFactoryImpl Segment_CF
= {&SegmentCF_Vtbl
};
133 /******************************************************************
134 * DirectMusicSegmentState ClassFactory
136 static HRESULT WINAPI
SegmentStateCF_QueryInterface(LPCLASSFACTORY iface
,REFIID riid
,LPVOID
*ppobj
) {
137 FIXME("- no interface IID: %s\n", debugstr_guid(riid
));
139 if (ppobj
== NULL
) return E_POINTER
;
141 return E_NOINTERFACE
;
144 static ULONG WINAPI
SegmentStateCF_AddRef(LPCLASSFACTORY iface
) {
147 return 2; /* non-heap based objects */
150 static ULONG WINAPI
SegmentStateCF_Release(LPCLASSFACTORY iface
) {
151 DMIME_UnlockModule();
153 return 1; /* non-heap based object */
156 static HRESULT WINAPI
SegmentStateCF_CreateInstance(LPCLASSFACTORY iface
, LPUNKNOWN pOuter
, REFIID riid
, LPVOID
*ppobj
) {
157 TRACE ("(%p, %s, %p)\n", pOuter
, debugstr_dmguid(riid
), ppobj
);
159 return DMUSIC_CreateDirectMusicSegmentStateImpl (riid
, ppobj
, pOuter
);
162 static HRESULT WINAPI
SegmentStateCF_LockServer(LPCLASSFACTORY iface
,BOOL dolock
) {
163 TRACE("(%d)\n", dolock
);
168 DMIME_UnlockModule();
173 static const IClassFactoryVtbl SegmentStateCF_Vtbl
= {
174 SegmentStateCF_QueryInterface
,
175 SegmentStateCF_AddRef
,
176 SegmentStateCF_Release
,
177 SegmentStateCF_CreateInstance
,
178 SegmentStateCF_LockServer
181 static IClassFactoryImpl SegmentState_CF
= {&SegmentStateCF_Vtbl
};
183 /******************************************************************
184 * DirectMusicGraph ClassFactory
186 static HRESULT WINAPI
GraphCF_QueryInterface(LPCLASSFACTORY iface
,REFIID riid
,LPVOID
*ppobj
) {
187 FIXME("- no interface IID: %s\n", debugstr_guid(riid
));
189 if (ppobj
== NULL
) return E_POINTER
;
191 return E_NOINTERFACE
;
194 static ULONG WINAPI
GraphCF_AddRef(LPCLASSFACTORY iface
) {
197 return 2; /* non-heap based object */
200 static ULONG WINAPI
GraphCF_Release(LPCLASSFACTORY iface
) {
201 DMIME_UnlockModule();
203 return 1; /* non-heap based object */
206 static HRESULT WINAPI
GraphCF_CreateInstance(LPCLASSFACTORY iface
, LPUNKNOWN pOuter
, REFIID riid
, LPVOID
*ppobj
) {
207 TRACE ("(%p, %s, %p)\n", pOuter
, debugstr_dmguid(riid
), ppobj
);
209 return DMUSIC_CreateDirectMusicGraphImpl (riid
, ppobj
, pOuter
);
212 static HRESULT WINAPI
GraphCF_LockServer(LPCLASSFACTORY iface
,BOOL dolock
) {
213 TRACE("(%d)\n", dolock
);
218 DMIME_UnlockModule();
223 static const IClassFactoryVtbl GraphCF_Vtbl
= {
224 GraphCF_QueryInterface
,
227 GraphCF_CreateInstance
,
231 static IClassFactoryImpl Graph_CF
= {&GraphCF_Vtbl
};
233 /******************************************************************
234 * DirectMusicTempoTrack ClassFactory
236 static HRESULT WINAPI
TempoTrackCF_QueryInterface(LPCLASSFACTORY iface
,REFIID riid
,LPVOID
*ppobj
) {
237 FIXME("- no interface IID: %s\n", debugstr_guid(riid
));
239 if (ppobj
== NULL
) return E_POINTER
;
241 return E_NOINTERFACE
;
244 static ULONG WINAPI
TempoTrackCF_AddRef(LPCLASSFACTORY iface
) {
247 return 2; /* non-heap based object */
250 static ULONG WINAPI
TempoTrackCF_Release(LPCLASSFACTORY iface
) {
251 DMIME_UnlockModule();
253 return 1; /* non-heap based object */
256 static HRESULT WINAPI
TempoTrackCF_CreateInstance(LPCLASSFACTORY iface
, LPUNKNOWN pOuter
, REFIID riid
, LPVOID
*ppobj
) {
257 TRACE ("(%p, %s, %p)\n", pOuter
, debugstr_dmguid(riid
), ppobj
);
259 return DMUSIC_CreateDirectMusicTempoTrack (riid
, ppobj
, pOuter
);
262 static HRESULT WINAPI
TempoTrackCF_LockServer(LPCLASSFACTORY iface
,BOOL dolock
) {
263 TRACE("(%d)\n", dolock
);
268 DMIME_UnlockModule();
273 static const IClassFactoryVtbl TempoTrackCF_Vtbl
= {
274 TempoTrackCF_QueryInterface
,
276 TempoTrackCF_Release
,
277 TempoTrackCF_CreateInstance
,
278 TempoTrackCF_LockServer
281 static IClassFactoryImpl TempoTrack_CF
= {&TempoTrackCF_Vtbl
};
283 /******************************************************************
284 * DirectMusicSeqTrack ClassFactory
286 static HRESULT WINAPI
SeqTrackCF_QueryInterface(LPCLASSFACTORY iface
,REFIID riid
,LPVOID
*ppobj
) {
287 FIXME("- no interface IID: %s\n", debugstr_guid(riid
));
289 if (ppobj
== NULL
) return E_POINTER
;
291 return E_NOINTERFACE
;
294 static ULONG WINAPI
SeqTrackCF_AddRef(LPCLASSFACTORY iface
) {
297 return 2; /* non-heap based object */
300 static ULONG WINAPI
SeqTrackCF_Release(LPCLASSFACTORY iface
) {
301 DMIME_UnlockModule();
303 return 1; /* non-heap based object */
306 static HRESULT WINAPI
SeqTrackCF_CreateInstance(LPCLASSFACTORY iface
, LPUNKNOWN pOuter
, REFIID riid
, LPVOID
*ppobj
) {
307 TRACE ("(%p, %s, %p)\n", pOuter
, debugstr_dmguid(riid
), ppobj
);
309 return DMUSIC_CreateDirectMusicSeqTrack (riid
, ppobj
, pOuter
);
312 static HRESULT WINAPI
SeqTrackCF_LockServer(LPCLASSFACTORY iface
,BOOL dolock
) {
313 TRACE("(%d)\n", dolock
);
318 DMIME_UnlockModule();
323 static const IClassFactoryVtbl SeqTrackCF_Vtbl
= {
324 SeqTrackCF_QueryInterface
,
327 SeqTrackCF_CreateInstance
,
328 SeqTrackCF_LockServer
331 static IClassFactoryImpl SeqTrack_CF
= {&SeqTrackCF_Vtbl
};
333 /******************************************************************
334 * DirectMusicSysExTrack ClassFactory
336 static HRESULT WINAPI
SysExTrackCF_QueryInterface(LPCLASSFACTORY iface
,REFIID riid
,LPVOID
*ppobj
) {
337 FIXME("- no interface IID: %s\n", debugstr_guid(riid
));
339 if (ppobj
== NULL
) return E_POINTER
;
341 return E_NOINTERFACE
;
344 static ULONG WINAPI
SysExTrackCF_AddRef(LPCLASSFACTORY iface
) {
347 return 2; /* non-heap based object */
350 static ULONG WINAPI
SysExTrackCF_Release(LPCLASSFACTORY iface
) {
351 DMIME_UnlockModule();
353 return 1; /* non-heap based object */
356 static HRESULT WINAPI
SysExTrackCF_CreateInstance(LPCLASSFACTORY iface
, LPUNKNOWN pOuter
, REFIID riid
, LPVOID
*ppobj
) {
357 TRACE ("(%p, %s, %p)\n", pOuter
, debugstr_dmguid(riid
), ppobj
);
358 return DMUSIC_CreateDirectMusicSysExTrack (riid
, ppobj
, pOuter
);
361 static HRESULT WINAPI
SysExTrackCF_LockServer(LPCLASSFACTORY iface
,BOOL dolock
) {
362 TRACE("(%d)\n", dolock
);
367 DMIME_UnlockModule();
372 static const IClassFactoryVtbl SysExTrackCF_Vtbl
= {
373 SysExTrackCF_QueryInterface
,
375 SysExTrackCF_Release
,
376 SysExTrackCF_CreateInstance
,
377 SysExTrackCF_LockServer
380 static IClassFactoryImpl SysExTrack_CF
= {&SysExTrackCF_Vtbl
};
382 /******************************************************************
383 * DirectMusicTimeSigTrack ClassFactory
385 static HRESULT WINAPI
TimeSigTrackCF_QueryInterface(LPCLASSFACTORY iface
,REFIID riid
,LPVOID
*ppobj
) {
386 FIXME("- no interface IID: %s\n", debugstr_guid(riid
));
388 if (ppobj
== NULL
) return E_POINTER
;
390 return E_NOINTERFACE
;
393 static ULONG WINAPI
TimeSigTrackCF_AddRef(LPCLASSFACTORY iface
) {
396 return 2; /* non-heap based object */
399 static ULONG WINAPI
TimeSigTrackCF_Release(LPCLASSFACTORY iface
) {
400 DMIME_UnlockModule();
402 return 1; /* non-heap based object */
405 static HRESULT WINAPI
TimeSigTrackCF_CreateInstance(LPCLASSFACTORY iface
, LPUNKNOWN pOuter
, REFIID riid
, LPVOID
*ppobj
) {
406 TRACE ("(%p, %s, %p)\n", pOuter
, debugstr_dmguid(riid
), ppobj
);
408 return DMUSIC_CreateDirectMusicTimeSigTrack (riid
, ppobj
, pOuter
);
411 static HRESULT WINAPI
TimeSigTrackCF_LockServer(LPCLASSFACTORY iface
,BOOL dolock
) {
412 TRACE("(%d)\n", dolock
);
417 DMIME_UnlockModule();
422 static const IClassFactoryVtbl TimeSigTrackCF_Vtbl
= {
423 TimeSigTrackCF_QueryInterface
,
424 TimeSigTrackCF_AddRef
,
425 TimeSigTrackCF_Release
,
426 TimeSigTrackCF_CreateInstance
,
427 TimeSigTrackCF_LockServer
430 static IClassFactoryImpl TimeSigTrack_CF
= {&TimeSigTrackCF_Vtbl
};
432 /******************************************************************
433 * DirectMusicParamControlTrack ClassFactory
435 static HRESULT WINAPI
ParamControlTrackCF_QueryInterface(LPCLASSFACTORY iface
,REFIID riid
,LPVOID
*ppobj
) {
436 FIXME("- no interface IID: %s\n", debugstr_guid(riid
));
438 if (ppobj
== NULL
) return E_POINTER
;
440 return E_NOINTERFACE
;
443 static ULONG WINAPI
ParamControlTrackCF_AddRef(LPCLASSFACTORY iface
) {
446 return 2; /* non-heap based object */
449 static ULONG WINAPI
ParamControlTrackCF_Release(LPCLASSFACTORY iface
) {
450 DMIME_UnlockModule();
452 return 1; /* non-heap based object */
455 static HRESULT WINAPI
ParamControlTrackCF_CreateInstance(LPCLASSFACTORY iface
, LPUNKNOWN pOuter
, REFIID riid
, LPVOID
*ppobj
) {
456 TRACE ("(%p, %s, %p)\n", pOuter
, debugstr_dmguid(riid
), ppobj
);
458 return DMUSIC_CreateDirectMusicParamControlTrack (riid
, ppobj
, pOuter
);
461 static HRESULT WINAPI
ParamControlTrackCF_LockServer(LPCLASSFACTORY iface
,BOOL dolock
) {
462 TRACE("(%d)\n", dolock
);
467 DMIME_UnlockModule();
472 static const IClassFactoryVtbl ParamControlTrackCF_Vtbl
= {
473 ParamControlTrackCF_QueryInterface
,
474 ParamControlTrackCF_AddRef
,
475 ParamControlTrackCF_Release
,
476 ParamControlTrackCF_CreateInstance
,
477 ParamControlTrackCF_LockServer
480 static IClassFactoryImpl ParamControlTrack_CF
= {&ParamControlTrackCF_Vtbl
};
482 /******************************************************************
483 * DirectMusicMarkerTrack ClassFactory
485 static HRESULT WINAPI
MarkerTrackCF_QueryInterface(LPCLASSFACTORY iface
,REFIID riid
,LPVOID
*ppobj
) {
486 FIXME("- no interface IID: %s\n", debugstr_guid(riid
));
488 if (ppobj
== NULL
) return E_POINTER
;
490 return E_NOINTERFACE
;
493 static ULONG WINAPI
MarkerTrackCF_AddRef(LPCLASSFACTORY iface
) {
496 return 2; /* non-heap based object */
499 static ULONG WINAPI
MarkerTrackCF_Release(LPCLASSFACTORY iface
) {
500 DMIME_UnlockModule();
502 return 1; /* non-heap based object */
505 static HRESULT WINAPI
MarkerTrackCF_CreateInstance(LPCLASSFACTORY iface
, LPUNKNOWN pOuter
, REFIID riid
, LPVOID
*ppobj
) {
506 TRACE ("(%p, %s, %p)\n", pOuter
, debugstr_dmguid(riid
), ppobj
);
508 return DMUSIC_CreateDirectMusicMarkerTrack (riid
, ppobj
, pOuter
);
511 static HRESULT WINAPI
MarkerTrackCF_LockServer(LPCLASSFACTORY iface
,BOOL dolock
) {
512 TRACE("(%d)\n", dolock
);
517 DMIME_UnlockModule();
522 static const IClassFactoryVtbl MarkerTrackCF_Vtbl
= {
523 MarkerTrackCF_QueryInterface
,
524 MarkerTrackCF_AddRef
,
525 MarkerTrackCF_Release
,
526 MarkerTrackCF_CreateInstance
,
527 MarkerTrackCF_LockServer
530 static IClassFactoryImpl MarkerTrack_CF
= {&MarkerTrackCF_Vtbl
};
532 /******************************************************************
533 * DirectMusicLyricsTrack ClassFactory
535 static HRESULT WINAPI
LyricsTrackCF_QueryInterface(LPCLASSFACTORY iface
,REFIID riid
,LPVOID
*ppobj
) {
536 FIXME("- no interface IID: %s\n", debugstr_guid(riid
));
538 if (ppobj
== NULL
) return E_POINTER
;
540 return E_NOINTERFACE
;
543 static ULONG WINAPI
LyricsTrackCF_AddRef(LPCLASSFACTORY iface
) {
546 return 2; /* non-heap based object */
549 static ULONG WINAPI
LyricsTrackCF_Release(LPCLASSFACTORY iface
) {
550 DMIME_UnlockModule();
552 return 1; /* non-heap based object */
555 static HRESULT WINAPI
LyricsTrackCF_CreateInstance(LPCLASSFACTORY iface
, LPUNKNOWN pOuter
, REFIID riid
, LPVOID
*ppobj
) {
556 TRACE ("(%p, %s, %p)\n", pOuter
, debugstr_dmguid(riid
), ppobj
);
558 return DMUSIC_CreateDirectMusicLyricsTrack (riid
, ppobj
, pOuter
);
561 static HRESULT WINAPI
LyricsTrackCF_LockServer(LPCLASSFACTORY iface
,BOOL dolock
) {
562 TRACE("(%d)\n", dolock
);
567 DMIME_UnlockModule();
572 static const IClassFactoryVtbl LyricsTrackCF_Vtbl
= {
573 LyricsTrackCF_QueryInterface
,
574 LyricsTrackCF_AddRef
,
575 LyricsTrackCF_Release
,
576 LyricsTrackCF_CreateInstance
,
577 LyricsTrackCF_LockServer
580 static IClassFactoryImpl LyricsTrack_CF
= {&LyricsTrackCF_Vtbl
};
583 /******************************************************************
584 * DirectMusicSegTriggerTrack ClassFactory
586 static HRESULT WINAPI
SegTriggerTrackCF_QueryInterface(LPCLASSFACTORY iface
,REFIID riid
,LPVOID
*ppobj
) {
587 FIXME("- no interface IID: %s\n", debugstr_guid(riid
));
589 if (ppobj
== NULL
) return E_POINTER
;
591 return E_NOINTERFACE
;
594 static ULONG WINAPI
SegTriggerTrackCF_AddRef(LPCLASSFACTORY iface
) {
597 return 2; /* non-heap based object */
600 static ULONG WINAPI
SegTriggerTrackCF_Release(LPCLASSFACTORY iface
) {
601 DMIME_UnlockModule();
603 return 1; /* non-heap based object */
606 static HRESULT WINAPI
SegTriggerTrackCF_CreateInstance(LPCLASSFACTORY iface
, LPUNKNOWN pOuter
, REFIID riid
, LPVOID
*ppobj
) {
607 TRACE ("(%p, %s, %p)\n", pOuter
, debugstr_dmguid(riid
), ppobj
);
609 return DMUSIC_CreateDirectMusicSegTriggerTrack (riid
, ppobj
, pOuter
);
612 static HRESULT WINAPI
SegTriggerTrackCF_LockServer(LPCLASSFACTORY iface
,BOOL dolock
) {
613 TRACE("(%d)\n", dolock
);
618 DMIME_UnlockModule();
623 static const IClassFactoryVtbl SegTriggerTrackCF_Vtbl
= {
624 SegTriggerTrackCF_QueryInterface
,
625 SegTriggerTrackCF_AddRef
,
626 SegTriggerTrackCF_Release
,
627 SegTriggerTrackCF_CreateInstance
,
628 SegTriggerTrackCF_LockServer
631 static IClassFactoryImpl SegTriggerTrack_CF
= {&SegTriggerTrackCF_Vtbl
};
633 /******************************************************************
634 * DirectMusicAudioPath ClassFactory
636 static HRESULT WINAPI
AudioPathCF_QueryInterface(LPCLASSFACTORY iface
,REFIID riid
,LPVOID
*ppobj
) {
637 FIXME("- no interface IID: %s\n", debugstr_guid(riid
));
639 if (ppobj
== NULL
) return E_POINTER
;
641 return E_NOINTERFACE
;
644 static ULONG WINAPI
AudioPathCF_AddRef(LPCLASSFACTORY iface
) {
647 return 2; /* non-heap based object */
650 static ULONG WINAPI
AudioPathCF_Release(LPCLASSFACTORY iface
) {
651 DMIME_UnlockModule();
653 return 1; /* non-heap based object */
656 static HRESULT WINAPI
AudioPathCF_CreateInstance(LPCLASSFACTORY iface
, LPUNKNOWN pOuter
, REFIID riid
, LPVOID
*ppobj
) {
657 TRACE ("(%p, %s, %p)\n", pOuter
, debugstr_dmguid(riid
), ppobj
);
659 return DMUSIC_CreateDirectMusicAudioPathImpl (riid
, ppobj
, pOuter
);
662 static HRESULT WINAPI
AudioPathCF_LockServer(LPCLASSFACTORY iface
,BOOL dolock
) {
663 TRACE("(%d)\n", dolock
);
668 DMIME_UnlockModule();
673 static const IClassFactoryVtbl AudioPathCF_Vtbl
= {
674 AudioPathCF_QueryInterface
,
677 AudioPathCF_CreateInstance
,
678 AudioPathCF_LockServer
681 static IClassFactoryImpl AudioPath_CF
= {&AudioPathCF_Vtbl
};
683 /******************************************************************
684 * DirectMusicWaveTrack ClassFactory
686 static HRESULT WINAPI
WaveTrackCF_QueryInterface(LPCLASSFACTORY iface
,REFIID riid
,LPVOID
*ppobj
) {
687 FIXME("- no interface IID: %s\n", debugstr_guid(riid
));
689 if (ppobj
== NULL
) return E_POINTER
;
691 return E_NOINTERFACE
;
694 static ULONG WINAPI
WaveTrackCF_AddRef(LPCLASSFACTORY iface
) {
697 return 2; /* non-heap based object */
700 static ULONG WINAPI
WaveTrackCF_Release(LPCLASSFACTORY iface
) {
701 DMIME_UnlockModule();
703 return 1; /* non-heap based object */
706 static HRESULT WINAPI
WaveTrackCF_CreateInstance(LPCLASSFACTORY iface
, LPUNKNOWN pOuter
, REFIID riid
, LPVOID
*ppobj
) {
707 TRACE ("(%p, %s, %p)\n", pOuter
, debugstr_dmguid(riid
), ppobj
);
709 return DMUSIC_CreateDirectMusicWaveTrack (riid
, ppobj
, pOuter
);
712 static HRESULT WINAPI
WaveTrackCF_LockServer(LPCLASSFACTORY iface
,BOOL dolock
) {
713 TRACE("(%d)\n", dolock
);
718 DMIME_UnlockModule();
723 static const IClassFactoryVtbl WaveTrackCF_Vtbl
= {
724 WaveTrackCF_QueryInterface
,
727 WaveTrackCF_CreateInstance
,
728 WaveTrackCF_LockServer
731 static IClassFactoryImpl WaveTrack_CF
= {&WaveTrackCF_Vtbl
};
733 /******************************************************************
738 BOOL WINAPI
DllMain(HINSTANCE hinstDLL
, DWORD fdwReason
, LPVOID lpvReserved
) {
739 if (fdwReason
== DLL_PROCESS_ATTACH
) {
741 DisableThreadLibraryCalls(hinstDLL
);
742 /* FIXME: Initialisation */
744 else if (fdwReason
== DLL_PROCESS_DETACH
) {
752 /******************************************************************
753 * DllCanUnloadNow (DMIME.1)
757 HRESULT WINAPI
DllCanUnloadNow(void)
759 return DMIME_refCount
!= 0 ? S_FALSE
: S_OK
;
763 /******************************************************************
764 * DllGetClassObject (DMIME.@)
768 HRESULT WINAPI
DllGetClassObject(REFCLSID rclsid
, REFIID riid
, LPVOID
*ppv
)
770 TRACE("(%s, %s, %p)\n", debugstr_dmguid(rclsid
), debugstr_dmguid(riid
), ppv
);
771 if (IsEqualCLSID (rclsid
, &CLSID_DirectMusicPerformance
) && IsEqualIID (riid
, &IID_IClassFactory
)) {
772 *ppv
= &Performance_CF
;
773 IClassFactory_AddRef((IClassFactory
*)*ppv
);
775 } else if (IsEqualCLSID (rclsid
, &CLSID_DirectMusicSegment
) && IsEqualIID (riid
, &IID_IClassFactory
)) {
777 IClassFactory_AddRef((IClassFactory
*)*ppv
);
779 } else if (IsEqualCLSID (rclsid
, &CLSID_DirectMusicSegmentState
) && IsEqualIID (riid
, &IID_IClassFactory
)) {
780 *ppv
= &SegmentState_CF
;
781 IClassFactory_AddRef((IClassFactory
*)*ppv
);
783 } else if (IsEqualCLSID (rclsid
, &CLSID_DirectMusicGraph
) && IsEqualIID (riid
, &IID_IClassFactory
)) {
785 IClassFactory_AddRef((IClassFactory
*)*ppv
);
787 } else if (IsEqualCLSID (rclsid
, &CLSID_DirectMusicTempoTrack
) && IsEqualIID (riid
, &IID_IClassFactory
)) {
788 *ppv
= &TempoTrack_CF
;
789 IClassFactory_AddRef((IClassFactory
*)*ppv
);
791 } else if (IsEqualCLSID (rclsid
, &CLSID_DirectMusicSeqTrack
) && IsEqualIID (riid
, &IID_IClassFactory
)) {
793 IClassFactory_AddRef((IClassFactory
*)*ppv
);
795 } else if (IsEqualCLSID (rclsid
, &CLSID_DirectMusicSysExTrack
) && IsEqualIID (riid
, &IID_IClassFactory
)) {
796 *ppv
= &SysExTrack_CF
;
797 IClassFactory_AddRef((IClassFactory
*)*ppv
);
799 } else if (IsEqualCLSID (rclsid
, &CLSID_DirectMusicTimeSigTrack
) && IsEqualIID (riid
, &IID_IClassFactory
)) {
800 *ppv
= &TimeSigTrack_CF
;
801 IClassFactory_AddRef((IClassFactory
*)*ppv
);
803 } else if (IsEqualCLSID (rclsid
, &CLSID_DirectMusicParamControlTrack
) && IsEqualIID (riid
, &IID_IClassFactory
)) {
804 *ppv
= &ParamControlTrack_CF
;
805 IClassFactory_AddRef((IClassFactory
*)*ppv
);
807 } else if (IsEqualCLSID (rclsid
, &CLSID_DirectMusicMarkerTrack
) && IsEqualIID (riid
, &IID_IClassFactory
)) {
808 *ppv
= &MarkerTrack_CF
;
809 IClassFactory_AddRef((IClassFactory
*)*ppv
);
811 } else if (IsEqualCLSID (rclsid
, &CLSID_DirectMusicLyricsTrack
) && IsEqualIID (riid
, &IID_IClassFactory
)) {
812 *ppv
= &LyricsTrack_CF
;
813 IClassFactory_AddRef((IClassFactory
*)*ppv
);
815 } else if (IsEqualCLSID (rclsid
, &CLSID_DirectMusicSegTriggerTrack
) && IsEqualIID (riid
, &IID_IClassFactory
)) {
816 *ppv
= &SegTriggerTrack_CF
;
817 IClassFactory_AddRef((IClassFactory
*)*ppv
);
819 } else if (IsEqualCLSID (rclsid
, &CLSID_DirectMusicAudioPath
) && IsEqualIID (riid
, &IID_IClassFactory
)) {
820 *ppv
= &AudioPath_CF
;
821 IClassFactory_AddRef((IClassFactory
*)*ppv
);
823 } else if (IsEqualCLSID (rclsid
, &CLSID_DirectMusicWaveTrack
) && IsEqualIID (riid
, &IID_IClassFactory
)) {
824 *ppv
= &WaveTrack_CF
;
825 IClassFactory_AddRef((IClassFactory
*)*ppv
);
829 WARN("(%s, %s, %p): no interface found.\n", debugstr_dmguid(rclsid
), debugstr_dmguid(riid
), ppv
);
830 return CLASS_E_CLASSNOTAVAILABLE
;
833 /***********************************************************************
834 * DllRegisterServer (DMIME.@)
836 HRESULT WINAPI
DllRegisterServer(void)
838 return __wine_register_resources( instance
, NULL
);
841 /***********************************************************************
842 * DllUnregisterServer (DMIME.@)
844 HRESULT WINAPI
DllUnregisterServer(void)
846 return __wine_unregister_resources( instance
, NULL
);