mshtml: Added IBindHost::CreateMoniker implementation.

oldstable
Jacek Caban 2010-12-10 16:38:03 +01:00 committed by Alexandre Julliard
parent d43fb00eaf
commit b3f0f07d70
2 changed files with 19 additions and 4 deletions

View File

@ -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,

View File

@ -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,
@ -417,6 +418,15 @@ static HRESULT WINAPI PersistPropertyBag_Load(IPersistPropertyBag *face, IProper
ok(iface_cmp((IUnknown*)bind_host, (IUnknown*)bind_host2), "bind_host != bind_host2\n");
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);
@ -424,8 +434,6 @@ static HRESULT WINAPI PersistPropertyBag_Load(IPersistPropertyBag *face, IProper
test_mon_displayname(mon, "about:blank");
IMoniker_Release(mon);
IBindHost_Release(bind_host);
set_plugin_readystate(READYSTATE_COMPLETE);
return S_OK;