Jacek Caban : mshtml: Added QueryService(SID_SBindHost) implementation.

Alexandre Julliard julliard at winehq.org
Fri Dec 10 11:57:02 CST 2010


Module: wine
Branch: master
Commit: 3314bd8f8aeacbd88f33c1534bdbbec9d4bb0d25
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=3314bd8f8aeacbd88f33c1534bdbbec9d4bb0d25

Author: Jacek Caban <jacek at codeweavers.com>
Date:   Fri Dec 10 16:37:39 2010 +0100

mshtml: Added QueryService(SID_SBindHost) implementation.

---

 dlls/mshtml/pluginhost.c    |    6 ++++++
 dlls/mshtml/tests/activex.c |   17 +++++++++++++++++
 2 files changed, 23 insertions(+), 0 deletions(-)

diff --git a/dlls/mshtml/pluginhost.c b/dlls/mshtml/pluginhost.c
index d7a83e7..7b7e210 100644
--- a/dlls/mshtml/pluginhost.c
+++ b/dlls/mshtml/pluginhost.c
@@ -838,6 +838,12 @@ static ULONG WINAPI PHServiceProvider_Release(IServiceProvider *iface)
 static HRESULT WINAPI PHServiceProvider_QueryService(IServiceProvider *iface, REFGUID guidService, REFIID riid, void **ppv)
 {
     PluginHost *This = impl_from_IServiceProvider(iface);
+
+    if(IsEqualGUID(guidService, &SID_SBindHost)) {
+        TRACE("SID_SBindHost service\n");
+        return IOleClientSite_QueryInterface(&This->IOleClientSite_iface, riid, ppv);
+    }
+
     FIXME("(%p)->(%s %s %p)\n", This, debugstr_guid(guidService), debugstr_guid(riid), ppv);
     return E_NOINTERFACE;
 }
diff --git a/dlls/mshtml/tests/activex.c b/dlls/mshtml/tests/activex.c
index 9d8e668..3e5f7b8 100644
--- a/dlls/mshtml/tests/activex.c
+++ b/dlls/mshtml/tests/activex.c
@@ -330,6 +330,8 @@ static HRESULT WINAPI PersistPropertyBag_InitNew(IPersistPropertyBag *face)
 
 static HRESULT WINAPI PersistPropertyBag_Load(IPersistPropertyBag *face, IPropertyBag *pPropBag, IErrorLog *pErrorLog)
 {
+    IBindHost *bind_host, *bind_host2;
+    IServiceProvider *sp;
     VARIANT v;
     HRESULT hres;
 
@@ -384,6 +386,21 @@ static HRESULT WINAPI PersistPropertyBag_Load(IPersistPropertyBag *face, IProper
     ok(V_BSTR(&v) == (BSTR)0xdeadbeef, "V_BSTR(v) = %p\n", V_BSTR(&v));
 
     set_plugin_readystate(READYSTATE_INTERACTIVE);
+
+    hres = IOleClientSite_QueryInterface(client_site, &IID_IBindHost, (void**)&bind_host);
+    ok(hres == S_OK, "Could not get IBindHost iface: %08x\n", hres);
+
+    hres = IOleClientSite_QueryInterface(client_site, &IID_IServiceProvider, (void**)&sp);
+    ok(hres == S_OK, "Could not get IServiceProvider iface: %08x\n", hres);
+
+    hres = IServiceProvider_QueryService(sp, &IID_IBindHost, &SID_SBindHost, (void**)&bind_host2);
+    ok(hres == S_OK, "QueryService(SID_SBindHost) failed: %08x\n", hres);
+    IServiceProvider_Release(sp);
+
+    ok(iface_cmp((IUnknown*)bind_host, (IUnknown*)bind_host2), "bind_host != bind_host2\n");
+    IBindHost_Release(bind_host2);
+    IBindHost_Release(bind_host);
+
     set_plugin_readystate(READYSTATE_COMPLETE);
 
     return S_OK;




More information about the wine-cvs mailing list