[PATCH 01/13] quartz: Handle wrong COM aggregation attempts in IClassFactory_CreateInstance.

Michael Stefaniuc mstefani at redhat.de
Sun Jul 1 17:54:55 CDT 2012


---
 dlls/quartz/main.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/dlls/quartz/main.c b/dlls/quartz/main.c
index a75a794..edb9cbc 100644
--- a/dlls/quartz/main.c
+++ b/dlls/quartz/main.c
@@ -124,10 +124,13 @@ static HRESULT WINAPI DSCF_CreateInstance(LPCLASSFACTORY iface, LPUNKNOWN pOuter
     IClassFactoryImpl *This = (IClassFactoryImpl *)iface;
     HRESULT hres;
     LPUNKNOWN punk;
-    
+
     TRACE("(%p)->(%p,%s,%p)\n",This,pOuter,debugstr_guid(riid),ppobj);
 
     *ppobj = NULL;
+    if(pOuter && !IsEqualGUID(&IID_IUnknown, riid))
+        return E_NOINTERFACE;
+
     hres = This->pfnCreateInstance(pOuter, (LPVOID *) &punk);
     if (SUCCEEDED(hres)) {
         hres = IUnknown_QueryInterface(punk, riid, ppobj);
-- 
1.7.6.5



More information about the wine-patches mailing list