msxml3: Return parser result in detach_url.
This commit is contained in:
parent
f8112cc548
commit
41eba1c30d
|
@ -53,6 +53,7 @@ struct bsc_t {
|
|||
|
||||
IBinding *binding;
|
||||
IStream *memstream;
|
||||
HRESULT hres;
|
||||
};
|
||||
|
||||
static inline bsc_t *impl_from_IBindStatusCallback( IBindStatusCallback *iface )
|
||||
|
@ -173,7 +174,7 @@ static HRESULT WINAPI bsc_OnStopBinding(
|
|||
DWORD len = GlobalSize(hglobal);
|
||||
char *ptr = GlobalLock(hglobal);
|
||||
|
||||
hr = This->onDataAvailable(This->obj, ptr, len);
|
||||
This->hres = hr = This->onDataAvailable(This->obj, ptr, len);
|
||||
|
||||
GlobalUnlock(hglobal);
|
||||
}
|
||||
|
@ -281,6 +282,7 @@ HRESULT bind_url(LPCWSTR url, HRESULT (*onDataAvailable)(void*,char*,DWORD), voi
|
|||
bsc->onDataAvailable = onDataAvailable;
|
||||
bsc->binding = NULL;
|
||||
bsc->memstream = NULL;
|
||||
bsc->hres = S_OK;
|
||||
|
||||
hr = RegisterBindStatusCallback(pbc, &bsc->IBindStatusCallback_iface, NULL, 0);
|
||||
if(SUCCEEDED(hr))
|
||||
|
@ -309,11 +311,16 @@ HRESULT bind_url(LPCWSTR url, HRESULT (*onDataAvailable)(void*,char*,DWORD), voi
|
|||
return hr;
|
||||
}
|
||||
|
||||
void detach_bsc(bsc_t *bsc)
|
||||
HRESULT detach_bsc(bsc_t *bsc)
|
||||
{
|
||||
HRESULT hres;
|
||||
|
||||
if(bsc->binding)
|
||||
IBinding_Abort(bsc->binding);
|
||||
|
||||
bsc->obj = NULL;
|
||||
hres = bsc->hres;
|
||||
IBindStatusCallback_Release(&bsc->IBindStatusCallback_iface);
|
||||
|
||||
return hres;
|
||||
}
|
||||
|
|
|
@ -2075,8 +2075,11 @@ static HRESULT doread( domdoc *This, LPWSTR filename )
|
|||
if(FAILED(hr))
|
||||
return hr;
|
||||
|
||||
if(This->bsc)
|
||||
detach_bsc(This->bsc);
|
||||
if(This->bsc) {
|
||||
hr = detach_bsc(This->bsc);
|
||||
if(FAILED(hr))
|
||||
return hr;
|
||||
}
|
||||
|
||||
This->bsc = bsc;
|
||||
return S_OK;
|
||||
|
|
|
@ -467,7 +467,7 @@ static inline const CLSID* SchemaCache_version(MSXML_VERSION v)
|
|||
typedef struct bsc_t bsc_t;
|
||||
|
||||
HRESULT bind_url(LPCWSTR, HRESULT (*onDataAvailable)(void*,char*,DWORD), void*, bsc_t**) DECLSPEC_HIDDEN;
|
||||
void detach_bsc(bsc_t*) DECLSPEC_HIDDEN;
|
||||
HRESULT detach_bsc(bsc_t*) DECLSPEC_HIDDEN;
|
||||
|
||||
const char *debugstr_variant(const VARIANT*) DECLSPEC_HIDDEN;
|
||||
|
||||
|
|
|
@ -2298,9 +2298,7 @@ static HRESULT internal_parseURL(
|
|||
if(FAILED(hr))
|
||||
return hr;
|
||||
|
||||
detach_bsc(bsc);
|
||||
|
||||
return S_OK;
|
||||
return detach_bsc(bsc);
|
||||
}
|
||||
|
||||
static HRESULT internal_putProperty(
|
||||
|
|
Loading…
Reference in New Issue