2 * Copyright 2014 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
23 #include "oleacc_private.h"
25 #include "wine/debug.h"
27 WINE_DEFAULT_DEBUG_CHANNEL(oleacc
);
29 static HRESULT WINAPI
AccPropServices_QueryInterface(IAccPropServices
*iface
, REFIID riid
, void **ppv
)
31 if(IsEqualGUID(&IID_IUnknown
, riid
)) {
32 TRACE("(IID_IUnknown %p)\n", ppv
);
34 }else if(IsEqualGUID(&IID_IAccPropServices
, riid
)) {
35 TRACE("(IID_IAccPropServices %p)\n", ppv
);
38 FIXME("Unknown iface %s\n", debugstr_guid(riid
));
43 IUnknown_AddRef((IUnknown
*)*ppv
);
47 static ULONG WINAPI
AccPropServices_AddRef(IAccPropServices
*iface
)
52 static ULONG WINAPI
AccPropServices_Release(IAccPropServices
*iface
)
57 static HRESULT WINAPI
AccPropServices_SetPropValue(IAccPropServices
*iface
, const BYTE
*pIDString
,
58 DWORD dwIDStringLen
, MSAAPROPID idProp
, VARIANT var
)
60 FIXME("(%p %u %s %s)\n", pIDString
, dwIDStringLen
, debugstr_guid(&idProp
), debugstr_variant(&var
));
64 static HRESULT WINAPI
AccPropServices_SetPropServer(IAccPropServices
*iface
, const BYTE
*pIDString
,
65 DWORD dwIDStringLen
, const MSAAPROPID
*paProps
, int cProps
, IAccPropServer
*pServer
, AnnoScope AnnoScope
)
67 FIXME("(%p %u %p %d %p %u)\n", pIDString
, dwIDStringLen
, paProps
, cProps
, pServer
, AnnoScope
);
71 static HRESULT WINAPI
AccPropServices_ClearProps(IAccPropServices
*iface
, const BYTE
*pIDString
,
72 DWORD dwIDStringLen
, const MSAAPROPID
*paProps
, int cProps
)
74 FIXME("(%p %u %p %d)\n", pIDString
, dwIDStringLen
, paProps
, cProps
);
78 static HRESULT WINAPI
AccPropServices_SetHwndProp(IAccPropServices
*iface
, HWND hwnd
, DWORD idObject
,
79 DWORD idChild
, MSAAPROPID idProp
, VARIANT var
)
81 FIXME("(%p %u %u %s %s)\n", hwnd
, idObject
, idChild
, debugstr_guid(&idProp
), debugstr_variant(&var
));
85 static HRESULT WINAPI
AccPropServices_SetHwndPropStr(IAccPropServices
*iface
, HWND hwnd
, DWORD idObject
,
86 DWORD idChild
, MSAAPROPID idProp
, LPWSTR str
)
88 FIXME("(%p %u %u %s %s)\n", hwnd
, idObject
, idChild
, debugstr_guid(&idProp
), debugstr_w(str
));
92 static HRESULT WINAPI
AccPropServices_SetHwndPropServer(IAccPropServices
*iface
, HWND hwnd
, DWORD idObject
,
93 DWORD idChild
, const MSAAPROPID
*paProps
, int cProps
, IAccPropServer
*pServer
, AnnoScope AnnoScope
)
95 FIXME("(%p %u %u %p %d %p %u)\n", hwnd
, idObject
, idChild
, paProps
, cProps
, pServer
, AnnoScope
);
99 static HRESULT WINAPI
AccPropServices_ClearHwndProps(IAccPropServices
*iface
, HWND hwnd
, DWORD idObject
,
100 DWORD idChild
, const MSAAPROPID
*paProps
, int cProps
)
102 FIXME("(%p %u %u %p %d)\n", hwnd
, idObject
, idChild
, paProps
, cProps
);
106 static HRESULT WINAPI
AccPropServices_ComposeHwndIdentityString(IAccPropServices
*iface
, HWND hwnd
,
107 DWORD idObject
, DWORD idChild
, BYTE
**ppIDString
, DWORD
*pdwIDStringLen
)
109 FIXME("(%p %u %u %p %p)\n", hwnd
, idObject
, idChild
, ppIDString
, pdwIDStringLen
);
113 static HRESULT WINAPI
AccPropServices_DecomposeHwndIdentityString(IAccPropServices
*iface
, const BYTE
*pIDString
,
114 DWORD dwIDStringLen
, HWND
*phwnd
, DWORD
*pidObject
, DWORD
*pidChild
)
116 FIXME("(%p %u %p %p %p)\n", pIDString
, dwIDStringLen
, phwnd
, pidObject
, pidChild
);
120 static HRESULT WINAPI
AccPropServices_SetHmenuProp(IAccPropServices
*iface
, HMENU hmenu
, DWORD idChild
,
121 MSAAPROPID idProp
, VARIANT var
)
123 FIXME("(%p %u %s %s)\n", hmenu
, idChild
, debugstr_guid(&idProp
), debugstr_variant(&var
));
127 static HRESULT WINAPI
AccPropServices_SetHmenuPropStr(IAccPropServices
*iface
, HMENU hmenu
, DWORD idChild
,
128 MSAAPROPID idProp
, LPWSTR str
)
130 FIXME("(%p %u %s %s)\n", hmenu
, idChild
, debugstr_guid(&idProp
), debugstr_w(str
));
134 static HRESULT WINAPI
AccPropServices_SetHmenuPropServer(IAccPropServices
*iface
, HMENU hmenu
, DWORD idChild
,
135 const MSAAPROPID
*paProps
, int cProps
, IAccPropServer
*pServer
, AnnoScope AnnoScope
)
137 FIXME("(%p %u %p %d %p %u)\n", hmenu
, idChild
, paProps
, cProps
, pServer
, AnnoScope
);
141 static HRESULT WINAPI
AccPropServices_ClearHmenuProps(IAccPropServices
*iface
, HMENU hmenu
, DWORD idChild
,
142 const MSAAPROPID
*paProps
, int cProps
)
144 FIXME("(%p %u %p %d)\n", hmenu
, idChild
, paProps
, cProps
);
148 static HRESULT WINAPI
AccPropServices_ComposeHmenuIdentityString(IAccPropServices
*iface
, HMENU hmenu
, DWORD idChild
,
149 BYTE
**ppIDString
, DWORD
*pdwIDStringLen
)
151 FIXME("(%p %u %p %p)\n", hmenu
, idChild
, ppIDString
, pdwIDStringLen
);
155 static HRESULT WINAPI
AccPropServices_DecomposeHmenuIdentityString(IAccPropServices
*iface
, const BYTE
*pIDString
,
156 DWORD dwIDStringLen
, HMENU
*phmenu
, DWORD
*pidChild
)
158 FIXME("(%p %u %p %p\n", pIDString
, dwIDStringLen
, phmenu
, pidChild
);
162 static const IAccPropServicesVtbl AccPropServicesVtbl
= {
163 AccPropServices_QueryInterface
,
164 AccPropServices_AddRef
,
165 AccPropServices_Release
,
166 AccPropServices_SetPropValue
,
167 AccPropServices_SetPropServer
,
168 AccPropServices_ClearProps
,
169 AccPropServices_SetHwndProp
,
170 AccPropServices_SetHwndPropStr
,
171 AccPropServices_SetHwndPropServer
,
172 AccPropServices_ClearHwndProps
,
173 AccPropServices_ComposeHwndIdentityString
,
174 AccPropServices_DecomposeHwndIdentityString
,
175 AccPropServices_SetHmenuProp
,
176 AccPropServices_SetHmenuPropStr
,
177 AccPropServices_SetHmenuPropServer
,
178 AccPropServices_ClearHmenuProps
,
179 AccPropServices_ComposeHmenuIdentityString
,
180 AccPropServices_DecomposeHmenuIdentityString
183 static IAccPropServices AccPropServices
= { &AccPropServicesVtbl
};
185 static HRESULT WINAPI
ClassFactory_QueryInterface(IClassFactory
*iface
, REFIID riid
, void **ppv
)
189 if(IsEqualGUID(&IID_IUnknown
, riid
)) {
190 TRACE("(%p)->(IID_IUnknown %p)\n", iface
, ppv
);
192 }else if(IsEqualGUID(&IID_IClassFactory
, riid
)) {
193 TRACE("(%p)->(IID_IClassFactory %p)\n", iface
, ppv
);
198 IUnknown_AddRef((IUnknown
*)*ppv
);
202 FIXME("(%p)->(%s %p)\n", iface
, debugstr_guid(riid
), ppv
);
203 return E_NOINTERFACE
;
206 static ULONG WINAPI
ClassFactory_AddRef(IClassFactory
*iface
)
208 TRACE("(%p)\n", iface
);
212 static ULONG WINAPI
ClassFactory_Release(IClassFactory
*iface
)
214 TRACE("(%p)\n", iface
);
218 static HRESULT WINAPI
ClassFactory_LockServer(IClassFactory
*iface
, BOOL fLock
)
220 TRACE("(%p)->(%x)\n", iface
, fLock
);
224 static HRESULT WINAPI
CAccPropServices_CreateInstance(IClassFactory
*iface
, IUnknown
*outer
,
225 REFIID riid
, void **ppv
)
227 TRACE("(%p %s %p)\n", outer
, debugstr_guid(riid
), ppv
);
231 return CLASS_E_NOAGGREGATION
;
234 return IAccPropServices_QueryInterface(&AccPropServices
, riid
, ppv
);
237 static const IClassFactoryVtbl CAccPropServicesFactoryVtbl
= {
238 ClassFactory_QueryInterface
,
240 ClassFactory_Release
,
241 CAccPropServices_CreateInstance
,
242 ClassFactory_LockServer
245 static IClassFactory CAccPropServicesFactory
= { &CAccPropServicesFactoryVtbl
};
247 HRESULT
get_accpropservices_factory(REFIID riid
, void **ppv
)
249 return IClassFactory_QueryInterface(&CAccPropServicesFactory
, riid
, ppv
);