ntdll: Validate blocks in the heap pending free request list.
[wine.git] / dlls / wpc / wpc.c
blobbf63d4c22e9866532ffca781c076277484ed15a8
1 /*
2 * Copyright 2016 Jacek Caban for CodeWeavers
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 #define COBJMACROS
21 #include "initguid.h"
22 #include "wpcapi.h"
23 #include "rpcproxy.h"
25 #include "wine/debug.h"
27 WINE_DEFAULT_DEBUG_CHANNEL(wpc);
29 static HRESULT WINAPI WindowsParentalControls_QueryInterface(IWindowsParentalControls *iface, REFIID riid, void **ppv)
31 if(IsEqualGUID(riid, &IID_IUnknown)) {
32 TRACE("(IID_IUnknown %p)\n", ppv);
33 *ppv = iface;
34 }else if(IsEqualGUID(riid, &IID_IWindowsParentalControlsCore)) {
35 TRACE("(IID_IWindowsParentalControlsCore %p)\n", ppv);
36 *ppv = iface;
37 }else if(IsEqualGUID(riid, &IID_IWindowsParentalControls)) {
38 TRACE("(IID_IWindowsParentalControls %p)\n", ppv);
39 *ppv = iface;
40 }else {
41 FIXME("unsupported iface %s\n", debugstr_guid(riid));
42 *ppv = NULL;
43 return E_NOINTERFACE;
46 IUnknown_AddRef((IUnknown*)*ppv);
47 return S_OK;
50 static ULONG WINAPI WindowsParentalControls_AddRef(IWindowsParentalControls *iface)
52 return 2;
55 static ULONG WINAPI WindowsParentalControls_Release(IWindowsParentalControls *iface)
57 return 1;
60 static HRESULT WINAPI WindowsParentalControls_GetVisibility(IWindowsParentalControls *iface, WPCFLAG_VISIBILITY *visibility)
62 FIXME("(%p)\n", visibility);
63 return E_NOTIMPL;
66 static HRESULT WINAPI WindowsParentalControls_GetUserSettings(IWindowsParentalControls *iface, const WCHAR *sid, IWPCSettings **settings)
68 FIXME("(%s %p)\n", debugstr_w(sid), settings);
69 return E_NOTIMPL;
72 static HRESULT WINAPI WindowsParentalControls_GetWebSettings(IWindowsParentalControls *iface, const WCHAR *sid, IWPCWebSettings **settings)
74 FIXME("(%s %p)\n", debugstr_w(sid), settings);
75 return E_NOTIMPL;
78 static HRESULT WINAPI WindowsParentalControls_GetWebFilterInfo(IWindowsParentalControls *iface, GUID *id, WCHAR **name)
80 FIXME("(%p %p)\n", id, name);
81 return E_NOTIMPL;
84 static HRESULT WINAPI WindowsParentalControls_GetGamesSettings(IWindowsParentalControls *iface, const WCHAR *sid, IWPCGamesSettings **settings)
86 FIXME("(%s %p)\n", debugstr_w(sid), settings);
87 return E_NOTIMPL;
90 static const IWindowsParentalControlsVtbl WindowsParentalControlsVtbl = {
91 WindowsParentalControls_QueryInterface,
92 WindowsParentalControls_AddRef,
93 WindowsParentalControls_Release,
94 WindowsParentalControls_GetVisibility,
95 WindowsParentalControls_GetUserSettings,
96 WindowsParentalControls_GetWebSettings,
97 WindowsParentalControls_GetWebFilterInfo,
98 WindowsParentalControls_GetGamesSettings
101 static HRESULT WINAPI WindowsParentalControls_CreateInstance(IClassFactory *iface, IUnknown *outer, REFIID riid, void **ppv)
103 static IWindowsParentalControls wpc = { &WindowsParentalControlsVtbl };
105 TRACE("(%p %s %p)\n", outer, debugstr_guid(riid), ppv);
107 return IWindowsParentalControls_QueryInterface(&wpc, riid, ppv);
110 static HRESULT WINAPI ClassFactory_QueryInterface(IClassFactory *iface, REFIID riid, void **ppv)
112 *ppv = NULL;
114 if(IsEqualGUID(&IID_IUnknown, riid)) {
115 TRACE("(%p)->(IID_IUnknown %p)\n", iface, ppv);
116 *ppv = iface;
117 }else if(IsEqualGUID(&IID_IClassFactory, riid)) {
118 TRACE("(%p)->(IID_IClassFactory %p)\n", iface, ppv);
119 *ppv = iface;
122 if(*ppv) {
123 IUnknown_AddRef((IUnknown*)*ppv);
124 return S_OK;
127 FIXME("(%p)->(%s %p)\n", iface, debugstr_guid(riid), ppv);
128 return E_NOINTERFACE;
131 static ULONG WINAPI ClassFactory_AddRef(IClassFactory *iface)
133 TRACE("(%p)\n", iface);
134 return 2;
137 static ULONG WINAPI ClassFactory_Release(IClassFactory *iface)
139 TRACE("(%p)\n", iface);
140 return 1;
143 static HRESULT WINAPI ClassFactory_LockServer(IClassFactory *iface, BOOL fLock)
145 TRACE("(%p)->(%x)\n", iface, fLock);
146 return S_OK;
149 static const IClassFactoryVtbl WPCFactoryVtbl = {
150 ClassFactory_QueryInterface,
151 ClassFactory_AddRef,
152 ClassFactory_Release,
153 WindowsParentalControls_CreateInstance,
154 ClassFactory_LockServer
157 static IClassFactory WPCFactory = { &WPCFactoryVtbl };
159 /***********************************************************************
160 * DllGetClassObject (wpc.@)
162 HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, void **ppv)
164 if(IsEqualGUID(&CLSID_WindowsParentalControls, rclsid)) {
165 TRACE("(CLSID_WindowsParentalControls %s %p)\n", debugstr_guid(riid), ppv);
166 return IClassFactory_QueryInterface(&WPCFactory, riid, ppv);
169 FIXME("Unknown object %s (iface %s)\n", debugstr_guid(rclsid), debugstr_guid(riid));
170 return CLASS_E_CLASSNOTAVAILABLE;