Michael Stefaniuc : quartz: Handle wrong COM aggregation attempts in IClassFactory_CreateInstance.

Alexandre Julliard julliard at winehq.org
Mon Jul 2 13:22:00 CDT 2012


Module: wine
Branch: master
Commit: ec9951892bab811ac6a8cedda7f7a6bf05e20b5f
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=ec9951892bab811ac6a8cedda7f7a6bf05e20b5f

Author: Michael Stefaniuc <mstefani at redhat.de>
Date:   Mon Jul  2 00:54:55 2012 +0200

quartz: Handle wrong COM aggregation attempts in IClassFactory_CreateInstance.

---

 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);




More information about the wine-cvs mailing list