Commit ee8c855f authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

mshtml: Added begining binding code in IPersistMoniker::Load.

parent f1d2e376
...@@ -491,3 +491,28 @@ void hlink_frame_navigate(HTMLDocument *doc, IHlinkFrame *hlink_frame, ...@@ -491,3 +491,28 @@ void hlink_frame_navigate(HTMLDocument *doc, IHlinkFrame *hlink_frame,
IMoniker_Release(mon); IMoniker_Release(mon);
} }
HRESULT start_binding(BSCallback *bscallback, IMoniker *mon)
{
IStream *str = NULL;
IBindCtx *bctx;
HRESULT hres;
hres = CreateAsyncBindCtx(0, STATUSCLB(bscallback), NULL, &bctx);
if(FAILED(hres)) {
WARN("CreateAsyncBindCtx failed: %08lx\n", hres);
return hres;
}
hres = IMoniker_BindToStorage(mon, bctx, NULL, &IID_IStream, (void**)&str);
IBindCtx_Release(bctx);
if(FAILED(hres)) {
WARN("BindToStorage failed: %08lx\n", hres);
return hres;
}
if(str)
IStream_Release(str);
return S_OK;
}
...@@ -228,7 +228,12 @@ static HRESULT WINAPI PersistMoniker_Load(IPersistMoniker *iface, BOOL fFullyAva ...@@ -228,7 +228,12 @@ static HRESULT WINAPI PersistMoniker_Load(IPersistMoniker *iface, BOOL fFullyAva
if(post_data_stream) if(post_data_stream)
nsIInputStream_Release(post_data_stream); nsIInputStream_Release(post_data_stream);
if(!bscallback->nschannel)
ERR("bscallback->nschannel == NULL\n");
if(NS_SUCCEEDED(nsres)) { if(NS_SUCCEEDED(nsres)) {
/* FIXME: don't return here (URL Moniker needs to be good enough) */
IBindStatusCallback_Release(STATUSCLB(bscallback)); IBindStatusCallback_Release(STATUSCLB(bscallback));
CoTaskMemFree(url); CoTaskMemFree(url);
return S_OK; return S_OK;
...@@ -244,10 +249,12 @@ static HRESULT WINAPI PersistMoniker_Load(IPersistMoniker *iface, BOOL fFullyAva ...@@ -244,10 +249,12 @@ static HRESULT WINAPI PersistMoniker_Load(IPersistMoniker *iface, BOOL fFullyAva
if(pibc) if(pibc)
FIXME("not supported pibc\n"); FIXME("not supported pibc\n");
hres = start_binding(bscallback, pimkName);
IBindStatusCallback_Release(STATUSCLB(bscallback)); IBindStatusCallback_Release(STATUSCLB(bscallback));
CoTaskMemFree(url); CoTaskMemFree(url);
return S_OK; return hres;
} }
static HRESULT WINAPI PersistMoniker_Save(IPersistMoniker *iface, IMoniker *pimkName, static HRESULT WINAPI PersistMoniker_Save(IPersistMoniker *iface, IMoniker *pimkName,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment