msxml3: COM cleanup for the IBindStatusCallback iface.
This commit is contained in:
parent
81c91c4344
commit
5fd62154f3
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue