Michael Stefaniuc : dmusic: These COM classes don't support COM aggregation .
Module: wine Branch: master Commit: 5f5c21e55d3277964214c7b4d0227817246d78c1 URL: http://source.winehq.org/git/wine.git/?a=commit;h=5f5c21e55d3277964214c7b4d0... Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Sat Dec 28 23:34:11 2013 +0100 dmusic: These COM classes don't support COM aggregation. --- dlls/dmusic/collection.c | 13 ++++++++----- dlls/dmusic/dmusic.c | 2 ++ 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/dlls/dmusic/collection.c b/dlls/dmusic/collection.c index e30f89d..f98bc19 100644 --- a/dlls/dmusic/collection.c +++ b/dlls/dmusic/collection.c @@ -814,12 +814,15 @@ static const IPersistStreamVtbl DirectMusicCollection_PersistStream_Vtbl = { HRESULT WINAPI DMUSIC_CreateDirectMusicCollectionImpl(LPCGUID lpcGUID, LPVOID* ppobj, LPUNKNOWN pUnkOuter) { IDirectMusicCollectionImpl* obj; - + + *ppobj = NULL; + if (pUnkOuter) + return CLASS_E_NOAGGREGATION; + obj = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusicCollectionImpl)); - if (NULL == obj) { - *ppobj = NULL; - return E_OUTOFMEMORY; - } + if (!obj) + return E_OUTOFMEMORY; + obj->IDirectMusicCollection_iface.lpVtbl = &DirectMusicCollection_Collection_Vtbl; obj->IDirectMusicObject_iface.lpVtbl = &DirectMusicCollection_Object_Vtbl; obj->IPersistStream_iface.lpVtbl = &DirectMusicCollection_PersistStream_Vtbl; diff --git a/dlls/dmusic/dmusic.c b/dlls/dmusic/dmusic.c index 0c2584f..6c837f7 100644 --- a/dlls/dmusic/dmusic.c +++ b/dlls/dmusic/dmusic.c @@ -408,6 +408,8 @@ HRESULT WINAPI DMUSIC_CreateDirectMusicImpl(LPCGUID riid, LPVOID* ret_iface, LPU TRACE("(%p,%p,%p)\n", riid, ret_iface, unkouter); *ret_iface = NULL; + if (unkouter) + return CLASS_E_NOAGGREGATION; dmusic = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectMusic8Impl)); if (!dmusic)
participants (1)
-
Alexandre Julliard