ReactOS  0.4.15-dev-1171-gab82533
propservice.c
Go to the documentation of this file.
1 /*
2  * Copyright 2014 Jacek Caban for CodeWeavers
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 #define COBJMACROS
20 
21 #include <stdarg.h>
22 
23 #include "oleacc_private.h"
24 
25 #include "wine/debug.h"
26 
28 
30 {
32  TRACE("(IID_IUnknown %p)\n", ppv);
33  *ppv = iface;
34  }else if(IsEqualGUID(&IID_IAccPropServices, riid)) {
35  TRACE("(IID_IAccPropServices %p)\n", ppv);
36  *ppv = iface;
37  }else {
38  FIXME("Unknown iface %s\n", debugstr_guid(riid));
39  *ppv = NULL;
40  return E_NOINTERFACE;
41  }
42 
43  IUnknown_AddRef((IUnknown*)*ppv);
44  return S_OK;
45 }
46 
48 {
49  return 2;
50 }
51 
53 {
54  return 1;
55 }
56 
58  DWORD dwIDStringLen, MSAAPROPID idProp, VARIANT var)
59 {
60  FIXME("(%p %u %s %s)\n", pIDString, dwIDStringLen, debugstr_guid(&idProp), debugstr_variant(&var));
61  return E_NOTIMPL;
62 }
63 
65  DWORD dwIDStringLen, const MSAAPROPID *paProps, int cProps, IAccPropServer *pServer, AnnoScope AnnoScope)
66 {
67  FIXME("(%p %u %p %d %p %u)\n", pIDString, dwIDStringLen, paProps, cProps, pServer, AnnoScope);
68  return E_NOTIMPL;
69 }
70 
72  DWORD dwIDStringLen, const MSAAPROPID *paProps, int cProps)
73 {
74  FIXME("(%p %u %p %d)\n", pIDString, dwIDStringLen, paProps, cProps);
75  return E_NOTIMPL;
76 }
77 
79  DWORD idChild, MSAAPROPID idProp, VARIANT var)
80 {
81  FIXME("(%p %u %u %s %s)\n", hwnd, idObject, idChild, debugstr_guid(&idProp), debugstr_variant(&var));
82  return E_NOTIMPL;
83 }
84 
86  DWORD idChild, MSAAPROPID idProp, LPWSTR str)
87 {
88  FIXME("(%p %u %u %s %s)\n", hwnd, idObject, idChild, debugstr_guid(&idProp), debugstr_w(str));
89  return E_NOTIMPL;
90 }
91 
93  DWORD idChild, const MSAAPROPID *paProps, int cProps, IAccPropServer *pServer, AnnoScope AnnoScope)
94 {
95  FIXME("(%p %u %u %p %d %p %u)\n", hwnd, idObject, idChild, paProps, cProps, pServer, AnnoScope);
96  return E_NOTIMPL;
97 }
98 
100  DWORD idChild, const MSAAPROPID *paProps, int cProps)
101 {
102  FIXME("(%p %u %u %p %d)\n", hwnd, idObject, idChild, paProps, cProps);
103  return E_NOTIMPL;
104 }
105 
107  DWORD idObject, DWORD idChild, BYTE **ppIDString, DWORD *pdwIDStringLen)
108 {
109  FIXME("(%p %u %u %p %p)\n", hwnd, idObject, idChild, ppIDString, pdwIDStringLen);
110  return E_NOTIMPL;
111 }
112 
114  DWORD dwIDStringLen, HWND *phwnd, DWORD *pidObject, DWORD *pidChild)
115 {
116  FIXME("(%p %u %p %p %p)\n", pIDString, dwIDStringLen, phwnd, pidObject, pidChild);
117  return E_NOTIMPL;
118 }
119 
121  MSAAPROPID idProp, VARIANT var)
122 {
123  FIXME("(%p %u %s %s)\n", hmenu, idChild, debugstr_guid(&idProp), debugstr_variant(&var));
124  return E_NOTIMPL;
125 }
126 
128  MSAAPROPID idProp, LPWSTR str)
129 {
130  FIXME("(%p %u %s %s)\n", hmenu, idChild, debugstr_guid(&idProp), debugstr_w(str));
131  return E_NOTIMPL;
132 }
133 
135  const MSAAPROPID *paProps, int cProps, IAccPropServer *pServer, AnnoScope AnnoScope)
136 {
137  FIXME("(%p %u %p %d %p %u)\n", hmenu, idChild, paProps, cProps, pServer, AnnoScope);
138  return E_NOTIMPL;
139 }
140 
142  const MSAAPROPID *paProps, int cProps)
143 {
144  FIXME("(%p %u %p %d)\n", hmenu, idChild, paProps, cProps);
145  return E_NOTIMPL;
146 }
147 
149  BYTE **ppIDString, DWORD *pdwIDStringLen)
150 {
151  FIXME("(%p %u %p %p)\n", hmenu, idChild, ppIDString, pdwIDStringLen);
152  return E_NOTIMPL;
153 }
154 
156  DWORD dwIDStringLen, HMENU *phmenu, DWORD *pidChild)
157 {
158  FIXME("(%p %u %p %p\n", pIDString, dwIDStringLen, phmenu, pidChild);
159  return E_NOTIMPL;
160 }
161 
162 static const IAccPropServicesVtbl AccPropServicesVtbl = {
181 };
182 
184 
186 {
187  *ppv = NULL;
188 
189  if(IsEqualGUID(&IID_IUnknown, riid)) {
190  TRACE("(%p)->(IID_IUnknown %p)\n", iface, ppv);
191  *ppv = iface;
192  }else if(IsEqualGUID(&IID_IClassFactory, riid)) {
193  TRACE("(%p)->(IID_IClassFactory %p)\n", iface, ppv);
194  *ppv = iface;
195  }
196 
197  if(*ppv) {
198  IUnknown_AddRef((IUnknown*)*ppv);
199  return S_OK;
200  }
201 
202  FIXME("(%p)->(%s %p)\n", iface, debugstr_guid(riid), ppv);
203  return E_NOINTERFACE;
204 }
205 
207 {
208  TRACE("(%p)\n", iface);
209  return 2;
210 }
211 
213 {
214  TRACE("(%p)\n", iface);
215  return 1;
216 }
217 
219 {
220  TRACE("(%p)->(%x)\n", iface, fLock);
221  return S_OK;
222 }
223 
225  REFIID riid, void **ppv)
226 {
227  TRACE("(%p %s %p)\n", outer, debugstr_guid(riid), ppv);
228 
229  if(outer) {
230  *ppv = NULL;
231  return CLASS_E_NOAGGREGATION;
232  }
233 
234  return IAccPropServices_QueryInterface(&AccPropServices, riid, ppv);
235 }
236 
237 static const IClassFactoryVtbl CAccPropServicesFactoryVtbl = {
243 };
244 
246 
248 {
249  return IClassFactory_QueryInterface(&CAccPropServicesFactory, riid, ppv);
250 }
const char * var
Definition: shader.c:5666
WINE_DEFAULT_DEBUG_CHANNEL(oleacc)
static HRESULT WINAPI AccPropServices_DecomposeHwndIdentityString(IAccPropServices *iface, const BYTE *pIDString, DWORD dwIDStringLen, HWND *phwnd, DWORD *pidObject, DWORD *pidChild)
Definition: propservice.c:113
const DOCKBAR PVOID HWND HWND * hwnd
Definition: tooldock.h:22
#define REFIID
Definition: guiddef.h:118
#define E_NOINTERFACE
Definition: winerror.h:2364
static HMENU hmenu
Definition: win.c:66
REFIID riid
Definition: precomp.h:44
static HRESULT WINAPI AccPropServices_ClearHmenuProps(IAccPropServices *iface, HMENU hmenu, DWORD idChild, const MSAAPROPID *paProps, int cProps)
Definition: propservice.c:141
static HRESULT WINAPI AccPropServices_SetHmenuPropServer(IAccPropServices *iface, HMENU hmenu, DWORD idChild, const MSAAPROPID *paProps, int cProps, IAccPropServer *pServer, AnnoScope AnnoScope)
Definition: propservice.c:134
REFIID LPVOID * ppv
Definition: atlbase.h:39
static ULONG WINAPI ClassFactory_AddRef(IClassFactory *iface)
Definition: propservice.c:206
static ULONG WINAPI AccPropServices_Release(IAccPropServices *iface)
Definition: propservice.c:52
AnnoScope
Definition: oleacc.idl:150
static IAccPropServices AccPropServices
Definition: propservice.c:183
static ULONG WINAPI AccPropServices_AddRef(IAccPropServices *iface)
Definition: propservice.c:47
static IClassFactory CAccPropServicesFactory
Definition: propservice.c:245
static HRESULT WINAPI AccPropServices_QueryInterface(IAccPropServices *iface, REFIID riid, void **ppv)
Definition: propservice.c:29
static HRESULT WINAPI AccPropServices_SetHmenuProp(IAccPropServices *iface, HMENU hmenu, DWORD idChild, MSAAPROPID idProp, VARIANT var)
Definition: propservice.c:120
static HRESULT WINAPI AccPropServices_ClearHwndProps(IAccPropServices *iface, HWND hwnd, DWORD idObject, DWORD idChild, const MSAAPROPID *paProps, int cProps)
Definition: propservice.c:99
HRESULT get_accpropservices_factory(REFIID riid, void **ppv)
Definition: propservice.c:247
unsigned int BOOL
Definition: ntddk_ex.h:94
#define debugstr_w
Definition: kernel32.h:32
static HRESULT WINAPI AccPropServices_ComposeHmenuIdentityString(IAccPropServices *iface, HMENU hmenu, DWORD idChild, BYTE **ppIDString, DWORD *pdwIDStringLen)
Definition: propservice.c:148
#define FIXME(fmt,...)
Definition: debug.h:111
static ULONG WINAPI ClassFactory_Release(IClassFactory *iface)
Definition: propservice.c:212
const WCHAR * str
smooth NULL
Definition: ftsmooth.c:416
static HRESULT WINAPI AccPropServices_SetHmenuPropStr(IAccPropServices *iface, HMENU hmenu, DWORD idChild, MSAAPROPID idProp, LPWSTR str)
Definition: propservice.c:127
#define debugstr_guid
Definition: kernel32.h:35
static HRESULT WINAPI AccPropServices_SetHwndPropStr(IAccPropServices *iface, HWND hwnd, DWORD idObject, DWORD idChild, MSAAPROPID idProp, LPWSTR str)
Definition: propservice.c:85
static HRESULT WINAPI AccPropServices_DecomposeHmenuIdentityString(IAccPropServices *iface, const BYTE *pIDString, DWORD dwIDStringLen, HMENU *phmenu, DWORD *pidChild)
Definition: propservice.c:155
static HRESULT WINAPI AccPropServices_SetPropServer(IAccPropServices *iface, const BYTE *pIDString, DWORD dwIDStringLen, const MSAAPROPID *paProps, int cProps, IAccPropServer *pServer, AnnoScope AnnoScope)
Definition: propservice.c:64
static HRESULT WINAPI AccPropServices_ClearProps(IAccPropServices *iface, const BYTE *pIDString, DWORD dwIDStringLen, const MSAAPROPID *paProps, int cProps)
Definition: propservice.c:71
static HRESULT WINAPI ClassFactory_QueryInterface(IClassFactory *iface, REFIID riid, void **ppv)
Definition: propservice.c:185
static HRESULT WINAPI AccPropServices_ComposeHwndIdentityString(IAccPropServices *iface, HWND hwnd, DWORD idObject, DWORD idChild, BYTE **ppIDString, DWORD *pdwIDStringLen)
Definition: propservice.c:106
#define TRACE(s)
Definition: solgame.cpp:4
static const IAccPropServicesVtbl AccPropServicesVtbl
Definition: propservice.c:162
LONG HRESULT
Definition: typedefs.h:79
const GUID IID_IUnknown
#define WINAPI
Definition: msvc.h:6
static HRESULT WINAPI AccPropServices_SetPropValue(IAccPropServices *iface, const BYTE *pIDString, DWORD dwIDStringLen, MSAAPROPID idProp, VARIANT var)
Definition: propservice.c:57
static HRESULT WINAPI ClassFactory_LockServer(IClassFactory *iface, BOOL fLock)
Definition: propservice.c:218
unsigned long DWORD
Definition: ntddk_ex.h:95
static const IClassFactoryVtbl CAccPropServicesFactoryVtbl
Definition: propservice.c:237
#define CLASS_E_NOAGGREGATION
Definition: winerror.h:2662
unsigned char BYTE
Definition: xxhash.c:193
static HRESULT WINAPI AccPropServices_SetHwndProp(IAccPropServices *iface, HWND hwnd, DWORD idObject, DWORD idChild, MSAAPROPID idProp, VARIANT var)
Definition: propservice.c:78
static const char * debugstr_variant(const VARIANT *var)
Definition: container.c:46
#define S_OK
Definition: intsafe.h:51
#define E_NOTIMPL
Definition: ddrawi.h:99
static HRESULT WINAPI CAccPropServices_CreateInstance(IClassFactory *iface, IUnknown *outer, REFIID riid, void **ppv)
Definition: propservice.c:224
BOOL WINAPI IsEqualGUID(REFGUID rguid1, REFGUID rguid2)
Definition: compobj.c:4112
unsigned int ULONG
Definition: retypes.h:1
WCHAR * LPWSTR
Definition: xmlstorage.h:184
const GUID IID_IClassFactory
static HRESULT WINAPI AccPropServices_SetHwndPropServer(IAccPropServices *iface, HWND hwnd, DWORD idObject, DWORD idChild, const MSAAPROPID *paProps, int cProps, IAccPropServer *pServer, AnnoScope AnnoScope)
Definition: propservice.c:92
STATE_SYSTEM_HASPOPUP typedef GUID MSAAPROPID
Definition: oleacc.idl:145
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
Definition: ordinal.c:60