msxml3: Don't cast from a COM object to an iface.

Michael Stefaniuc mstefani at redhat.de
Wed Jun 29 02:52:29 CDT 2016


Signed-off-by: Michael Stefaniuc <mstefani at redhat.de>
---
 dlls/msxml3/httprequest.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/dlls/msxml3/httprequest.c b/dlls/msxml3/httprequest.c
index e0f08ea..e0b6e1c 100644
--- a/dlls/msxml3/httprequest.c
+++ b/dlls/msxml3/httprequest.c
@@ -1560,19 +1560,19 @@ static HRESULT WINAPI
 httprequest_ObjectWithSite_QueryInterface( IObjectWithSite* iface, REFIID riid, void** ppvObject )
 {
     httprequest *This = impl_from_IObjectWithSite(iface);
-    return IXMLHTTPRequest_QueryInterface( (IXMLHTTPRequest *)This, riid, ppvObject );
+    return IXMLHTTPRequest_QueryInterface(&This->IXMLHTTPRequest_iface, riid, ppvObject);
 }
 
 static ULONG WINAPI httprequest_ObjectWithSite_AddRef( IObjectWithSite* iface )
 {
     httprequest *This = impl_from_IObjectWithSite(iface);
-    return IXMLHTTPRequest_AddRef((IXMLHTTPRequest *)This);
+    return IXMLHTTPRequest_AddRef(&This->IXMLHTTPRequest_iface);
 }
 
 static ULONG WINAPI httprequest_ObjectWithSite_Release( IObjectWithSite* iface )
 {
     httprequest *This = impl_from_IObjectWithSite(iface);
-    return IXMLHTTPRequest_Release((IXMLHTTPRequest *)This);
+    return IXMLHTTPRequest_Release(&This->IXMLHTTPRequest_iface);
 }
 
 static HRESULT WINAPI httprequest_ObjectWithSite_GetSite( IObjectWithSite *iface, REFIID iid, void **ppvSite )
@@ -1656,19 +1656,19 @@ static const IObjectWithSiteVtbl ObjectWithSiteVtbl =
 static HRESULT WINAPI httprequest_Safety_QueryInterface(IObjectSafety *iface, REFIID riid, void **ppv)
 {
     httprequest *This = impl_from_IObjectSafety(iface);
-    return IXMLHTTPRequest_QueryInterface( (IXMLHTTPRequest *)This, riid, ppv );
+    return IXMLHTTPRequest_QueryInterface(&This->IXMLHTTPRequest_iface, riid, ppv);
 }
 
 static ULONG WINAPI httprequest_Safety_AddRef(IObjectSafety *iface)
 {
     httprequest *This = impl_from_IObjectSafety(iface);
-    return IXMLHTTPRequest_AddRef((IXMLHTTPRequest *)This);
+    return IXMLHTTPRequest_AddRef(&This->IXMLHTTPRequest_iface);
 }
 
 static ULONG WINAPI httprequest_Safety_Release(IObjectSafety *iface)
 {
     httprequest *This = impl_from_IObjectSafety(iface);
-    return IXMLHTTPRequest_Release((IXMLHTTPRequest *)This);
+    return IXMLHTTPRequest_Release(&This->IXMLHTTPRequest_iface);
 }
 
 static HRESULT WINAPI httprequest_Safety_GetInterfaceSafetyOptions(IObjectSafety *iface, REFIID riid,
-- 
2.5.5



More information about the wine-patches mailing list