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

This commit is contained in:
Jacek Caban 2006-06-03 00:41:48 +02:00 committed by Alexandre Julliard
parent f1d2e37655
commit ee8c855f77
2 changed files with 33 additions and 1 deletions

View File

@ -491,3 +491,28 @@ void hlink_frame_navigate(HTMLDocument *doc, IHlinkFrame *hlink_frame,
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;
}

View File

@ -228,7 +228,12 @@ static HRESULT WINAPI PersistMoniker_Load(IPersistMoniker *iface, BOOL fFullyAva
if(post_data_stream)
nsIInputStream_Release(post_data_stream);
if(!bscallback->nschannel)
ERR("bscallback->nschannel == NULL\n");
if(NS_SUCCEEDED(nsres)) {
/* FIXME: don't return here (URL Moniker needs to be good enough) */
IBindStatusCallback_Release(STATUSCLB(bscallback));
CoTaskMemFree(url);
return S_OK;
@ -244,10 +249,12 @@ static HRESULT WINAPI PersistMoniker_Load(IPersistMoniker *iface, BOOL fFullyAva
if(pibc)
FIXME("not supported pibc\n");
hres = start_binding(bscallback, pimkName);
IBindStatusCallback_Release(STATUSCLB(bscallback));
CoTaskMemFree(url);
return S_OK;
return hres;
}
static HRESULT WINAPI PersistMoniker_Save(IPersistMoniker *iface, IMoniker *pimkName,