From c12d9ff8d7f1209fb76b405113b278407de57337 Mon Sep 17 00:00:00 2001 From: Jacek Caban Date: Mon, 6 Dec 2010 18:51:20 +0100 Subject: [PATCH] mshtml: Added PluginHost's IServiceProvider stub implementation. --- dlls/mshtml/pluginhost.c | 41 +++++++++++++++++++++++++++++++++++++++++ dlls/mshtml/pluginhost.h | 1 + dlls/mshtml/tests/activex.c | 1 + 3 files changed, 43 insertions(+) diff --git a/dlls/mshtml/pluginhost.c b/dlls/mshtml/pluginhost.c index f652b82854a..e7f39d81163 100644 --- a/dlls/mshtml/pluginhost.c +++ b/dlls/mshtml/pluginhost.c @@ -129,6 +129,9 @@ static HRESULT WINAPI PHClientSite_QueryInterface(IOleClientSite *iface, REFIID }else if(IsEqualGUID(&IID_IBindHost, riid)) { TRACE("(%p)->(IID_IBindHost %p)\n", This, ppv); *ppv = &This->IBindHost_iface; + }else if(IsEqualGUID(&IID_IServiceProvider, riid)) { + TRACE("(%p)->(IID_IServiceProvider %p)\n", This, ppv); + *ppv = &This->IServiceProvider_iface; }else { WARN("Unsupported interface %s\n", debugstr_guid(riid)); *ppv = NULL; @@ -691,6 +694,43 @@ static const IBindHostVtbl BindHostVtbl = { PHBindHost_MonikerBindToObject }; +static inline PluginHost *impl_from_IServiceProvider(IServiceProvider *iface) +{ + return CONTAINING_RECORD(iface, PluginHost, IServiceProvider_iface); +} + +static HRESULT WINAPI PHServiceProvider_QueryInterface(IServiceProvider *iface, REFIID riid, void **ppv) +{ + PluginHost *This = impl_from_IServiceProvider(iface); + return IOleClientSite_QueryInterface(&This->IOleClientSite_iface, riid, ppv); +} + +static ULONG WINAPI PHServiceProvider_AddRef(IServiceProvider *iface) +{ + PluginHost *This = impl_from_IServiceProvider(iface); + return IOleClientSite_AddRef(&This->IOleClientSite_iface); +} + +static ULONG WINAPI PHServiceProvider_Release(IServiceProvider *iface) +{ + PluginHost *This = impl_from_IServiceProvider(iface); + return IOleClientSite_Release(&This->IOleClientSite_iface); +} + +static HRESULT WINAPI PHServiceProvider_QueryService(IServiceProvider *iface, REFGUID guidService, REFIID riid, void **ppv) +{ + PluginHost *This = impl_from_IServiceProvider(iface); + FIXME("(%p)->(%s %s %p)\n", This, debugstr_guid(guidService), debugstr_guid(riid), ppv); + return E_NOINTERFACE; +} + +static const IServiceProviderVtbl ServiceProviderVtbl = { + PHServiceProvider_QueryInterface, + PHServiceProvider_AddRef, + PHServiceProvider_Release, + PHServiceProvider_QueryService +}; + HRESULT create_plugin_host(IUnknown *unk, PluginHost **ret) { PluginHost *host; @@ -706,6 +746,7 @@ HRESULT create_plugin_host(IUnknown *unk, PluginHost **ret) host->IOleInPlaceSiteEx_iface.lpVtbl = &OleInPlaceSiteExVtbl; host->IOleControlSite_iface.lpVtbl = &OleControlSiteVtbl; host->IBindHost_iface.lpVtbl = &BindHostVtbl; + host->IServiceProvider_iface.lpVtbl = &ServiceProviderVtbl; host->ref = 1; diff --git a/dlls/mshtml/pluginhost.h b/dlls/mshtml/pluginhost.h index 2e87ea3498b..2b666965404 100644 --- a/dlls/mshtml/pluginhost.h +++ b/dlls/mshtml/pluginhost.h @@ -26,6 +26,7 @@ typedef struct { IOleInPlaceSiteEx IOleInPlaceSiteEx_iface; IOleControlSite IOleControlSite_iface; IBindHost IBindHost_iface; + IServiceProvider IServiceProvider_iface; LONG ref; diff --git a/dlls/mshtml/tests/activex.c b/dlls/mshtml/tests/activex.c index 51a6b84fe15..9984ae0e6d9 100644 --- a/dlls/mshtml/tests/activex.c +++ b/dlls/mshtml/tests/activex.c @@ -98,6 +98,7 @@ static const REFIID pluginhost_iids[] = { &IID_IOleInPlaceSiteEx, &IID_IOleControlSite, &IID_IBindHost, + &IID_IServiceProvider, NULL }; -- 2.11.4.GIT