2 * Copyright 2005 Jacek Caban
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
34 #include "wine/debug.h"
36 #include "mshtml_private.h"
38 WINE_DEFAULT_DEBUG_CHANNEL(mshtml);
40 /**********************************************************
41 * IServiceProvider impementation
44 #define SERVPROV_THIS(iface) (HTMLDocument*)((BYTE*)(iface)-offsetof(HTMLDocument,lpServiceProviderVtbl))
46 static HRESULT WINAPI ServiceProvider_QueryInterface(IServiceProvider *iface, REFIID riid, void **ppv)
48 HTMLDocument *This = SERVPROV_THIS(iface);
49 return IHTMLDocument2_QueryInterface(HTMLDOC(This), riid, ppv);
52 static ULONG WINAPI ServiceProvider_AddRef(IServiceProvider *iface)
54 HTMLDocument *This = SERVPROV_THIS(iface);
55 return IHTMLDocument2_AddRef(HTMLDOC(This));
58 static ULONG WINAPI ServiceProvider_Release(IServiceProvider *iface)
60 HTMLDocument *This = SERVPROV_THIS(iface);
61 return IHTMLDocument_Release(HTMLDOC(This));
64 static HRESULT WINAPI ServiceProvider_QueryService(IServiceProvider *iface, REFGUID guidService,
65 REFIID riid, void **ppv)
67 HTMLDocument *This = SERVPROV_THIS(iface);
70 * IE queries for service {3050f84b-98b5-11cf-bb82-00aa00bdce0b}.
71 * Its interface has the same IID and HTMLDocument also implements this
72 * interface. I conldn't find that interface is it.
75 FIXME("(%p)->(%s %s %p)\n", This, debugstr_guid(guidService), debugstr_guid(riid), ppv);
80 static const IServiceProviderVtbl ServiceProviderVtbl = {
81 ServiceProvider_QueryInterface,
82 ServiceProvider_AddRef,
83 ServiceProvider_Release,
84 ServiceProvider_QueryService
87 void HTMLDocument_Service_Init(HTMLDocument *This)
89 This->lpServiceProviderVtbl = &ServiceProviderVtbl;