Michael Stefaniuc : msxml3: COM cleanup for the IBindStatusCallback iface.
Alexandre Julliard
julliard at winehq.org
Mon Jan 24 11:07:34 CST 2011
Module: wine
Branch: master
Commit: 5fd62154f3be23508234f4284fdefa5524dba0f8
URL: http://source.winehq.org/git/wine.git/?a=commit;h=5fd62154f3be23508234f4284fdefa5524dba0f8
Author: Michael Stefaniuc <mstefani at redhat.de>
Date: Mon Jan 24 00:08:15 2011 +0100
msxml3: COM cleanup for the IBindStatusCallback iface.
---
dlls/msxml3/bsc.c | 12 ++++++------
dlls/msxml3/xmldoc.c | 6 +++---
2 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/dlls/msxml3/bsc.c b/dlls/msxml3/bsc.c
index 020a6e5..5e83ca0 100644
--- a/dlls/msxml3/bsc.c
+++ b/dlls/msxml3/bsc.c
@@ -39,7 +39,7 @@
WINE_DEFAULT_DEBUG_CHANNEL(msxml);
struct bsc_t {
- const struct IBindStatusCallbackVtbl *lpVtbl;
+ IBindStatusCallback IBindStatusCallback_iface;
LONG ref;
@@ -52,7 +52,7 @@ struct bsc_t {
static inline bsc_t *impl_from_IBindStatusCallback( IBindStatusCallback *iface )
{
- return (bsc_t *)((char*)iface - FIELD_OFFSET(bsc_t, lpVtbl));
+ return CONTAINING_RECORD(iface, bsc_t, IBindStatusCallback_iface);
}
static HRESULT WINAPI bsc_QueryInterface(
@@ -269,14 +269,14 @@ HRESULT bind_url(LPCWSTR url, HRESULT (*onDataAvailable)(void*,char*,DWORD), voi
bsc = heap_alloc(sizeof(bsc_t));
- bsc->lpVtbl = &bsc_vtbl;
+ bsc->IBindStatusCallback_iface.lpVtbl = &bsc_vtbl;
bsc->ref = 1;
bsc->obj = obj;
bsc->onDataAvailable = onDataAvailable;
bsc->binding = NULL;
bsc->memstream = NULL;
- hr = RegisterBindStatusCallback(pbc, (IBindStatusCallback*)&bsc->lpVtbl, NULL, 0);
+ hr = RegisterBindStatusCallback(pbc, &bsc->IBindStatusCallback_iface, NULL, 0);
if(SUCCEEDED(hr))
{
IMoniker *moniker;
@@ -295,7 +295,7 @@ HRESULT bind_url(LPCWSTR url, HRESULT (*onDataAvailable)(void*,char*,DWORD), voi
if(FAILED(hr))
{
- IBindStatusCallback_Release((IBindStatusCallback*)&bsc->lpVtbl);
+ IBindStatusCallback_Release(&bsc->IBindStatusCallback_iface);
bsc = NULL;
}
@@ -309,5 +309,5 @@ void detach_bsc(bsc_t *bsc)
IBinding_Abort(bsc->binding);
bsc->obj = NULL;
- IBindStatusCallback_Release((IBindStatusCallback*)&bsc->lpVtbl);
+ IBindStatusCallback_Release(&bsc->IBindStatusCallback_iface);
}
diff --git a/dlls/msxml3/xmldoc.c b/dlls/msxml3/xmldoc.c
index b1488b8..9165346 100644
--- a/dlls/msxml3/xmldoc.c
+++ b/dlls/msxml3/xmldoc.c
@@ -237,7 +237,7 @@ static HRESULT WINAPI xmldoc_get_URL(IXMLDocument *iface, BSTR *p)
}
typedef struct {
- const struct IBindStatusCallbackVtbl *lpVtbl;
+ IBindStatusCallback IBindStatusCallback_iface;
} bsc;
static HRESULT WINAPI bsc_QueryInterface(
@@ -352,7 +352,7 @@ static const struct IBindStatusCallbackVtbl bsc_vtbl =
bsc_OnObjectAvailable
};
-static bsc xmldoc_bsc = { &bsc_vtbl };
+static bsc xmldoc_bsc = { { &bsc_vtbl } };
static HRESULT WINAPI xmldoc_put_URL(IXMLDocument *iface, BSTR p)
{
@@ -392,7 +392,7 @@ static HRESULT WINAPI xmldoc_put_URL(IXMLDocument *iface, BSTR p)
if (FAILED(hr))
return hr;
- CreateAsyncBindCtx(0, (IBindStatusCallback *)&xmldoc_bsc, 0, &bctx);
+ CreateAsyncBindCtx(0, &xmldoc_bsc.IBindStatusCallback_iface, 0, &bctx);
hr = IMoniker_BindToStorage(moniker, bctx, NULL, &IID_IStream, (LPVOID *)&stream);
IBindCtx_Release(bctx);
More information about the wine-cvs
mailing list