winefile: Add a Portuguese translation (contributed by Americo Jose Melo).
[wine/hacks.git] / dlls / mshtml / service.c
blobce4dc2e61f08f3ccd9daa07236d5ef2fa78e5072
1 /*
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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 #include "config.h"
21 #include <stdarg.h>
22 #include <stdio.h>
24 #define COBJMACROS
26 #include "windef.h"
27 #include "winbase.h"
28 #include "winuser.h"
29 #include "ole2.h"
31 #include "wine/debug.h"
33 #include "mshtml_private.h"
35 WINE_DEFAULT_DEBUG_CHANNEL(mshtml);
37 /**********************************************************
38 * IServiceProvider impementation
41 #define SERVPROV_THIS(iface) DEFINE_THIS(HTMLDocument, ServiceProvider, iface)
43 static HRESULT WINAPI ServiceProvider_QueryInterface(IServiceProvider *iface, REFIID riid, void **ppv)
45 HTMLDocument *This = SERVPROV_THIS(iface);
46 return IHTMLDocument2_QueryInterface(HTMLDOC(This), riid, ppv);
49 static ULONG WINAPI ServiceProvider_AddRef(IServiceProvider *iface)
51 HTMLDocument *This = SERVPROV_THIS(iface);
52 return IHTMLDocument2_AddRef(HTMLDOC(This));
55 static ULONG WINAPI ServiceProvider_Release(IServiceProvider *iface)
57 HTMLDocument *This = SERVPROV_THIS(iface);
58 return IHTMLDocument_Release(HTMLDOC(This));
61 static HRESULT WINAPI ServiceProvider_QueryService(IServiceProvider *iface, REFGUID guidService,
62 REFIID riid, void **ppv)
64 HTMLDocument *This = SERVPROV_THIS(iface);
66 /* See http://msdn.microsoft.com/workshop/browser/hosting/wbcustompart2.asp */
67 if(IsEqualGUID(&CLSID_CMarkup, guidService)) {
68 FIXME("(%p)->(CLSID_CMarkup %s %p)\n", This, debugstr_guid(riid), ppv);
69 return E_NOINTERFACE;
72 FIXME("(%p)->(%s %s %p)\n", This, debugstr_guid(guidService), debugstr_guid(riid), ppv);
74 return E_UNEXPECTED;
77 static const IServiceProviderVtbl ServiceProviderVtbl = {
78 ServiceProvider_QueryInterface,
79 ServiceProvider_AddRef,
80 ServiceProvider_Release,
81 ServiceProvider_QueryService
84 void HTMLDocument_Service_Init(HTMLDocument *This)
86 This->lpServiceProviderVtbl = &ServiceProviderVtbl;