Commit 8646cd77 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

urlmon: Use proper IUri in BindToObject implementation.

parent cca52128
......@@ -3626,6 +3626,11 @@ static void test_StdURLMoniker(void)
ok(hres == MK_E_SYNTAX, "BindToStorage failed: %08x, expected MK_E_SYNTAX\n", hres);
ok(!unk, "unk = %p\n", unk);
unk = (void*)0xdeadbeef;
hres = IMoniker_BindToObject(mon, bctx, NULL, &IID_IUnknown, (void**)&unk);
ok(hres == MK_E_SYNTAX, "BindToStorage failed: %08x, expected MK_E_SYNTAX\n", hres);
ok(!unk, "unk = %p\n", unk);
IMoniker_Release(mon);
}
......
......@@ -227,7 +227,6 @@ static HRESULT WINAPI URLMoniker_BindToObject(IMoniker *iface, IBindCtx* pbc, IM
{
URLMoniker *This = impl_from_IMoniker(iface);
IRunningObjectTable *obj_tbl;
IUri *uri;
HRESULT hres;
TRACE("(%p)->(%p,%p,%s,%p): stub\n", This, pbc, pmkToLeft, debugstr_guid(riid), ppv);
......@@ -238,14 +237,12 @@ static HRESULT WINAPI URLMoniker_BindToObject(IMoniker *iface, IBindCtx* pbc, IM
IRunningObjectTable_Release(obj_tbl);
}
hres = CreateUri(This->URLName, Uri_CREATE_FILE_USE_DOS_PATH, 0, &uri);
if(FAILED(hres))
return hres;
hres = bind_to_object(iface, uri, pbc, riid, ppv);
if(!This->uri) {
*ppv = NULL;
return MK_E_SYNTAX;
}
IUri_Release(uri);
return hres;
return bind_to_object(&This->IMoniker_iface, This->uri, pbc, riid, ppv);
}
static HRESULT WINAPI URLMoniker_BindToStorage(IMoniker* iface, IBindCtx* pbc,
......
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