dmcompos: None of the COM classes support aggregation.

This commit is contained in:
Michael Stefaniuc 2014-01-16 00:45:17 +01:00 committed by Alexandre Julliard
parent 4f3931eb15
commit 434842e13d
6 changed files with 25 additions and 18 deletions

View File

@ -524,7 +524,8 @@ static const IPersistStreamVtbl DirectMusicChordMap_PersistStream_Vtbl = {
}; };
/* for ClassFactory */ /* for ClassFactory */
HRESULT WINAPI DMUSIC_CreateDirectMusicChordMapImpl (LPCGUID lpcGUID, LPVOID* ppobj, LPUNKNOWN pUnkOuter) { HRESULT WINAPI create_dmchordmap(REFIID lpcGUID, void **ppobj)
{
IDirectMusicChordMapImpl* obj; IDirectMusicChordMapImpl* obj;
obj = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicChordMapImpl)); obj = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicChordMapImpl));

View File

@ -269,7 +269,8 @@ static const IPersistStreamVtbl DirectMusicChordMapTrack_PersistStream_Vtbl = {
}; };
/* for ClassFactory */ /* for ClassFactory */
HRESULT WINAPI DMUSIC_CreateDirectMusicChordMapTrack (LPCGUID lpcGUID, LPVOID *ppobj, LPUNKNOWN pUnkOuter) { HRESULT WINAPI create_dmchordmaptrack(REFIID lpcGUID, void **ppobj)
{
IDirectMusicChordMapTrack* track; IDirectMusicChordMapTrack* track;
track = HeapAlloc (GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicChordMapTrack)); track = HeapAlloc (GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicChordMapTrack));

View File

@ -112,7 +112,8 @@ static const IDirectMusicComposerVtbl DirectMusicComposer_Vtbl = {
}; };
/* for ClassFactory */ /* for ClassFactory */
HRESULT WINAPI DMUSIC_CreateDirectMusicComposerImpl (LPCGUID lpcGUID, LPVOID* ppobj, LPUNKNOWN pUnkOuter) { HRESULT WINAPI create_dmcomposer(REFIID lpcGUID, void **ppobj)
{
IDirectMusicComposerImpl* obj; IDirectMusicComposerImpl* obj;
obj = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicComposerImpl)); obj = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicComposerImpl));

View File

