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
35 #include "wine/debug.h"
37 #include "mshtml_private.h"
39 WINE_DEFAULT_DEBUG_CHANNEL(mshtml
);
41 /**********************************************************
42 * IServiceProvider impementation
45 #define SERVPROV_THIS(iface) (HTMLDocument*)((BYTE*)(iface)-offsetof(HTMLDocument,lpServiceProviderVtbl))
47 static HRESULT WINAPI
ServiceProvider_QueryInterface(IServiceProvider
*iface
, REFIID riid
, void **ppv
)
49 HTMLDocument
*This
= SERVPROV_THIS(iface
);
50 return IHTMLDocument2_QueryInterface(HTMLDOC(This
), riid
, ppv
);
53 static ULONG WINAPI
ServiceProvider_AddRef(IServiceProvider
*iface
)
55 HTMLDocument
*This
= SERVPROV_THIS(iface
);
56 return IHTMLDocument2_AddRef(HTMLDOC(This
));
59 static ULONG WINAPI
ServiceProvider_Release(IServiceProvider
*iface
)
61 HTMLDocument
*This
= SERVPROV_THIS(iface
);
62 return IHTMLDocument_Release(HTMLDOC(This
));
65 static HRESULT WINAPI
ServiceProvider_QueryService(IServiceProvider
*iface
, REFGUID guidService
,
66 REFIID riid
, void **ppv
)
68 HTMLDocument
*This
= SERVPROV_THIS(iface
);
71 * IE queries for service {3050f84b-98b5-11cf-bb82-00aa00bdce0b}.
72 * Its interface has the same IID and HTMLDocument also implements this
73 * interface. I conldn't find that interface is it.
76 FIXME("(%p)->(%s %s %p)\n", This
, debugstr_guid(guidService
), debugstr_guid(riid
), ppv
);
81 static const IServiceProviderVtbl ServiceProviderVtbl
= {
82 ServiceProvider_QueryInterface
,
83 ServiceProvider_AddRef
,
84 ServiceProvider_Release
,
85 ServiceProvider_QueryService
88 void HTMLDocument_Service_Init(HTMLDocument
*This
)
90 This
->lpServiceProviderVtbl
= &ServiceProviderVtbl
;