oleaut32: Avoid casts from COM objects to interfaces.
Michael Stefaniuc
mstefani at redhat.de
Thu Sep 8 15:19:47 CDT 2016
Signed-off-by: Michael Stefaniuc <mstefani at redhat.de>
---
dlls/oleaut32/olefont.c | 6 ++++--
dlls/oleaut32/olepicture.c | 3 ++-
2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/dlls/oleaut32/olefont.c b/dlls/oleaut32/olefont.c
index 4b3411e..c20093c 100644
--- a/dlls/oleaut32/olefont.c
+++ b/dlls/oleaut32/olefont.c
@@ -1014,8 +1014,10 @@ static HRESULT WINAPI OLEFontImpl_Clone(
newObject->pPropertyNotifyCP = NULL;
newObject->pFontEventsCP = NULL;
- CreateConnectionPoint((IUnknown*)newObject, &IID_IPropertyNotifySink, &newObject->pPropertyNotifyCP);
- CreateConnectionPoint((IUnknown*)newObject, &IID_IFontEventsDisp, &newObject->pFontEventsCP);
+ CreateConnectionPoint((IUnknown*)&newObject->IFont_iface, &IID_IPropertyNotifySink,
+ &newObject->pPropertyNotifyCP);
+ CreateConnectionPoint((IUnknown*)&newObject->IFont_iface, &IID_IFontEventsDisp,
+ &newObject->pFontEventsCP);
if (!newObject->pPropertyNotifyCP || !newObject->pFontEventsCP)
{
diff --git a/dlls/oleaut32/olepicture.c b/dlls/oleaut32/olepicture.c
index 96c109a..bfca22f 100644
--- a/dlls/oleaut32/olepicture.c
+++ b/dlls/oleaut32/olepicture.c
@@ -299,7 +299,8 @@ static OLEPictureImpl* OLEPictureImpl_Construct(LPPICTDESC pictDesc, BOOL fOwn)
newObject->IConnectionPointContainer_iface.lpVtbl = &OLEPictureImpl_IConnectionPointContainer_VTable;
newObject->pCP = NULL;
- CreateConnectionPoint((IUnknown*)newObject,&IID_IPropertyNotifySink,&newObject->pCP);
+ CreateConnectionPoint((IUnknown*)&newObject->IPicture_iface, &IID_IPropertyNotifySink,
+ &newObject->pCP);
if (!newObject->pCP)
{
HeapFree(GetProcessHeap(), 0, newObject);
--
2.5.5
More information about the wine-patches
mailing list