Commit 85f472b3 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

urlmon: Added BindToObject implementation.

parent a16ae2e8
......@@ -1698,7 +1698,7 @@ static void test_BindToObject(int protocol, BOOL emul)
trace( "Network unreachable, skipping tests\n" );
return;
}
todo_wine ok(SUCCEEDED(hres), "IMoniker_BindToObject failed with error 0x%08x\n", hres);
ok(SUCCEEDED(hres), "IMoniker_BindToObject failed with error 0x%08x\n", hres);
/* no point testing the calls if binding didn't even work */
if (!SUCCEEDED(hres)) return;
......@@ -1750,7 +1750,10 @@ static void test_BindToObject(int protocol, BOOL emul)
CHECK_CALLED(OnProgress_BEGINDOWNLOADDATA);
if(test_protocol == HTTP_TEST)
CLEAR_CALLED(OnProgress_DOWNLOADINGDATA);
CHECK_CALLED(OnProgress_ENDDOWNLOADDATA);
if(test_protocol == HTTP_TEST && urls[test_protocol] != SHORT_RESPONSE_URL)
todo_wine CHECK_CALLED(OnProgress_ENDDOWNLOADDATA);
else
CHECK_CALLED(OnProgress_ENDDOWNLOADDATA);
CHECK_CALLED(OnProgress_CLASSIDAVAILABLE);
CHECK_CALLED(OnProgress_BEGINSYNCOPERATION);
CHECK_CALLED(OnProgress_ENDSYNCOPERATION);
......@@ -1758,8 +1761,13 @@ static void test_BindToObject(int protocol, BOOL emul)
CHECK_CALLED(OnStopBinding);
}
ok(IMoniker_Release(mon) == 0, "mon should be destroyed here\n");
ok(IBindCtx_Release(bctx) == 0, "bctx should be destroyed here\n");
if(test_protocol != HTTP_TEST || emul || urls[test_protocol] == SHORT_RESPONSE_URL) {
ok(IMoniker_Release(mon) == 0, "mon should be destroyed here\n");
ok(IBindCtx_Release(bctx) == 0, "bctx should be destroyed here\n");
}else todo_wine {
ok(IMoniker_Release(mon) == 0, "mon should be destroyed here\n");
ok(IBindCtx_Release(bctx) == 0, "bctx should be destroyed here\n");
}
if(test_protocol == HTTP_TEST)
http_is_first = FALSE;
......
......@@ -473,16 +473,21 @@ static HRESULT WINAPI URLMonikerImpl_BindToObject(IMoniker* iface,
IBindCtx* pbc,
IMoniker* pmkToLeft,
REFIID riid,
VOID** ppvResult)
VOID** ppv)
{
URLMonikerImpl *This = (URLMonikerImpl *)iface;
IRunningObjectTable *obj_tbl;
HRESULT hres;
*ppvResult=0;
TRACE("(%p)->(%p,%p,%s,%p): stub\n", This, pbc, pmkToLeft, debugstr_guid(riid), ppv);
FIXME("(%p)->(%p,%p,%s,%p): stub\n",This,pbc,pmkToLeft,debugstr_guid(riid),
ppvResult);
hres = IBindCtx_GetRunningObjectTable(pbc, &obj_tbl);
if(SUCCEEDED(hres)) {
FIXME("use running object table\n");
IRunningObjectTable_Release(obj_tbl);
}
return E_NOTIMPL;
return bind_to_object(iface, This->URLName, pbc, riid, ppv);
}
/******************************************************************************
......
......@@ -69,6 +69,7 @@ IInternetProtocolInfo *get_protocol_info(LPCWSTR url);
HRESULT get_protocol_handler(LPCWSTR url, CLSID *clsid, IClassFactory **ret);
HRESULT bind_to_storage(LPCWSTR url, IBindCtx *pbc, REFIID riid, void **ppv);
HRESULT bind_to_object(IMoniker *mon, LPCWSTR url, IBindCtx *pbc, REFIID riid, void **ppv);
HRESULT create_binding_protocol(LPCWSTR url, BOOL from_urlmon, IInternetProtocol **protocol);
void set_binding_sink(IInternetProtocol *bind_protocol, IInternetProtocolSink *sink);
......
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