oleaut32: Avoid casts from COM objects to interfaces.
Signed-off-by: Michael Stefaniuc <mstefani@redhat.de> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
502b9e9aa7
commit
a3c5c50bdd
|
@ -1014,8 +1014,10 @@ static HRESULT WINAPI OLEFontImpl_Clone(
|
||||||
|
|
||||||
newObject->pPropertyNotifyCP = NULL;
|
newObject->pPropertyNotifyCP = NULL;
|
||||||
newObject->pFontEventsCP = NULL;
|
newObject->pFontEventsCP = NULL;
|
||||||
CreateConnectionPoint((IUnknown*)newObject, &IID_IPropertyNotifySink, &newObject->pPropertyNotifyCP);
|
CreateConnectionPoint((IUnknown*)&newObject->IFont_iface, &IID_IPropertyNotifySink,
|
||||||
CreateConnectionPoint((IUnknown*)newObject, &IID_IFontEventsDisp, &newObject->pFontEventsCP);
|
&newObject->pPropertyNotifyCP);
|
||||||
|
CreateConnectionPoint((IUnknown*)&newObject->IFont_iface, &IID_IFontEventsDisp,
|
||||||
|
&newObject->pFontEventsCP);
|
||||||
|
|
||||||
if (!newObject->pPropertyNotifyCP || !newObject->pFontEventsCP)
|
if (!newObject->pPropertyNotifyCP || !newObject->pFontEventsCP)
|
||||||
{
|
{
|
||||||
|
|
|
@ -299,7 +299,8 @@ static OLEPictureImpl* OLEPictureImpl_Construct(LPPICTDESC pictDesc, BOOL fOwn)
|
||||||
newObject->IConnectionPointContainer_iface.lpVtbl = &OLEPictureImpl_IConnectionPointContainer_VTable;
|
newObject->IConnectionPointContainer_iface.lpVtbl = &OLEPictureImpl_IConnectionPointContainer_VTable;
|
||||||
|
|
||||||
newObject->pCP = NULL;
|
newObject->pCP = NULL;
|
||||||
CreateConnectionPoint((IUnknown*)newObject,&IID_IPropertyNotifySink,&newObject->pCP);
|
CreateConnectionPoint((IUnknown*)&newObject->IPicture_iface, &IID_IPropertyNotifySink,
|
||||||
|
&newObject->pCP);
|
||||||
if (!newObject->pCP)
|
if (!newObject->pCP)
|
||||||
{
|
{
|
||||||
HeapFree(GetProcessHeap(), 0, newObject);
|
HeapFree(GetProcessHeap(), 0, newObject);
|
||||||
|
|
Loading…
Reference in New Issue