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

mshtml: Added IBindHost::CreateMoniker implementation.

parent d43fb00e
......@@ -800,8 +800,15 @@ static ULONG WINAPI PHBindHost_Release(IBindHost *iface)
static HRESULT WINAPI PHBindHost_CreateMoniker(IBindHost *iface, LPOLESTR szName, IBindCtx *pBC, IMoniker **ppmk, DWORD dwReserved)
{
PluginHost *This = impl_from_IBindHost(iface);
FIXME("(%p)->(%s %p %p %x)\n", This, debugstr_w(szName), pBC, ppmk, dwReserved);
return E_NOTIMPL;
TRACE("(%p)->(%s %p %p %x)\n", This, debugstr_w(szName), pBC, ppmk, dwReserved);
if(!This->doc || !This->doc->basedoc.window || !This->doc->basedoc.window->mon) {
FIXME("no moniker\n");
return E_UNEXPECTED;
}
return CreateURLMoniker(This->doc->basedoc.window->mon, szName, ppmk);
}
static HRESULT WINAPI PHBindHost_MonikerBindToStorage(IBindHost *iface, IMoniker *pMk, IBindCtx *pBC,
......
......@@ -355,6 +355,7 @@ static HRESULT WINAPI PersistPropertyBag_Load(IPersistPropertyBag *face, IProper
static const WCHAR param_nameW[] = {'p','a','r','a','m','_','n','a','m','e',0};
static const WCHAR num_paramW[] = {'n','u','m','_','p','a','r','a','m',0};
static const WCHAR no_paramW[] = {'n','o','_','p','a','r','a','m',0};
static WCHAR test_swfW[] = {'t','e','s','t','.','s','w','f',0};
static const IID *propbag_ifaces[] = {
&IID_IPropertyBag,
......@@ -418,14 +419,21 @@ static HRESULT WINAPI PersistPropertyBag_Load(IPersistPropertyBag *face, IProper
IBindHost_Release(bind_host2);
mon = NULL;
hres = IBindHost_CreateMoniker(bind_host, test_swfW, NULL, &mon, 0);
ok(hres == S_OK, "CreateMoniker failed: %08x\n", hres);
ok(mon != NULL, "mon == NULL\n");
test_mon_displayname(mon, "about:test.swf");
IMoniker_Release(mon);
IBindHost_Release(bind_host);
mon = NULL;
hres = IOleClientSite_GetMoniker(client_site, OLEGETMONIKER_ONLYIFTHERE, OLEWHICHMK_CONTAINER, &mon);
ok(hres == S_OK, "GetMoniker failed: %08x\n", hres);
ok(mon != NULL, "mon == NULL\n");
test_mon_displayname(mon, "about:blank");
IMoniker_Release(mon);
IBindHost_Release(bind_host);
set_plugin_readystate(READYSTATE_COMPLETE);
return S_OK;
......
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