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

mshtml: Added PluginHost's IServiceProvider stub implementation.

parent 4479194e
...@@ -129,6 +129,9 @@ static HRESULT WINAPI PHClientSite_QueryInterface(IOleClientSite *iface, REFIID ...@@ -129,6 +129,9 @@ static HRESULT WINAPI PHClientSite_QueryInterface(IOleClientSite *iface, REFIID
}else if(IsEqualGUID(&IID_IBindHost, riid)) { }else if(IsEqualGUID(&IID_IBindHost, riid)) {
TRACE("(%p)->(IID_IBindHost %p)\n", This, ppv); TRACE("(%p)->(IID_IBindHost %p)\n", This, ppv);
*ppv = &This->IBindHost_iface; *ppv = &This->IBindHost_iface;
}else if(IsEqualGUID(&IID_IServiceProvider, riid)) {
TRACE("(%p)->(IID_IServiceProvider %p)\n", This, ppv);
*ppv = &This->IServiceProvider_iface;
}else { }else {
WARN("Unsupported interface %s\n", debugstr_guid(riid)); WARN("Unsupported interface %s\n", debugstr_guid(riid));
*ppv = NULL; *ppv = NULL;
...@@ -691,6 +694,43 @@ static const IBindHostVtbl BindHostVtbl = { ...@@ -691,6 +694,43 @@ static const IBindHostVtbl BindHostVtbl = {
PHBindHost_MonikerBindToObject 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) HRESULT create_plugin_host(IUnknown *unk, PluginHost **ret)
{ {
PluginHost *host; PluginHost *host;
...@@ -706,6 +746,7 @@ HRESULT create_plugin_host(IUnknown *unk, PluginHost **ret) ...@@ -706,6 +746,7 @@ HRESULT create_plugin_host(IUnknown *unk, PluginHost **ret)
host->IOleInPlaceSiteEx_iface.lpVtbl = &OleInPlaceSiteExVtbl; host->IOleInPlaceSiteEx_iface.lpVtbl = &OleInPlaceSiteExVtbl;
host->IOleControlSite_iface.lpVtbl = &OleControlSiteVtbl; host->IOleControlSite_iface.lpVtbl = &OleControlSiteVtbl;
host->IBindHost_iface.lpVtbl = &BindHostVtbl; host->IBindHost_iface.lpVtbl = &BindHostVtbl;
host->IServiceProvider_iface.lpVtbl = &ServiceProviderVtbl;
host->ref = 1; host->ref = 1;
......
...@@ -26,6 +26,7 @@ typedef struct { ...@@ -26,6 +26,7 @@ typedef struct {
IOleInPlaceSiteEx IOleInPlaceSiteEx_iface; IOleInPlaceSiteEx IOleInPlaceSiteEx_iface;
IOleControlSite IOleControlSite_iface; IOleControlSite IOleControlSite_iface;
IBindHost IBindHost_iface; IBindHost IBindHost_iface;
IServiceProvider IServiceProvider_iface;
LONG ref; LONG ref;
......
...@@ -98,6 +98,7 @@ static const REFIID pluginhost_iids[] = { ...@@ -98,6 +98,7 @@ static const REFIID pluginhost_iids[] = {
&IID_IOleInPlaceSiteEx, &IID_IOleInPlaceSiteEx,
&IID_IOleControlSite, &IID_IOleControlSite,
&IID_IBindHost, &IID_IBindHost,
&IID_IServiceProvider,
NULL NULL
}; };
......
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