2003-07-22 00:10:14 +02:00
|
|
|
/* DirectMusicStyle Main
|
|
|
|
*
|
2004-01-20 01:21:40 +01:00
|
|
|
* Copyright (C) 2003-2004 Rok Mandeljc
|
2003-07-22 00:10:14 +02:00
|
|
|
*
|
2007-05-30 12:54:07 +02:00
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
2003-07-22 00:10:14 +02:00
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
2007-05-30 12:54:07 +02:00
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
2003-07-22 00:10:14 +02:00
|
|
|
*
|
2007-05-30 12:54:07 +02:00
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this program; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
2003-07-22 00:10:14 +02:00
|
|
|
*/
|
|
|
|
|
|
|
|
#include "dmstyle_private.h"
|
|
|
|
|
2003-08-23 01:53:27 +02:00
|
|
|
WINE_DEFAULT_DEBUG_CHANNEL(dmstyle);
|
2003-07-22 00:10:14 +02:00
|
|
|
|
2005-01-24 20:33:23 +01:00
|
|
|
LONG DMSTYLE_refCount = 0;
|
|
|
|
|
2004-01-20 01:21:40 +01:00
|
|
|
typedef struct {
|
2005-05-30 12:01:08 +02:00
|
|
|
const IClassFactoryVtbl *lpVtbl;
|
2003-07-22 00:10:14 +02:00
|
|
|
} IClassFactoryImpl;
|
|
|
|
|
2003-08-23 01:53:27 +02:00
|
|
|
/******************************************************************
|
|
|
|
* DirectMusicSection ClassFactory
|
|
|
|
*/
|
2004-01-20 01:21:40 +01:00
|
|
|
static HRESULT WINAPI SectionCF_QueryInterface(LPCLASSFACTORY iface,REFIID riid,LPVOID *ppobj) {
|
2005-01-24 20:33:23 +01:00
|
|
|
FIXME("- no interface\n\tIID:\t%s\n", debugstr_guid(riid));
|
|
|
|
|
|
|
|
if (ppobj == NULL) return E_POINTER;
|
|
|
|
|
2003-08-23 01:53:27 +02:00
|
|
|
return E_NOINTERFACE;
|
|
|
|
}
|
|
|
|
|
2004-01-20 01:21:40 +01:00
|
|
|
static ULONG WINAPI SectionCF_AddRef(LPCLASSFACTORY iface) {
|
2005-01-24 20:33:23 +01:00
|
|
|
DMSTYLE_LockModule();
|
|
|
|
|
|
|
|
return 2; /* non-heap based object */
|
2003-08-23 01:53:27 +02:00
|
|
|
}
|
|
|
|
|
2004-01-20 01:21:40 +01:00
|
|
|
static ULONG WINAPI SectionCF_Release(LPCLASSFACTORY iface) {
|
2005-01-24 20:33:23 +01:00
|
|
|
DMSTYLE_UnlockModule();
|
|
|
|
|
|
|
|
return 1; /* non-heap based object */
|
2003-08-23 01:53:27 +02:00
|
|
|
}
|
|
|
|
|
2004-01-20 01:21:40 +01:00
|
|
|
static HRESULT WINAPI SectionCF_CreateInstance(LPCLASSFACTORY iface, LPUNKNOWN pOuter, REFIID riid, LPVOID *ppobj) {
|
2005-01-24 20:33:23 +01:00
|
|
|
TRACE ("(%p, %s, %p)\n", pOuter, debugstr_dmguid(riid), ppobj);
|
|
|
|
|
2003-08-23 01:53:27 +02:00
|
|
|
/* nothing here yet */
|
2005-01-24 20:33:23 +01:00
|
|
|
WARN("(%s, %p): not found\n", debugstr_dmguid(riid), ppobj);
|
|
|
|
|
2003-08-23 01:53:27 +02:00
|
|
|
return E_NOINTERFACE;
|
|
|
|
}
|
|
|
|
|
2004-01-20 01:21:40 +01:00
|
|
|
static HRESULT WINAPI SectionCF_LockServer(LPCLASSFACTORY iface,BOOL dolock) {
|
2005-01-24 20:33:23 +01:00
|
|
|
TRACE("(%d)\n", dolock);
|
|
|
|
|
|
|
|
if (dolock)
|
|
|
|
DMSTYLE_LockModule();
|
|
|
|
else
|
|
|
|
DMSTYLE_UnlockModule();
|
|
|
|
|
2003-08-23 01:53:27 +02:00
|
|
|
return S_OK;
|
|
|
|
}
|
|
|
|
|
2005-05-30 12:01:08 +02:00
|
|
|
static const IClassFactoryVtbl SectionCF_Vtbl = {
|
2003-08-23 01:53:27 +02:00
|
|
|
SectionCF_QueryInterface,
|
|
|
|
SectionCF_AddRef,
|
|
|
|
SectionCF_Release,
|
|
|
|
SectionCF_CreateInstance,
|
|
|
|
SectionCF_LockServer
|
|
|
|
};
|
|
|
|
|
2005-01-24 20:33:23 +01:00
|
|
|
static IClassFactoryImpl Section_CF = {&SectionCF_Vtbl};
|
2003-08-23 01:53:27 +02:00
|
|
|
|
|
|
|
/******************************************************************
|
|
|
|
* DirectMusicStyle ClassFactory
|
|
|
|
*/
|
2004-01-20 01:21:40 +01:00
|
|
|
static HRESULT WINAPI StyleCF_QueryInterface(LPCLASSFACTORY iface,REFIID riid,LPVOID *ppobj) {
|
2005-01-24 20:33:23 +01:00
|
|
|
FIXME("- no interface\n\tIID:\t%s\n", debugstr_guid(riid));
|
|
|
|
|
|
|
|
if (ppobj == NULL) return E_POINTER;
|
|
|
|
|
2003-08-23 01:53:27 +02:00
|
|
|
return E_NOINTERFACE;
|
|
|
|
}
|
|
|
|
|
2004-01-20 01:21:40 +01:00
|
|
|
static ULONG WINAPI StyleCF_AddRef(LPCLASSFACTORY iface) {
|
2005-01-24 20:33:23 +01:00
|
|
|
DMSTYLE_LockModule();
|
|
|
|
|
|
|
|
return 2; /* non-heap based object */
|
2003-08-23 01:53:27 +02:00
|
|
|
}
|
|
|
|
|
2004-01-20 01:21:40 +01:00
|
|
|
static ULONG WINAPI StyleCF_Release(LPCLASSFACTORY iface) {
|
2005-01-24 20:33:23 +01:00
|
|
|
DMSTYLE_UnlockModule();
|
|
|
|
|
|
|
|
return 1; /* non-heap based object */
|
2003-08-23 01:53:27 +02:00
|
|
|
}
|
|
|
|
|
2004-01-20 01:21:40 +01:00
|
|
|
static HRESULT WINAPI StyleCF_CreateInstance(LPCLASSFACTORY iface, LPUNKNOWN pOuter, REFIID riid, LPVOID *ppobj) {
|
2005-01-24 20:33:23 +01:00
|
|
|
TRACE ("(%p, %s, %p)\n", pOuter, debugstr_dmguid(riid), ppobj);
|
|
|
|
|
2004-01-20 01:21:40 +01:00
|
|
|
return DMUSIC_CreateDirectMusicStyleImpl (riid, ppobj, pOuter);
|
2003-08-23 01:53:27 +02:00
|
|
|
}
|
|
|
|
|
2004-01-20 01:21:40 +01:00
|
|
|
static HRESULT WINAPI StyleCF_LockServer(LPCLASSFACTORY iface,BOOL dolock) {
|
2005-01-24 20:33:23 +01:00
|
|
|
TRACE("(%d)\n", dolock);
|
|
|
|
|
|
|
|
if (dolock)
|
|
|
|
DMSTYLE_LockModule();
|
|
|
|
else
|
|
|
|
DMSTYLE_UnlockModule();
|
|
|
|
|
2003-08-23 01:53:27 +02:00
|
|
|
return S_OK;
|
|
|
|
}
|
|
|
|
|
2005-05-30 12:01:08 +02:00
|
|
|
static const IClassFactoryVtbl StyleCF_Vtbl = {
|
2003-08-23 01:53:27 +02:00
|
|
|
StyleCF_QueryInterface,
|
|
|
|
StyleCF_AddRef,
|
|
|
|
StyleCF_Release,
|
|
|
|
StyleCF_CreateInstance,
|
|
|
|
StyleCF_LockServer
|
|
|
|
};
|
|
|
|
|
2005-01-24 20:33:23 +01:00
|
|
|
static IClassFactoryImpl Style_CF = {&StyleCF_Vtbl};
|
2003-08-23 01:53:27 +02:00
|
|
|
|
|
|
|
/******************************************************************
|
|
|
|
* DirectMusicChordTrack ClassFactory
|
|
|
|
*/
|
2004-01-20 01:21:40 +01:00
|
|
|
static HRESULT WINAPI ChordTrackCF_QueryInterface(LPCLASSFACTORY iface,REFIID riid,LPVOID *ppobj) {
|
2005-01-24 20:33:23 +01:00
|
|
|
FIXME("- no interface\n\tIID:\t%s\n", debugstr_guid(riid));
|
|
|
|
|
|
|
|
if (ppobj == NULL) return E_POINTER;
|
|
|
|
|
2003-08-23 01:53:27 +02:00
|
|
|
return E_NOINTERFACE;
|
|
|
|
}
|
|
|
|
|
2004-01-20 01:21:40 +01:00
|
|
|
static ULONG WINAPI ChordTrackCF_AddRef(LPCLASSFACTORY iface) {
|
2005-01-24 20:33:23 +01:00
|
|
|
DMSTYLE_LockModule();
|
|
|
|
|
|
|
|
return 2; /* non-heap based object */
|
2003-08-23 01:53:27 +02:00
|
|
|
}
|
|
|
|
|
2004-01-20 01:21:40 +01:00
|
|
|
static ULONG WINAPI ChordTrackCF_Release(LPCLASSFACTORY iface) {
|
2005-01-24 20:33:23 +01:00
|
|
|
DMSTYLE_UnlockModule();
|
|
|
|
|
|
|
|
return 1; /* non-heap based object */
|
2003-08-23 01:53:27 +02:00
|
|
|
}
|
|
|
|
|
2004-01-20 01:21:40 +01:00
|
|
|
static HRESULT WINAPI ChordTrackCF_CreateInstance(LPCLASSFACTORY iface, LPUNKNOWN pOuter, REFIID riid, LPVOID *ppobj) {
|
2005-01-24 20:33:23 +01:00
|
|
|
TRACE ("(%p, %s, %p)\n", pOuter, debugstr_dmguid(riid), ppobj);
|
|
|
|
|
2004-01-20 01:21:40 +01:00
|
|
|
return DMUSIC_CreateDirectMusicChordTrack (riid, ppobj, pOuter);
|
2003-08-23 01:53:27 +02:00
|
|
|
}
|
|
|
|
|
2004-01-20 01:21:40 +01:00
|
|
|
static HRESULT WINAPI ChordTrackCF_LockServer(LPCLASSFACTORY iface,BOOL dolock) {
|
2005-01-24 20:33:23 +01:00
|
|
|
TRACE("(%d)\n", dolock);
|
|
|
|
|
|
|
|
if (dolock)
|
|
|
|
DMSTYLE_LockModule();
|
|
|
|
else
|
|
|
|
DMSTYLE_UnlockModule();
|
|
|
|
|
2003-08-23 01:53:27 +02:00
|
|
|
return S_OK;
|
|
|
|
}
|
|
|
|
|
2005-05-30 12:01:08 +02:00
|
|
|
static const IClassFactoryVtbl ChordTrackCF_Vtbl = {
|
2003-08-23 01:53:27 +02:00
|
|
|
ChordTrackCF_QueryInterface,
|
|
|
|
ChordTrackCF_AddRef,
|
|
|
|
ChordTrackCF_Release,
|
|
|
|
ChordTrackCF_CreateInstance,
|
|
|
|
ChordTrackCF_LockServer
|
|
|
|
};
|
|
|
|
|
2005-01-24 20:33:23 +01:00
|
|
|
static IClassFactoryImpl ChordTrack_CF = {&ChordTrackCF_Vtbl};
|
2003-08-23 01:53:27 +02:00
|
|
|
|
|
|
|
/******************************************************************
|
|
|
|
* DirectMusicCommandTrack ClassFactory
|
|
|
|
*/
|
2004-01-20 01:21:40 +01:00
|
|
|
static HRESULT WINAPI CommandTrackCF_QueryInterface(LPCLASSFACTORY iface,REFIID riid,LPVOID *ppobj) {
|
2005-01-24 20:33:23 +01:00
|
|
|
FIXME("- no interface\n\tIID:\t%s\n", debugstr_guid(riid));
|
|
|
|
|
|
|
|
if (ppobj == NULL) return E_POINTER;
|
|
|
|
|
2003-08-23 01:53:27 +02:00
|
|
|
return E_NOINTERFACE;
|
|
|
|
}
|
|
|
|
|
2004-01-20 01:21:40 +01:00
|
|
|
static ULONG WINAPI CommandTrackCF_AddRef(LPCLASSFACTORY iface) {
|
2005-01-24 20:33:23 +01:00
|
|
|
DMSTYLE_LockModule();
|
|
|
|
|
|
|
|
return 2; /* non-heap based object */
|
2003-08-23 01:53:27 +02:00
|
|
|
}
|
|
|
|
|
2004-01-20 01:21:40 +01:00
|
|
|
static ULONG WINAPI CommandTrackCF_Release(LPCLASSFACTORY iface) {
|
2005-01-24 20:33:23 +01:00
|
|
|
DMSTYLE_UnlockModule();
|
|
|
|
|
|
|
|
return 1; /* non-heap based object */
|
2003-08-23 01:53:27 +02:00
|
|
|
}
|
|
|
|
|
2004-01-20 01:21:40 +01:00
|
|
|
static HRESULT WINAPI CommandTrackCF_CreateInstance(LPCLASSFACTORY iface, LPUNKNOWN pOuter, REFIID riid, LPVOID *ppobj) {
|
2005-01-24 20:33:23 +01:00
|
|
|
TRACE ("(%p, %s, %p)\n", pOuter, debugstr_dmguid(riid), ppobj);
|
|
|
|
|
2004-01-20 01:21:40 +01:00
|
|
|
return DMUSIC_CreateDirectMusicCommandTrack (riid, ppobj, pOuter);
|
2003-08-23 01:53:27 +02:00
|
|
|
}
|
|
|
|
|
2004-01-20 01:21:40 +01:00
|
|
|
static HRESULT WINAPI CommandTrackCF_LockServer(LPCLASSFACTORY iface,BOOL dolock) {
|
2005-01-24 20:33:23 +01:00
|
|
|
TRACE("(%d)\n", dolock);
|
|
|
|
|
|
|
|
if (dolock)
|
|
|
|
DMSTYLE_LockModule();
|
|
|
|
else
|
|
|
|
DMSTYLE_UnlockModule();
|
|
|
|
|
2003-08-23 01:53:27 +02:00
|
|
|
return S_OK;
|
|
|
|
}
|
|
|
|
|
2005-05-30 12:01:08 +02:00
|
|
|
static const IClassFactoryVtbl CommandTrackCF_Vtbl = {
|
2003-08-23 01:53:27 +02:00
|
|
|
CommandTrackCF_QueryInterface,
|
|
|
|
CommandTrackCF_AddRef,
|
|
|
|
CommandTrackCF_Release,
|
|
|
|
CommandTrackCF_CreateInstance,
|
|
|
|
CommandTrackCF_LockServer
|
|
|
|
};
|
|
|
|
|
2005-01-24 20:33:23 +01:00
|
|
|
static IClassFactoryImpl CommandTrack_CF = {&CommandTrackCF_Vtbl};
|
2003-08-23 01:53:27 +02:00
|
|
|
|
|
|
|
/******************************************************************
|
|
|
|
* DirectMusicStyleTrack ClassFactory
|
|
|
|
*/
|
2004-01-20 01:21:40 +01:00
|
|
|
static HRESULT WINAPI StyleTrackCF_QueryInterface(LPCLASSFACTORY iface,REFIID riid,LPVOID *ppobj) {
|
2005-01-24 20:33:23 +01:00
|
|
|
FIXME("- no interface\n\tIID:\t%s\n", debugstr_guid(riid));
|
|
|
|
|
|
|
|
if (ppobj == NULL) return E_POINTER;
|
|
|
|
|
2003-07-22 00:10:14 +02:00
|
|
|
return E_NOINTERFACE;
|
|
|
|
}
|
|
|
|
|
2004-01-20 01:21:40 +01:00
|
|
|
static ULONG WINAPI StyleTrackCF_AddRef(LPCLASSFACTORY iface) {
|
2005-01-24 20:33:23 +01:00
|
|
|
DMSTYLE_LockModule();
|
|
|
|
|
|
|
|
return 2; /* non-heap based object */
|
2003-07-22 00:10:14 +02:00
|
|
|
}
|
|
|
|
|
2004-01-20 01:21:40 +01:00
|
|
|
static ULONG WINAPI StyleTrackCF_Release(LPCLASSFACTORY iface) {
|
2005-01-24 20:33:23 +01:00
|
|
|
DMSTYLE_UnlockModule();
|
|
|
|
|
|
|
|
return 1; /* non-heap based object */
|
2003-07-22 00:10:14 +02:00
|
|
|
}
|
|
|
|
|
2004-01-20 01:21:40 +01:00
|
|
|
static HRESULT WINAPI StyleTrackCF_CreateInstance(LPCLASSFACTORY iface, LPUNKNOWN pOuter, REFIID riid, LPVOID *ppobj) {
|
2005-01-24 20:33:23 +01:00
|
|
|
TRACE ("(%p, %s, %p)\n", pOuter, debugstr_dmguid(riid), ppobj);
|
|
|
|
|
2004-01-20 01:21:40 +01:00
|
|
|
return DMUSIC_CreateDirectMusicStyleTrack (riid, ppobj, pOuter);
|
2003-07-22 00:10:14 +02:00
|
|
|
}
|
|
|
|
|
2004-01-20 01:21:40 +01:00
|
|
|
static HRESULT WINAPI StyleTrackCF_LockServer(LPCLASSFACTORY iface,BOOL dolock) {
|
2005-01-24 20:33:23 +01:00
|
|
|
TRACE("(%d)\n", dolock);
|
|
|
|
|
|
|
|
if (dolock)
|
|
|
|
DMSTYLE_LockModule();
|
|
|
|
else
|
|
|
|
DMSTYLE_UnlockModule();
|
|
|
|
|
2003-07-22 00:10:14 +02:00
|
|
|
return S_OK;
|
|
|
|
}
|
|
|
|
|
2005-05-30 12:01:08 +02:00
|
|
|
static const IClassFactoryVtbl StyleTrackCF_Vtbl = {
|
2003-08-23 01:53:27 +02:00
|
|
|
StyleTrackCF_QueryInterface,
|
|
|
|
StyleTrackCF_AddRef,
|
|
|
|
StyleTrackCF_Release,
|
|
|
|
StyleTrackCF_CreateInstance,
|
|
|
|
StyleTrackCF_LockServer
|
2003-07-22 00:10:14 +02:00
|
|
|
};
|
|
|
|
|
2005-01-24 20:33:23 +01:00
|
|
|
static IClassFactoryImpl StyleTrack_CF = {&StyleTrackCF_Vtbl};
|
2003-08-23 01:53:27 +02:00
|
|
|
|
|
|
|
/******************************************************************
|
|
|
|
* DirectMusicMotifTrack ClassFactory
|
|
|
|
*/
|
2004-01-20 01:21:40 +01:00
|
|
|
static HRESULT WINAPI MotifTrackCF_QueryInterface(LPCLASSFACTORY iface,REFIID riid,LPVOID *ppobj) {
|
2005-01-24 20:33:23 +01:00
|
|
|
FIXME("- no interface\n\tIID:\t%s\n", debugstr_guid(riid));
|
|
|
|
|
|
|
|
if (ppobj == NULL) return E_POINTER;
|
|
|
|
|
2003-08-23 01:53:27 +02:00
|
|
|
return E_NOINTERFACE;
|
|
|
|
}
|
|
|
|
|
2004-01-20 01:21:40 +01:00
|
|
|
static ULONG WINAPI MotifTrackCF_AddRef(LPCLASSFACTORY iface) {
|
2005-01-24 20:33:23 +01:00
|
|
|
DMSTYLE_LockModule();
|
|
|
|
|
|
|
|
return 2; /* non-heap based object */
|
2003-08-23 01:53:27 +02:00
|
|
|
}
|
|
|
|
|
2004-01-20 01:21:40 +01:00
|
|
|
static ULONG WINAPI MotifTrackCF_Release(LPCLASSFACTORY iface) {
|
2005-01-24 20:33:23 +01:00
|
|
|
DMSTYLE_UnlockModule();
|
|
|
|
|
|
|
|
return 1; /* non-heap based object */
|
2003-08-23 01:53:27 +02:00
|
|
|
}
|
|
|
|
|
2004-01-20 01:21:40 +01:00
|
|
|
static HRESULT WINAPI MotifTrackCF_CreateInstance(LPCLASSFACTORY iface, LPUNKNOWN pOuter, REFIID riid, LPVOID *ppobj) {
|
2005-01-24 20:33:23 +01:00
|
|
|
TRACE ("(%p, %s, %p)\n", pOuter, debugstr_dmguid(riid), ppobj);
|
|
|
|
|
2004-01-20 01:21:40 +01:00
|
|
|
return DMUSIC_CreateDirectMusicMotifTrack (riid, ppobj, pOuter);
|
2003-08-23 01:53:27 +02:00
|
|
|
}
|
|
|
|
|
2004-01-20 01:21:40 +01:00
|
|
|
static HRESULT WINAPI MotifTrackCF_LockServer(LPCLASSFACTORY iface,BOOL dolock) {
|
2005-01-24 20:33:23 +01:00
|
|
|
TRACE("(%d)\n", dolock);
|
|
|
|
|
|
|
|
if (dolock)
|
|
|
|
DMSTYLE_LockModule();
|
|
|
|
else
|
|
|
|
DMSTYLE_UnlockModule();
|
|
|
|
|
2003-08-23 01:53:27 +02:00
|
|
|
return S_OK;
|
|
|
|
}
|
|
|
|
|
2005-05-30 12:01:08 +02:00
|
|
|
static const IClassFactoryVtbl MotifTrackCF_Vtbl = {
|
2003-08-23 01:53:27 +02:00
|
|
|
MotifTrackCF_QueryInterface,
|
|
|
|
MotifTrackCF_AddRef,
|
|
|
|
MotifTrackCF_Release,
|
|
|
|
MotifTrackCF_CreateInstance,
|
|
|
|
MotifTrackCF_LockServer
|
|
|
|
};
|
|
|
|
|
2005-01-24 20:33:23 +01:00
|
|
|
static IClassFactoryImpl MotifTrack_CF = {&MotifTrackCF_Vtbl};
|
2003-08-23 01:53:27 +02:00
|
|
|
|
|
|
|
/******************************************************************
|
|
|
|
* DirectMusicAuditionTrack ClassFactory
|
|
|
|
*/
|
2004-01-20 01:21:40 +01:00
|
|
|
static HRESULT WINAPI AuditionTrackCF_QueryInterface(LPCLASSFACTORY iface,REFIID riid,LPVOID *ppobj) {
|
2005-01-24 20:33:23 +01:00
|
|
|
FIXME("- no interface\n\tIID:\t%s\n", debugstr_guid(riid));
|
|
|
|
|
|
|
|
if (ppobj == NULL) return E_POINTER;
|
|
|
|
|
2003-08-23 01:53:27 +02:00
|
|
|
return E_NOINTERFACE;
|
|
|
|
}
|
|
|
|
|
2004-01-20 01:21:40 +01:00
|
|
|
static ULONG WINAPI AuditionTrackCF_AddRef(LPCLASSFACTORY iface) {
|
2005-01-24 20:33:23 +01:00
|
|
|
DMSTYLE_LockModule();
|
|
|
|
|
|
|
|
return 2; /* non-heap based object */
|
2003-08-23 01:53:27 +02:00
|
|
|
}
|
|
|
|
|
2004-01-20 01:21:40 +01:00
|
|
|
static ULONG WINAPI AuditionTrackCF_Release(LPCLASSFACTORY iface) {
|
2005-01-24 20:33:23 +01:00
|
|
|
DMSTYLE_UnlockModule();
|
|
|
|
|
|
|
|
return 1; /* non-heap based object */
|
2003-08-23 01:53:27 +02:00
|
|
|
}
|
|
|
|
|
2004-01-20 01:21:40 +01:00
|
|
|
static HRESULT WINAPI AuditionTrackCF_CreateInstance(LPCLASSFACTORY iface, LPUNKNOWN pOuter, REFIID riid, LPVOID *ppobj) {
|
2005-01-24 20:33:23 +01:00
|
|
|
TRACE ("(%p, %s, %p)\n", pOuter, debugstr_dmguid(riid), ppobj);
|
|
|
|
|
2004-01-20 01:21:40 +01:00
|
|
|
return DMUSIC_CreateDirectMusicAuditionTrack (riid, ppobj, pOuter);
|
2003-08-23 01:53:27 +02:00
|
|
|
}
|
|
|
|
|
2004-01-20 01:21:40 +01:00
|
|
|
static HRESULT WINAPI AuditionTrackCF_LockServer(LPCLASSFACTORY iface,BOOL dolock) {
|
2005-01-24 20:33:23 +01:00
|
|
|
TRACE("(%d)\n", dolock);
|
|
|
|
|
|
|
|
if (dolock)
|
|
|
|
DMSTYLE_LockModule();
|
|
|
|
else
|
|
|
|
DMSTYLE_UnlockModule();
|
|
|
|
|
2003-08-23 01:53:27 +02:00
|
|
|
return S_OK;
|
|
|
|
}
|
|
|
|
|
2005-05-30 12:01:08 +02:00
|
|
|
static const IClassFactoryVtbl AuditionTrackCF_Vtbl = {
|
2003-08-23 01:53:27 +02:00
|
|
|
AuditionTrackCF_QueryInterface,
|
|
|
|
AuditionTrackCF_AddRef,
|
|
|
|
AuditionTrackCF_Release,
|
|
|
|
AuditionTrackCF_CreateInstance,
|
|
|
|
AuditionTrackCF_LockServer
|
|
|
|
};
|
|
|
|
|
2005-01-24 20:33:23 +01:00
|
|
|
static IClassFactoryImpl AuditionTrack_CF = {&AuditionTrackCF_Vtbl};
|
2003-08-23 01:53:27 +02:00
|
|
|
|
|
|
|
/******************************************************************
|
|
|
|
* DirectMusicMuteTrack ClassFactory
|
|
|
|
*/
|
2004-01-20 01:21:40 +01:00
|
|
|
static HRESULT WINAPI MuteTrackCF_QueryInterface(LPCLASSFACTORY iface,REFIID riid,LPVOID *ppobj) {
|
2005-01-24 20:33:23 +01:00
|
|
|
FIXME("- no interface\n\tIID:\t%s\n", debugstr_guid(riid));
|
|
|
|
|
|
|
|
if (ppobj == NULL) return E_POINTER;
|
|
|
|
|
2003-08-23 01:53:27 +02:00
|
|
|
return E_NOINTERFACE;
|
|
|
|
}
|
|
|
|
|
2004-01-20 01:21:40 +01:00
|
|
|
static ULONG WINAPI MuteTrackCF_AddRef(LPCLASSFACTORY iface) {
|
2005-01-24 20:33:23 +01:00
|
|
|
DMSTYLE_LockModule();
|
|
|
|
|
|
|
|
return 2; /* non-heap based object */
|
2003-08-23 01:53:27 +02:00
|
|
|
}
|
|
|
|
|
2004-01-20 01:21:40 +01:00
|
|
|
static ULONG WINAPI MuteTrackCF_Release(LPCLASSFACTORY iface) {
|
2005-01-24 20:33:23 +01:00
|
|
|
DMSTYLE_UnlockModule();
|
|
|
|
|
|
|
|
return 1; /* non-heap based object */
|
2003-08-23 01:53:27 +02:00
|
|
|
}
|
|
|
|
|
2004-01-20 01:21:40 +01:00
|
|
|
static HRESULT WINAPI MuteTrackCF_CreateInstance(LPCLASSFACTORY iface, LPUNKNOWN pOuter, REFIID riid, LPVOID *ppobj) {
|
2005-01-24 20:33:23 +01:00
|
|
|
TRACE ("(%p, %s, %p)\n", pOuter, debugstr_dmguid(riid), ppobj);
|
|
|
|
|
2004-01-20 01:21:40 +01:00
|
|
|
return DMUSIC_CreateDirectMusicMuteTrack (riid, ppobj, pOuter);
|
2003-08-23 01:53:27 +02:00
|
|
|
}
|
|
|
|
|
2004-01-20 01:21:40 +01:00
|
|
|
static HRESULT WINAPI MuteTrackCF_LockServer(LPCLASSFACTORY iface,BOOL dolock) {
|
2005-01-24 20:33:23 +01:00
|
|
|
TRACE("(%d)\n", dolock);
|
|
|
|
|
|
|
|
if (dolock)
|
|
|
|
DMSTYLE_LockModule();
|
|
|
|
else
|
|
|
|
DMSTYLE_UnlockModule();
|
|
|
|
|
2003-08-23 01:53:27 +02:00
|
|
|
return S_OK;
|
|
|
|
}
|
|
|
|
|
2005-05-30 12:01:08 +02:00
|
|
|
static const IClassFactoryVtbl MuteTrackCF_Vtbl = {
|
2003-08-23 01:53:27 +02:00
|
|
|
MuteTrackCF_QueryInterface,
|
|
|
|
MuteTrackCF_AddRef,
|
|
|
|
MuteTrackCF_Release,
|
|
|
|
MuteTrackCF_CreateInstance,
|
|
|
|
MuteTrackCF_LockServer
|
|
|
|
};
|
|
|
|
|
2005-01-24 20:33:23 +01:00
|
|
|
static IClassFactoryImpl MuteTrack_CF = {&MuteTrackCF_Vtbl};
|
2003-08-23 01:53:27 +02:00
|
|
|
|
2003-07-22 00:10:14 +02:00
|
|
|
/******************************************************************
|
|
|
|
* DllMain
|
|
|
|
*
|
|
|
|
*
|
|
|
|
*/
|
2004-01-20 01:21:40 +01:00
|
|
|
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) {
|
|
|
|
if (fdwReason == DLL_PROCESS_ATTACH) {
|
2003-07-22 00:10:14 +02:00
|
|
|
DisableThreadLibraryCalls(hinstDLL);
|
|
|
|
/* FIXME: Initialisation */
|
2004-01-20 01:21:40 +01:00
|
|
|
} else if (fdwReason == DLL_PROCESS_DETACH) {
|
2003-07-22 00:10:14 +02:00
|
|
|
/* FIXME: Cleanup */
|
|
|
|
}
|
|
|
|
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/******************************************************************
|
|
|
|
* DllCanUnloadNow (DMSTYLE.1)
|
|
|
|
*
|
|
|
|
*
|
|
|
|
*/
|
2005-05-17 16:41:37 +02:00
|
|
|
HRESULT WINAPI DllCanUnloadNow(void) {
|
2005-01-24 20:33:23 +01:00
|
|
|
return DMSTYLE_refCount != 0 ? S_FALSE : S_OK;
|
2003-07-22 00:10:14 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/******************************************************************
|
2005-06-17 22:58:33 +02:00
|
|
|
* DllGetClassObject (DMSTYLE.@)
|
2003-07-22 00:10:14 +02:00
|
|
|
*
|
|
|
|
*
|
|
|
|
*/
|
2005-05-17 16:41:37 +02:00
|
|
|
HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv) {
|
2004-02-25 02:30:03 +01:00
|
|
|
TRACE("(%s, %s, %p)\n", debugstr_dmguid(rclsid), debugstr_dmguid(riid), ppv);
|
2003-08-23 01:53:27 +02:00
|
|
|
|
|
|
|
if (IsEqualCLSID (rclsid, &CLSID_DirectMusicSection) && IsEqualIID (riid, &IID_IClassFactory)) {
|
2009-01-13 10:57:08 +01:00
|
|
|
*ppv = &Section_CF;
|
2003-08-23 01:53:27 +02:00
|
|
|
IClassFactory_AddRef((IClassFactory*)*ppv);
|
|
|
|
return S_OK;
|
|
|
|
} else if (IsEqualCLSID (rclsid, &CLSID_DirectMusicStyle) && IsEqualIID (riid, &IID_IClassFactory)) {
|
2009-01-13 10:57:08 +01:00
|
|
|
*ppv = &Style_CF;
|
2003-08-23 01:53:27 +02:00
|
|
|
IClassFactory_AddRef((IClassFactory*)*ppv);
|
|
|
|
return S_OK;
|
|
|
|
} else if (IsEqualCLSID (rclsid, &CLSID_DirectMusicChordTrack) && IsEqualIID (riid, &IID_IClassFactory)) {
|
2009-01-13 10:57:08 +01:00
|
|
|
*ppv = &ChordTrack_CF;
|
2003-08-23 01:53:27 +02:00
|
|
|
IClassFactory_AddRef((IClassFactory*)*ppv);
|
|
|
|
return S_OK;
|
|
|
|
} else if (IsEqualCLSID (rclsid, &CLSID_DirectMusicCommandTrack) && IsEqualIID (riid, &IID_IClassFactory)) {
|
2009-01-13 10:57:08 +01:00
|
|
|
*ppv = &CommandTrack_CF;
|
2003-08-23 01:53:27 +02:00
|
|
|
IClassFactory_AddRef((IClassFactory*)*ppv);
|
|
|
|
return S_OK;
|
|
|
|
} else if (IsEqualCLSID (rclsid, &CLSID_DirectMusicStyleTrack) && IsEqualIID (riid, &IID_IClassFactory)) {
|
2009-01-13 10:57:08 +01:00
|
|
|
*ppv = &StyleTrack_CF;
|
2003-08-23 01:53:27 +02:00
|
|
|
IClassFactory_AddRef((IClassFactory*)*ppv);
|
|
|
|
return S_OK;
|
|
|
|
} else if (IsEqualCLSID (rclsid, &CLSID_DirectMusicMotifTrack) && IsEqualIID (riid, &IID_IClassFactory)) {
|
2009-01-13 10:57:08 +01:00
|
|
|
*ppv = &MotifTrack_CF;
|
2003-08-23 01:53:27 +02:00
|
|
|
IClassFactory_AddRef((IClassFactory*)*ppv);
|
|
|
|
return S_OK;
|
|
|
|
} else if (IsEqualCLSID (rclsid, &CLSID_DirectMusicAuditionTrack) && IsEqualIID (riid, &IID_IClassFactory)) {
|
2009-01-13 10:57:08 +01:00
|
|
|
*ppv = &AuditionTrack_CF;
|
2003-08-23 01:53:27 +02:00
|
|
|
IClassFactory_AddRef((IClassFactory*)*ppv);
|
|
|
|
return S_OK;
|
|
|
|
} else if (IsEqualCLSID (rclsid, &CLSID_DirectMusicMuteTrack) && IsEqualIID (riid, &IID_IClassFactory)) {
|
2009-01-13 10:57:08 +01:00
|
|
|
*ppv = &MuteTrack_CF;
|
2003-08-23 01:53:27 +02:00
|
|
|
IClassFactory_AddRef((IClassFactory*)*ppv);
|
|
|
|
return S_OK;
|
2004-01-20 01:21:40 +01:00
|
|
|
}
|
2003-08-23 01:53:27 +02:00
|
|
|
|
2004-02-25 02:30:03 +01:00
|
|
|
WARN("(%s, %s, %p): no interface found.\n", debugstr_dmguid(rclsid), debugstr_dmguid(riid), ppv);
|
2003-07-22 00:10:14 +02:00
|
|
|
return CLASS_E_CLASSNOTAVAILABLE;
|
|
|
|
}
|