Commit 05d18725 authored by Michael Stefaniuc's avatar Michael Stefaniuc Committed by Alexandre Julliard

dmband: None of the COM classes support aggregation.

parent bbd71d6b
......@@ -687,7 +687,8 @@ static const IPersistStreamVtbl DirectMusicBand_PersistStream_Vtbl = {
};
/* for ClassFactory */
HRESULT WINAPI DMUSIC_CreateDirectMusicBandImpl (LPCGUID lpcGUID, LPVOID* ppobj, LPUNKNOWN pUnkOuter) {
HRESULT WINAPI create_dmband(REFIID lpcGUID, void **ppobj)
{
IDirectMusicBandImpl* obj;
obj = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicBandImpl));
......
......@@ -606,7 +606,8 @@ static const IPersistStreamVtbl DirectMusicBandTrack_PerststStream_Vtbl = {
};
/* for ClassFactory */
HRESULT WINAPI DMUSIC_CreateDirectMusicBandTrack (LPCGUID lpcGUID, LPVOID *ppobj, LPUNKNOWN pUnkOuter) {
HRESULT WINAPI create_dmbandtrack(REFIID lpcGUID, void **ppobj)
{
IDirectMusicBandTrack* track;
track = HeapAlloc (GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicBandTrack));
......
......@@ -27,7 +27,7 @@ LONG DMBAND_refCount = 0;
typedef struct {
IClassFactory IClassFactory_iface;
HRESULT WINAPI (*fnCreateInstance)(REFIID riid, void **ppv, IUnknown *pUnkOuter);
HRESULT WINAPI (*fnCreateInstance)(REFIID riid, void **ret_iface);
} IClassFactoryImpl;
/******************************************************************
......@@ -79,7 +79,12 @@ static HRESULT WINAPI ClassFactory_CreateInstance(IClassFactory *iface, IUnknown
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)
......@@ -102,8 +107,8 @@ static const IClassFactoryVtbl classfactory_vtbl = {
ClassFactory_LockServer
};
static IClassFactoryImpl Band_CF = {{&classfactory_vtbl}, DMUSIC_CreateDirectMusicBandImpl};
static IClassFactoryImpl BandTrack_CF = {{&classfactory_vtbl}, DMUSIC_CreateDirectMusicBandTrack};
static IClassFactoryImpl Band_CF = {{&classfactory_vtbl}, create_dmband};
static IClassFactoryImpl BandTrack_CF = {{&classfactory_vtbl}, create_dmbandtrack};
/******************************************************************
* DllMain
......
......@@ -52,9 +52,8 @@ typedef struct IDirectMusicBandTrack IDirectMusicBandTrack;
/*****************************************************************************
* ClassFactory
*/
extern HRESULT WINAPI DMUSIC_CreateDirectMusicBandImpl (LPCGUID lpcGUID, LPVOID* ppobj, LPUNKNOWN pUnkOuter) DECLSPEC_HIDDEN;
extern HRESULT WINAPI DMUSIC_CreateDirectMusicBandTrack (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;
/*****************************************************************************
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment