[prev in list] [next in list] [prev in thread] [next in thread]
List: wine-devel
Subject: [PATCH] shell32: Don't cast from COM object to interface
From: Michael Stefaniuc <mstefani () winehq ! org>
Date: 2019-05-31 21:14:53
Message-ID: 20190531211453.22027-1-mstefani () winehq ! org
[Download RAW message or body]
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
---
dlls/shell32/dataobject.c | 2 +-
dlls/shell32/shellole.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/shell32/dataobject.c b/dlls/shell32/dataobject.c
index 3e718a3afe..5c0dbc6bf8 100644
--- a/dlls/shell32/dataobject.c
+++ b/dlls/shell32/dataobject.c
@@ -187,7 +187,7 @@ LPENUMFORMATETC IEnumFORMATETC_Constructor(UINT cfmt, const FORMATETC afmt[])
}
TRACE("(%p)->(%u,%p)\n",ef, cfmt, afmt);
- return (LPENUMFORMATETC)ef;
+ return &ef->IEnumFORMATETC_iface;
}
diff --git a/dlls/shell32/shellole.c b/dlls/shell32/shellole.c
index 3fe96801aa..1ab8f386c2 100644
--- a/dlls/shell32/shellole.c
+++ b/dlls/shell32/shellole.c
@@ -401,7 +401,7 @@ static IClassFactory * IDefClF_fnConstructor(LPFNCREATEINSTANCE lpfnCI, PLONG pc
lpclf->riidInst = riidInst;
TRACE("(%p)%s\n",lpclf, shdebugstr_guid(riidInst));
- return (LPCLASSFACTORY)lpclf;
+ return &lpclf->IClassFactory_iface;
}
/**************************************************************************
* IDefClF_fnQueryInterface
--
2.20.1
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic