IClassFactory->CreateInstance aggregation check

Joris Huizer jorishuizer at planet.nl
Fri Oct 15 15:54:26 CDT 2004


I found files which need the aggregation check (I think),
searched by `grep -n -r _create *|grep pUnkOuter|grep "\.c"`

Joris
-------------- next part --------------
? backup-101520041807-pre-wine.tgz
? description-pak
? doc-pak
? patch.diff
? wine_cvs-040927-1_i386.deb
? wine_cvs-041015-1_i386.deb
Index: dlls/amstream/amstream.c
===================================================================
RCS file: /home/wine/wine/dlls/amstream/amstream.c,v
retrieving revision 1.5
diff -u -r1.5 amstream.c
--- dlls/amstream/amstream.c	7 Oct 2004 03:06:51 -0000	1.5
+++ dlls/amstream/amstream.c	15 Oct 2004 20:48:23 -0000
@@ -46,6 +46,9 @@
     IAMMultiMediaStreamImpl* object; 
 
     FIXME("(%p,%p)\n", pUnkOuter, ppObj);
+
+    if( pUnkOuter )
+      return CLASS_E_NOAGGREGATION;
       
     object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IAMMultiMediaStreamImpl));
     
Index: dlls/itss/itss.c
===================================================================
RCS file: /home/wine/wine/dlls/itss/itss.c,v
retrieving revision 1.5
diff -u -r1.5 itss.c
--- dlls/itss/itss.c	7 Oct 2004 03:06:50 -0000	1.5
+++ dlls/itss/itss.c	15 Oct 2004 20:48:25 -0000
@@ -384,6 +384,9 @@
 {
     ITStorageImpl *its;
 
+    if( pUnkOuter )
+        return CLASS_E_NOAGGREGATION;
+
     its = HeapAlloc( GetProcessHeap(), 0, sizeof(ITStorageImpl) );
     its->vtbl_IITStorage = &ITStorageImpl_Vtbl;
     its->ref = 1;
Index: dlls/quartz/filesource.c
===================================================================
RCS file: /home/wine/wine/dlls/quartz/filesource.c,v
retrieving revision 1.9
diff -u -r1.9 filesource.c
--- dlls/quartz/filesource.c	8 Sep 2004 01:50:37 -0000	1.9
+++ dlls/quartz/filesource.c	15 Oct 2004 20:48:27 -0000
@@ -293,7 +293,12 @@
 
 HRESULT AsyncReader_create(IUnknown * pUnkOuter, LPVOID * ppv)
 {
-    AsyncReader * pAsyncRead = CoTaskMemAlloc(sizeof(AsyncReader));
+    AsyncReader *pAsyncRead;
+    
+    if( pUnkOuter )
+        return CLASS_E_NOAGGREGATION;
+    
+    pAsyncRead = CoTaskMemAlloc(sizeof(AsyncReader));
 
     if (!pAsyncRead)
         return E_OUTOFMEMORY;
Index: dlls/quartz/filtergraph.c
===================================================================
RCS file: /home/wine/wine/dlls/quartz/filtergraph.c,v
retrieving revision 1.16
diff -u -r1.16 filtergraph.c
--- dlls/quartz/filtergraph.c	7 Oct 2004 03:06:49 -0000	1.16
+++ dlls/quartz/filtergraph.c	15 Oct 2004 20:48:29 -0000
@@ -2416,6 +2416,9 @@
 
     TRACE("(%p,%p)\n", pUnkOuter, ppObj);
 
+    if( pUnkOuter )
+        return CLASS_E_NOAGGREGATION;
+
     fimpl = (IFilterGraphImpl *) HeapAlloc(GetProcessHeap(), 0, sizeof(*fimpl));
     fimpl->IGraphBuilder_vtbl = &IGraphBuilder_VTable;
     fimpl->IMediaControl_vtbl = &IMediaControl_VTable;


More information about the wine-patches mailing list