@ -30,12 +30,12 @@ LONG DMCOMPOS_refCount = 0;
typedef struct { typedef struct {
IClassFactory IClassFactory_iface; IClassFactory IClassFactory_iface;
HRESULT WINAPI (*fnCreateInstance)(REFIID riid, void **ppv, IUnknown *pUnkOuter); HRESULT WINAPI (*fnCreateInstance)(REFIID riid, void **ret_iface);
} IClassFactoryImpl; } IClassFactoryImpl;
static HRESULT WINAPI create_direct_music_template(REFIID riid, void **ppv, IUnknown *pUnkOuter) static HRESULT WINAPI create_direct_music_template(REFIID riid, void **ret_iface)
{ {
FIXME("(%p, %s, %p) stub\n", pUnkOuter, debugstr_dmguid(riid), ppv); FIXME("(%s, %p) stub\n", debugstr_dmguid(riid), ret_iface);
return CLASS_E_CLASSNOTAVAILABLE; return CLASS_E_CLASSNOTAVAILABLE;
} }
@ -89,7 +89,12 @@ static HRESULT WINAPI ClassFactory_CreateInstance(IClassFactory *iface, IUnknown
TRACE ("(%p, %s, %p)\n", pUnkOuter, debugstr_dmguid(riid), ppv); TRACE ("(%p, %s, %p)\n", pUnkOuter, debugstr_dmguid(riid), ppv);
return This->fnCreateInstance(riid, ppv, pUnkOuter); if (pUnkOuter) {
*ppv = NULL;
return CLASS_E_NOAGGREGATION;
}
return This->fnCreateInstance(riid, ppv);
} }
static HRESULT WINAPI ClassFactory_LockServer(IClassFactory *iface, BOOL dolock) static HRESULT WINAPI ClassFactory_LockServer(IClassFactory *iface, BOOL dolock)
@ -112,13 +117,11 @@ static const IClassFactoryVtbl classfactory_vtbl = {
ClassFactory_LockServer ClassFactory_LockServer
}; };
static IClassFactoryImpl ChordMap_CF = {{&classfactory_vtbl}, DMUSIC_CreateDirectMusicChordMapImpl}; static IClassFactoryImpl ChordMap_CF = {{&classfactory_vtbl}, create_dmchordmap};
static IClassFactoryImpl Composer_CF = {{&classfactory_vtbl}, DMUSIC_CreateDirectMusicComposerImpl}; static IClassFactoryImpl Composer_CF = {{&classfactory_vtbl}, create_dmcomposer};
static IClassFactoryImpl ChordMapTrack_CF = {{&classfactory_vtbl}, static IClassFactoryImpl ChordMapTrack_CF = {{&classfactory_vtbl}, create_dmchordmaptrack};
DMUSIC_CreateDirectMusicChordMapTrack};
static IClassFactoryImpl Template_CF = {{&classfactory_vtbl}, create_direct_music_template}; static IClassFactoryImpl Template_CF = {{&classfactory_vtbl}, create_direct_music_template};
static IClassFactoryImpl SignPostTrack_CF = {{&classfactory_vtbl}, static IClassFactoryImpl SignPostTrack_CF = {{&classfactory_vtbl}, create_dmsignposttrack};
DMUSIC_CreateDirectMusicSignPostTrack};
/****************************************************************** /******************************************************************
* DllMain * DllMain

View File

@ -53,10 +53,10 @@ typedef struct IDirectMusicSignPostTrack IDirectMusicSignPostTrack;
/***************************************************************************** /*****************************************************************************
* ClassFactory * ClassFactory
*/ */
extern HRESULT WINAPI DMUSIC_CreateDirectMusicChordMapImpl (LPCGUID lpcGUID, LPVOID* ppobj, LPUNKNOWN pUnkOuter) DECLSPEC_HIDDEN; extern HRESULT WINAPI create_dmchordmap(REFIID riid, void **ret_iface) DECLSPEC_HIDDEN;
extern HRESULT WINAPI DMUSIC_CreateDirectMusicComposerImpl (LPCGUID lpcGUID, LPVOID* ppobj, LPUNKNOWN pUnkOuter) DECLSPEC_HIDDEN; extern HRESULT WINAPI create_dmcomposer(REFIID riid, void **ret_iface) DECLSPEC_HIDDEN;
extern HRESULT WINAPI DMUSIC_CreateDirectMusicChordMapTrack (LPCGUID lpcGUID, LPVOID* ppobj, LPUNKNOWN pUnkOuter) DECLSPEC_HIDDEN; extern HRESULT WINAPI create_dmchordmaptrack(REFIID riid, void **ret_iface) DECLSPEC_HIDDEN;
extern HRESULT WINAPI DMUSIC_CreateDirectMusicSignPostTrack (LPCGUID lpcGUID, LPVOID* ppobj, LPUNKNOWN pUnkOuter) DECLSPEC_HIDDEN; extern HRESULT WINAPI create_dmsignposttrack(REFIID riid, void **ret_iface) DECLSPEC_HIDDEN;
/***************************************************************************** /*****************************************************************************
* IDirectMusicChordMapImpl implementation structure * IDirectMusicChordMapImpl implementation structure

View File

@ -267,7 +267,8 @@ static const IPersistStreamVtbl DirectMusicSignPostTrack_PersistStream_Vtbl =
}; };
/* for ClassFactory */ /* for ClassFactory */
HRESULT WINAPI DMUSIC_CreateDirectMusicSignPostTrack (LPCGUID lpcGUID, LPVOID *ppobj, LPUNKNOWN pUnkOuter) { HRESULT WINAPI create_dmsignposttrack(REFIID lpcGUID, void **ppobj)
{
IDirectMusicSignPostTrack* track; IDirectMusicSignPostTrack* track;
track = HeapAlloc (GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicSignPostTrack)); track = HeapAlloc (GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicSignPostTrack));