[PATCH 5/6] evr: Return E_NOINTERFACE when aggregation is requested with an interface other than IUnknown.

Zebediah Figura zfigura at codeweavers.com
Tue Jun 4 17:54:27 CDT 2019


From: Zebediah Figura <z.figura12 at gmail.com>

Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
---
 dlls/evr/main.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/dlls/evr/main.c b/dlls/evr/main.c
index 313d518..ba48207 100644
--- a/dlls/evr/main.c
+++ b/dlls/evr/main.c
@@ -118,6 +118,10 @@ static HRESULT WINAPI classfactory_CreateInstance(IClassFactory *iface, IUnknown
     TRACE("(%p)->(%p,%s,%p)\n", This, outer_unk, debugstr_guid(riid), ppobj);
 
     *ppobj = NULL;
+
+    if (outer_unk && !IsEqualGUID(riid, &IID_IUnknown))
+        return E_NOINTERFACE;
+
     hres = This->pfnCreateInstance(outer_unk, (void **) &unk);
     if (SUCCEEDED(hres))
     {
-- 
2.7.4




More information about the wine-devel mailing list