Jacek Caban : mshtml: Added IBindHost::CreateMoniker implementation.
Alexandre Julliard
julliard at winehq.org
Fri Dec 10 11:57:02 CST 2010
Module: wine
Branch: master
Commit: b3f0f07d70d007886adaca89bf27665aa73f7350
URL: http://source.winehq.org/git/wine.git/?a=commit;h=b3f0f07d70d007886adaca89bf27665aa73f7350
Author: Jacek Caban <jacek at codeweavers.com>
Date: Fri Dec 10 16:38:03 2010 +0100
mshtml: Added IBindHost::CreateMoniker implementation.
---
dlls/mshtml/pluginhost.c | 11 +++++++++--
dlls/mshtml/tests/activex.c | 12 ++++++++++--
2 files changed, 19 insertions(+), 4 deletions(-)
diff --git a/dlls/mshtml/pluginhost.c b/dlls/mshtml/pluginhost.c
index 9f6f2d5..7d667a4 100644
--- a/dlls/mshtml/pluginhost.c
+++ b/dlls/mshtml/pluginhost.c
@@ -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,
diff --git a/dlls/mshtml/tests/activex.c b/dlls/mshtml/tests/activex.c
index 89b8af4..16c91ec 100644
--- a/dlls/mshtml/tests/activex.c
+++ b/dlls/mshtml/tests/activex.c
@@ -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;
More information about the wine-cvs
mailing list