advapi32: Explicitly initialize nested array element.
[wine] / dlls / mshtml / service.c
1 /*
2  * Copyright 2005 Jacek Caban
3  *
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.
8  *
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.
13  *
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
17  */
18
19 #include "config.h"
20
21 #include <stdarg.h>
22 #include <stdio.h>
23
24 #define COBJMACROS
25
26 #include "windef.h"
27 #include "winbase.h"
28 #include "winuser.h"
29 #include "ole2.h"
30
31 #include "wine/debug.h"
32
33 #include "mshtml_private.h"
34
35 WINE_DEFAULT_DEBUG_CHANNEL(mshtml);
36
37 /**********************************************************
38  * IServiceProvider impementation
39  */
40
41 #define SERVPROV_THIS(iface) DEFINE_THIS(HTMLDocument, ServiceProvider, iface)
42
43 static HRESULT WINAPI ServiceProvider_QueryInterface(IServiceProvider *iface, REFIID riid, void **ppv)
44 {
45     HTMLDocument *This = SERVPROV_THIS(iface);
46     return IHTMLDocument2_QueryInterface(HTMLDOC(This), riid, ppv);
47 }
48
49 static ULONG WINAPI ServiceProvider_AddRef(IServiceProvider *iface)
50 {
51     HTMLDocument *This = SERVPROV_THIS(iface);
52     return IHTMLDocument2_AddRef(HTMLDOC(This));
53 }
54
55 static ULONG WINAPI ServiceProvider_Release(IServiceProvider *iface)
56 {
57     HTMLDocument *This = SERVPROV_THIS(iface);
58     return IHTMLDocument_Release(HTMLDOC(This));
59 }
60
61 static HRESULT WINAPI ServiceProvider_QueryService(IServiceProvider *iface, REFGUID guidService,
62         REFIID riid, void **ppv)
63 {
64     HTMLDocument *This = SERVPROV_THIS(iface);
65     
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;
70     }
71
72     FIXME("(%p)->(%s %s %p)\n", This, debugstr_guid(guidService), debugstr_guid(riid), ppv);
73     
74     return E_UNEXPECTED;
75 }
76
77 static const IServiceProviderVtbl ServiceProviderVtbl = {
78     ServiceProvider_QueryInterface,
79     ServiceProvider_AddRef,
80     ServiceProvider_Release,
81     ServiceProvider_QueryService
82 };
83
84 void HTMLDocument_Service_Init(HTMLDocument *This)
85 {
86     This->lpServiceProviderVtbl = &ServiceProviderVtbl;
87 }