Michael Stefaniuc : shell32: Don't cast from COM object to interface.
Alexandre Julliard
julliard at winehq.org
Mon Jun 3 16:07:14 CDT 2019
Module: wine
Branch: master
Commit: 245417571ab9f9a9715c4f349f7a2a0963a99220
URL: https://source.winehq.org/git/wine.git/?a=commit;h=245417571ab9f9a9715c4f349f7a2a0963a99220
Author: Michael Stefaniuc <mstefani at winehq.org>
Date: Fri May 31 23:14:53 2019 +0200
shell32: Don't cast from COM object to interface.
Signed-off-by: Michael Stefaniuc <mstefani at winehq.org>
Signed-off-by: Alexandre Julliard <julliard at 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 3e718a3..5c0dbc6 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 3fe9680..1ab8f38 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
More information about the wine-cvs
mailing list