Commit 2343eeff authored by Michael Stefaniuc's avatar Michael Stefaniuc Committed by Alexandre Julliard

dmime: None of the COM classes support COM aggregation.

parent c7d05d2d
......@@ -139,7 +139,7 @@ static HRESULT WINAPI IDirectMusicAudioPathImpl_IDirectMusicAudioPath_GetObjectI
if (IsEqualIID (iidInterface, &IID_IDirectMusicGraph)) {
if (NULL == This->pToolGraph) {
IDirectMusicGraphImpl* pGraph;
DMUSIC_CreateDirectMusicGraphImpl (&IID_IDirectMusicGraph, (LPVOID*)&pGraph, NULL);
create_dmgraph(&IID_IDirectMusicGraph, (void**)&pGraph);
This->pToolGraph = (IDirectMusicGraph*) pGraph;
}
*ppObject = This->pToolGraph;
......@@ -170,7 +170,7 @@ static HRESULT WINAPI IDirectMusicAudioPathImpl_IDirectMusicAudioPath_GetObjectI
IDirectMusicPerformance8_GetGraph(This->pPerf, &pPerfoGraph);
if (NULL == pPerfoGraph) {
IDirectMusicGraphImpl* pGraph = NULL;
DMUSIC_CreateDirectMusicGraphImpl (&IID_IDirectMusicGraph, (LPVOID*)&pGraph, NULL);
create_dmgraph(&IID_IDirectMusicGraph, (void**)&pGraph);
IDirectMusicPerformance8_SetGraph(This->pPerf, (IDirectMusicGraph*) pGraph);
/* we need release as SetGraph do an AddRef */
IDirectMusicGraph_Release((LPDIRECTMUSICGRAPH) pGraph);
......@@ -634,7 +634,8 @@ static const IPersistStreamVtbl DirectMusicAudioPath_PersistStream_Vtbl = {
};
/* for ClassFactory */
HRESULT WINAPI DMUSIC_CreateDirectMusicAudioPathImpl (LPCGUID lpcGUID, LPVOID* ppobj, LPUNKNOWN pUnkOuter) {
HRESULT WINAPI create_dmaudiopath(REFIID lpcGUID, void **ppobj)
{
IDirectMusicAudioPathImpl* obj;
obj = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicAudioPathImpl));
......
......@@ -28,7 +28,7 @@ LONG DMIME_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;
/******************************************************************
......@@ -80,7 +80,10 @@ 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)
return CLASS_E_NOAGGREGATION;
return This->fnCreateInstance(riid, ppv);
}
static HRESULT WINAPI ClassFactory_LockServer(IClassFactory *iface, BOOL dolock)
......@@ -104,28 +107,20 @@ static const IClassFactoryVtbl classfactory_vtbl = {
};
static IClassFactoryImpl Performance_CF = {{&classfactory_vtbl},
DMUSIC_CreateDirectMusicPerformanceImpl};
static IClassFactoryImpl Segment_CF = {{&classfactory_vtbl}, DMUSIC_CreateDirectMusicSegmentImpl};
static IClassFactoryImpl SegmentState_CF = {{&classfactory_vtbl},
DMUSIC_CreateDirectMusicSegmentStateImpl};
static IClassFactoryImpl Graph_CF = {{&classfactory_vtbl}, DMUSIC_CreateDirectMusicGraphImpl};
static IClassFactoryImpl TempoTrack_CF = {{&classfactory_vtbl}, DMUSIC_CreateDirectMusicTempoTrack};
static IClassFactoryImpl SeqTrack_CF = {{&classfactory_vtbl}, DMUSIC_CreateDirectMusicSeqTrack};
static IClassFactoryImpl SysExTrack_CF = {{&classfactory_vtbl}, DMUSIC_CreateDirectMusicSysExTrack};
static IClassFactoryImpl TimeSigTrack_CF = {{&classfactory_vtbl},
DMUSIC_CreateDirectMusicTimeSigTrack};
static IClassFactoryImpl ParamControlTrack_CF = {{&classfactory_vtbl},
DMUSIC_CreateDirectMusicParamControlTrack};
static IClassFactoryImpl MarkerTrack_CF = {{&classfactory_vtbl},
DMUSIC_CreateDirectMusicMarkerTrack};
static IClassFactoryImpl LyricsTrack_CF = {{&classfactory_vtbl},
DMUSIC_CreateDirectMusicLyricsTrack};
static IClassFactoryImpl SegTriggerTrack_CF = {{&classfactory_vtbl},
DMUSIC_CreateDirectMusicSegTriggerTrack};
static IClassFactoryImpl AudioPath_CF = {{&classfactory_vtbl},
DMUSIC_CreateDirectMusicAudioPathImpl};
static IClassFactoryImpl WaveTrack_CF = {{&classfactory_vtbl}, DMUSIC_CreateDirectMusicWaveTrack};
static IClassFactoryImpl Performance_CF = {{&classfactory_vtbl}, create_dmperformance};
static IClassFactoryImpl Segment_CF = {{&classfactory_vtbl}, create_dmsegment};
static IClassFactoryImpl SegmentState_CF = {{&classfactory_vtbl}, create_dmsegmentstate};
static IClassFactoryImpl Graph_CF = {{&classfactory_vtbl}, create_dmgraph};
static IClassFactoryImpl TempoTrack_CF = {{&classfactory_vtbl}, create_dmtempotrack};
static IClassFactoryImpl SeqTrack_CF = {{&classfactory_vtbl}, create_dmseqtrack};
static IClassFactoryImpl SysExTrack_CF = {{&classfactory_vtbl}, create_dmsysextrack};
static IClassFactoryImpl TimeSigTrack_CF = {{&classfactory_vtbl}, create_dmtimesigtrack};
static IClassFactoryImpl ParamControlTrack_CF = {{&classfactory_vtbl}, create_dmparamcontroltrack};
static IClassFactoryImpl MarkerTrack_CF = {{&classfactory_vtbl}, create_dmmarkertrack};
static IClassFactoryImpl LyricsTrack_CF = {{&classfactory_vtbl}, create_dmlyricstrack};
static IClassFactoryImpl SegTriggerTrack_CF = {{&classfactory_vtbl}, create_dmsegtriggertrack};
static IClassFactoryImpl AudioPath_CF = {{&classfactory_vtbl}, create_dmaudiopath};
static IClassFactoryImpl WaveTrack_CF = {{&classfactory_vtbl}, create_dmwavetrack};
/******************************************************************
* DllMain
......
......@@ -64,21 +64,21 @@ typedef struct IDirectMusicWaveTrack IDirectMusicWaveTrack;
/*****************************************************************************
* ClassFactory
*/
extern HRESULT WINAPI DMUSIC_CreateDirectMusicPerformanceImpl (LPCGUID lpcGUID, LPVOID *ppobj, LPUNKNOWN pUnkOuter) DECLSPEC_HIDDEN;
extern HRESULT WINAPI DMUSIC_CreateDirectMusicSegmentImpl (LPCGUID lpcGUID, LPVOID *ppobj, LPUNKNOWN pUnkOuter) DECLSPEC_HIDDEN;
extern HRESULT WINAPI DMUSIC_CreateDirectMusicSegmentStateImpl (LPCGUID lpcGUID, LPVOID *ppobj, LPUNKNOWN pUnkOuter) DECLSPEC_HIDDEN;
extern HRESULT WINAPI DMUSIC_CreateDirectMusicGraphImpl (LPCGUID lpcGUID, LPVOID *ppobj, LPUNKNOWN pUnkOuter) DECLSPEC_HIDDEN;
extern HRESULT WINAPI DMUSIC_CreateDirectMusicAudioPathImpl (LPCGUID lpcGUID, LPVOID *ppobj, LPUNKNOWN pUnkOuter) DECLSPEC_HIDDEN;
extern HRESULT WINAPI DMUSIC_CreateDirectMusicLyricsTrack (LPCGUID lpcGUID, LPVOID* ppobj, LPUNKNOWN pUnkOuter) DECLSPEC_HIDDEN;
extern HRESULT WINAPI DMUSIC_CreateDirectMusicMarkerTrack (LPCGUID lpcGUID, LPVOID* ppobj, LPUNKNOWN pUnkOuter) DECLSPEC_HIDDEN;
extern HRESULT WINAPI DMUSIC_CreateDirectMusicParamControlTrack (LPCGUID lpcGUID, LPVOID* ppobj, LPUNKNOWN pUnkOuter) DECLSPEC_HIDDEN;
extern HRESULT WINAPI DMUSIC_CreateDirectMusicSegTriggerTrack (LPCGUID lpcGUID, LPVOID* ppobj, LPUNKNOWN pUnkOuter) DECLSPEC_HIDDEN;
extern HRESULT WINAPI DMUSIC_CreateDirectMusicSeqTrack (LPCGUID lpcGUID, LPVOID* ppobj, LPUNKNOWN pUnkOuter) DECLSPEC_HIDDEN;
extern HRESULT WINAPI DMUSIC_CreateDirectMusicSysExTrack (LPCGUID lpcGUID, LPVOID* ppobj, LPUNKNOWN pUnkOuter) DECLSPEC_HIDDEN;
extern HRESULT WINAPI DMUSIC_CreateDirectMusicTempoTrack (LPCGUID lpcGUID, LPVOID* ppobj, LPUNKNOWN pUnkOuter) DECLSPEC_HIDDEN;
extern HRESULT WINAPI DMUSIC_CreateDirectMusicTimeSigTrack (LPCGUID lpcGUID, LPVOID* ppobj, LPUNKNOWN pUnkOuter) DECLSPEC_HIDDEN;
extern HRESULT WINAPI DMUSIC_CreateDirectMusicWaveTrack (LPCGUID lpcGUID, LPVOID* ppobj, LPUNKNOWN pUnkOuter) DECLSPEC_HIDDEN;
extern HRESULT WINAPI create_dmperformance(REFIID riid, void **ret_iface) DECLSPEC_HIDDEN;
extern HRESULT WINAPI create_dmsegment(REFIID riid, void **ret_iface) DECLSPEC_HIDDEN;
extern HRESULT WINAPI create_dmsegmentstate(REFIID riid, void **ret_iface) DECLSPEC_HIDDEN;
extern HRESULT WINAPI create_dmgraph(REFIID riid, void **ret_iface) DECLSPEC_HIDDEN;
extern HRESULT WINAPI create_dmaudiopath(REFIID riid, void **ret_iface) DECLSPEC_HIDDEN;
extern HRESULT WINAPI create_dmlyricstrack(REFIID riid, void **ret_iface) DECLSPEC_HIDDEN;
extern HRESULT WINAPI create_dmmarkertrack(REFIID riid, void **ret_iface) DECLSPEC_HIDDEN;
extern HRESULT WINAPI create_dmparamcontroltrack(REFIID riid, void **ret_iface) DECLSPEC_HIDDEN;
extern HRESULT WINAPI create_dmsegtriggertrack(REFIID riid, void **ret_iface) DECLSPEC_HIDDEN;
extern HRESULT WINAPI create_dmseqtrack(REFIID riid, void **ret_iface) DECLSPEC_HIDDEN;
extern HRESULT WINAPI create_dmsysextrack(REFIID riid, void **ret_iface) DECLSPEC_HIDDEN;
extern HRESULT WINAPI create_dmtempotrack(REFIID riid, void **ret_iface) DECLSPEC_HIDDEN;
extern HRESULT WINAPI create_dmtimesigtrack(REFIID riid, void **ret_iface) DECLSPEC_HIDDEN;
extern HRESULT WINAPI create_dmwavetrack(REFIID riid, void **ret_iface) DECLSPEC_HIDDEN;
/*****************************************************************************
......
......@@ -598,7 +598,8 @@ static const IPersistStreamVtbl DirectMusicGraph_PersistStream_Vtbl = {
};
/* for ClassFactory */
HRESULT WINAPI DMUSIC_CreateDirectMusicGraphImpl (LPCGUID lpcGUID, LPVOID* ppobj, LPUNKNOWN pUnkOuter) {
HRESULT WINAPI create_dmgraph(REFIID lpcGUID, void **ppobj)
{
IDirectMusicGraphImpl* obj;
obj = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicGraphImpl));
......
......@@ -265,7 +265,8 @@ static const IPersistStreamVtbl DirectMusicLyricsTrack_PersistStream_Vtbl = {
};
/* for ClassFactory */
HRESULT WINAPI DMUSIC_CreateDirectMusicLyricsTrack (LPCGUID lpcGUID, LPVOID *ppobj, LPUNKNOWN pUnkOuter) {
HRESULT WINAPI create_dmlyricstrack(REFIID lpcGUID, void **ppobj)
{
IDirectMusicLyricsTrack* track;
track = HeapAlloc (GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicLyricsTrack));
......
......@@ -265,7 +265,8 @@ static const IPersistStreamVtbl DirectMusicMarkerTrack_PersistStream_Vtbl = {
};
/* for ClassFactory */
HRESULT WINAPI DMUSIC_CreateDirectMusicMarkerTrack (LPCGUID lpcGUID, LPVOID *ppobj, LPUNKNOWN pUnkOuter) {
HRESULT WINAPI create_dmmarkertrack(REFIID lpcGUID, void **ppobj)
{
IDirectMusicMarkerTrack* track;
track = HeapAlloc (GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicMarkerTrack));
......
......@@ -265,7 +265,8 @@ static const IPersistStreamVtbl DirectMusicParamControlTrack_PersistStream_Vtbl
};
/* for ClassFactory */
HRESULT WINAPI DMUSIC_CreateDirectMusicParamControlTrack (LPCGUID lpcGUID, LPVOID *ppobj, LPUNKNOWN pUnkOuter) {
HRESULT WINAPI create_dmparamcontroltrack(REFIID lpcGUID, void **ppobj)
{
IDirectMusicParamControlTrack* track;
track = HeapAlloc (GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicParamControlTrack));
......
......@@ -304,7 +304,7 @@ static HRESULT WINAPI IDirectMusicPerformance8Impl_PlaySegment(IDirectMusicPerfo
FIXME("(%p, %p, %d, 0x%s, %p): stub\n", This, pSegment, dwFlags,
wine_dbgstr_longlong(i64StartTime), ppSegmentState);
if (ppSegmentState)
return DMUSIC_CreateDirectMusicSegmentStateImpl(&IID_IDirectMusicSegmentState, (LPVOID*)ppSegmentState, NULL);
return create_dmsegmentstate(&IID_IDirectMusicSegmentState,(void**)ppSegmentState);
return S_OK;
}
......@@ -966,7 +966,7 @@ static HRESULT WINAPI IDirectMusicPerformance8Impl_PlaySegmentEx(IDirectMusicPer
FIXME("(%p, %p, %p, %p, %d, 0x%s, %p, %p, %p): stub\n", This, pSource, pwzSegmentName,
pTransition, dwFlags, wine_dbgstr_longlong(i64StartTime), ppSegmentState, pFrom, pAudioPath);
if (ppSegmentState)
return DMUSIC_CreateDirectMusicSegmentStateImpl(&IID_IDirectMusicSegmentState, (LPVOID*)ppSegmentState, NULL);
return create_dmsegmentstate(&IID_IDirectMusicSegmentState,(void**)ppSegmentState);
return S_OK;
}
......@@ -1002,7 +1002,7 @@ static HRESULT WINAPI IDirectMusicPerformance8Impl_CreateAudioPath(IDirectMusicP
return E_POINTER;
}
DMUSIC_CreateDirectMusicAudioPathImpl (&IID_IDirectMusicAudioPath, (LPVOID*)&pPath, NULL);
create_dmaudiopath(&IID_IDirectMusicAudioPath, (void**)&pPath);
default_path = (IDirectMusicAudioPathImpl*)((char*)(pPath) - offsetof(IDirectMusicAudioPathImpl,AudioPathVtbl));
default_path->pPerf = &This->IDirectMusicPerformance8_iface;
......@@ -1029,8 +1029,8 @@ static HRESULT WINAPI IDirectMusicPerformance8Impl_CreateStandardAudioPath(IDire
if (NULL == ppNewPath) {
return E_POINTER;
}
DMUSIC_CreateDirectMusicAudioPathImpl (&IID_IDirectMusicAudioPath, (LPVOID*)&pPath, NULL);
create_dmaudiopath(&IID_IDirectMusicAudioPath, (void**)&pPath);
default_path = (IDirectMusicAudioPathImpl*)((char*)(pPath) - offsetof(IDirectMusicAudioPathImpl,AudioPathVtbl));
default_path->pPerf = &This->IDirectMusicPerformance8_iface;
......@@ -1209,15 +1209,11 @@ static const IDirectMusicPerformance8Vtbl DirectMusicPerformance8_Vtbl = {
};
/* for ClassFactory */
HRESULT WINAPI DMUSIC_CreateDirectMusicPerformanceImpl (LPCGUID lpcGUID, LPVOID *ppobj, LPUNKNOWN pUnkOuter) {
HRESULT WINAPI create_dmperformance(REFIID lpcGUID, void **ppobj)
{
IDirectMusicPerformance8Impl *obj;
TRACE("(%p,%p,%p)\n", lpcGUID, ppobj, pUnkOuter);
if (pUnkOuter) {
*ppobj = NULL;
return CLASS_E_NOAGGREGATION;
}
TRACE("(%p,%p)\n", lpcGUID, ppobj);
obj = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicPerformance8Impl));
if (NULL == obj) {
......
......@@ -293,7 +293,7 @@ static HRESULT WINAPI IDirectMusicSegment8Impl_InitPlay(IDirectMusicSegment8 *if
if (NULL == ppSegState) {
return E_POINTER;
}
hr = DMUSIC_CreateDirectMusicSegmentStateImpl(&IID_IDirectMusicSegmentState, (void**) ppSegState, NULL);
hr = create_dmsegmentstate(&IID_IDirectMusicSegmentState,(void**) ppSegState);
if (FAILED(hr)) {
return hr;
}
......@@ -1332,15 +1332,11 @@ static const IPersistStreamVtbl DirectMusicSegment8_PersistStream_Vtbl = {
};
/* for ClassFactory */
HRESULT WINAPI DMUSIC_CreateDirectMusicSegmentImpl (LPCGUID lpcGUID, LPVOID* ppobj, LPUNKNOWN pUnkOuter) {
HRESULT WINAPI create_dmsegment(REFIID lpcGUID, void **ppobj)
{
IDirectMusicSegment8Impl* obj;
HRESULT hr;
if (pUnkOuter) {
*ppobj = NULL;
return CLASS_E_NOAGGREGATION;
}
obj = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicSegment8Impl));
if (NULL == obj) {
*ppobj = NULL;
......
......@@ -123,7 +123,8 @@ static const IDirectMusicSegmentState8Vtbl DirectMusicSegmentState8_Vtbl = {
};
/* for ClassFactory */
HRESULT WINAPI DMUSIC_CreateDirectMusicSegmentStateImpl (LPCGUID lpcGUID, LPVOID *ppobj, LPUNKNOWN pUnkOuter) {
HRESULT WINAPI create_dmsegmentstate(REFIID lpcGUID, void **ppobj)
{
IDirectMusicSegmentState8Impl* obj;
obj = HeapAlloc (GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicSegmentState8Impl));
......
......@@ -518,7 +518,8 @@ static const IPersistStreamVtbl DirectMusicSegTriggerTrack_PersistStream_Vtbl =
};
/* for ClassFactory */
HRESULT WINAPI DMUSIC_CreateDirectMusicSegTriggerTrack (LPCGUID lpcGUID, LPVOID *ppobj, LPUNKNOWN pUnkOuter) {
HRESULT WINAPI create_dmsegtriggertrack(REFIID lpcGUID, void **ppobj)
{
IDirectMusicSegTriggerTrack* track;
track = HeapAlloc (GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicSegTriggerTrack));
......
......@@ -265,7 +265,8 @@ static const IPersistStreamVtbl DirectMusicSeqTrack_PersistStream_Vtbl = {
};
/* for ClassFactory */
HRESULT WINAPI DMUSIC_CreateDirectMusicSeqTrack (LPCGUID lpcGUID, LPVOID *ppobj, LPUNKNOWN pUnkOuter) {
HRESULT WINAPI create_dmseqtrack(REFIID lpcGUID, void **ppobj)
{
IDirectMusicSeqTrack* track;
track = HeapAlloc (GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicSeqTrack));
......
......@@ -265,7 +265,8 @@ static const IPersistStreamVtbl DirectMusicSysExTrack_PersistStream_Vtbl = {
};
/* for ClassFactory */
HRESULT WINAPI DMUSIC_CreateDirectMusicSysExTrack (LPCGUID lpcGUID, LPVOID *ppobj, LPUNKNOWN pUnkOuter) {
HRESULT WINAPI create_dmsysextrack(REFIID lpcGUID, void **ppobj)
{
IDirectMusicSysExTrack* track;
track = HeapAlloc (GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicSysExTrack));
......
......@@ -391,7 +391,8 @@ static const IPersistStreamVtbl DirectMusicTempoTrack_PersistStream_Vtbl = {
};
/* for ClassFactory */
HRESULT WINAPI DMUSIC_CreateDirectMusicTempoTrack (LPCGUID lpcGUID, LPVOID *ppobj, LPUNKNOWN pUnkOuter) {
HRESULT WINAPI create_dmtempotrack(REFIID lpcGUID, void **ppobj)
{
IDirectMusicTempoTrack* track;
track = HeapAlloc (GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicTempoTrack));
......
......@@ -270,7 +270,8 @@ static const IPersistStreamVtbl DirectMusicTimeSigTrack_PersistStream_Vtbl = {
};
/* for ClassFactory */
HRESULT WINAPI DMUSIC_CreateDirectMusicTimeSigTrack (LPCGUID lpcGUID, LPVOID *ppobj, LPUNKNOWN pUnkOuter) {
HRESULT WINAPI create_dmtimesigtrack(REFIID lpcGUID, void **ppobj)
{
IDirectMusicTimeSigTrack* track;
track = HeapAlloc (GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicTimeSigTrack));
......
......@@ -271,7 +271,8 @@ static const IPersistStreamVtbl DirectMusicWaveTrack_PersistStream_Vtbl = {
};
/* for ClassFactory */
HRESULT WINAPI DMUSIC_CreateDirectMusicWaveTrack (LPCGUID lpcGUID, LPVOID *ppobj, LPUNKNOWN pUnkOuter) {
HRESULT WINAPI create_dmwavetrack(REFIID lpcGUID, void **ppobj)
{
IDirectMusicWaveTrack* track;
track = HeapAlloc (GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicWaveTrack));
......
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