dmband: None of the COM classes support aggregation.

This commit is contained in:
Michael Stefaniuc 2014-01-30 00:46:19 +01:00 committed by Alexandre Julliard
parent bbd71d6b72
commit 05d1872575
4 changed files with 15 additions and 9 deletions

View File

@ -687,7 +687,8 @@ static const IPersistStreamVtbl DirectMusicBand_PersistStream_Vtbl = {
}; };
/* for ClassFactory */ /* for ClassFactory */
HRESULT WINAPI DMUSIC_CreateDirectMusicBandImpl (LPCGUID lpcGUID, LPVOID* ppobj, LPUNKNOWN pUnkOuter) { HRESULT WINAPI create_dmband(REFIID lpcGUID, void **ppobj)
{
IDirectMusicBandImpl* obj; IDirectMusicBandImpl* obj;
obj = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicBandImpl)); obj = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicBandImpl));

View File

@ -606,7 +606,8 @@ static const IPersistStreamVtbl DirectMusicBandTrack_PerststStream_Vtbl = {
}; };
/* for ClassFactory */ /* for ClassFactory */
HRESULT WINAPI DMUSIC_CreateDirectMusicBandTrack (LPCGUID lpcGUID, LPVOID *ppobj, LPUNKNOWN pUnkOuter) { HRESULT WINAPI create_dmbandtrack(REFIID lpcGUID, void **ppobj)
{
IDirectMusicBandTrack* track; IDirectMusicBandTrack* track;
track = HeapAlloc (GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicBandTrack)); track = HeapAlloc (GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicBandTrack));

View File

@ -27,7 +27,7 @@ LONG DMBAND_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;
/****************************************************************** /******************************************************************
@ -79,7 +79,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)
@ -102,8 +107,8 @@ static const IClassFactoryVtbl classfactory_vtbl = {
ClassFactory_LockServer ClassFactory_LockServer
}; };
static IClassFactoryImpl Band_CF = {{&classfactory_vtbl}, DMUSIC_CreateDirectMusicBandImpl}; static IClassFactoryImpl Band_CF = {{&classfactory_vtbl}, create_dmband};
static IClassFactoryImpl BandTrack_CF = {{&classfactory_vtbl}, DMUSIC_CreateDirectMusicBandTrack}; static IClassFactoryImpl BandTrack_CF = {{&classfactory_vtbl}, create_dmbandtrack};
/****************************************************************** /******************************************************************
* DllMain * DllMain

View File

@ -52,9 +52,8 @@ typedef struct IDirectMusicBandTrack IDirectMusicBandTrack;
/***************************************************************************** /*****************************************************************************
* ClassFactory * ClassFactory
*/ */
extern HRESULT WINAPI DMUSIC_CreateDirectMusicBandImpl (LPCGUID lpcGUID, LPVOID* ppobj, LPUNKNOWN pUnkOuter) DECLSPEC_HIDDEN; extern HRESULT WINAPI create_dmband(REFIID riid, void **ret_iface) DECLSPEC_HIDDEN;
extern HRESULT WINAPI create_dmbandtrack(REFIID riid, void **ret_iface) DECLSPEC_HIDDEN;
extern HRESULT WINAPI DMUSIC_CreateDirectMusicBandTrack (LPCGUID lpcGUID, LPVOID* ppobj, LPUNKNOWN pUnkOuter) DECLSPEC_HIDDEN;
/***************************************************************************** /*****************************************************************************