ReactOS 0.4.16-dev-122-g325d74c
main.c
Go to the documentation of this file.
1/*
2 * Implementation of the OLEACC dll
3 *
4 * Copyright 2003 Mike McCormack for CodeWeavers
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
10 *
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 */
20
21#define COBJMACROS
22
23#include <stdarg.h>
24#include "windef.h"
25#include "winbase.h"
26#include "ole2.h"
27#include "commctrl.h"
28#include "rpcproxy.h"
29
30#ifdef __REACTOS__
31#include <wchar.h>
32#include <winnls.h>
33#endif
34
35#include "initguid.h"
36#include "oleacc_private.h"
37#include "resource.h"
38
39#include "wine/debug.h"
40
42
43static const WCHAR lresult_atom_prefix[] = {'w','i','n','e','_','o','l','e','a','c','c',':'};
44
45static const WCHAR menuW[] = {'#','3','2','7','6','8',0};
46static const WCHAR desktopW[] = {'#','3','2','7','6','9',0};
47static const WCHAR dialogW[] = {'#','3','2','7','7','0',0};
48static const WCHAR winswitchW[] = {'#','3','2','7','7','1',0};
49static const WCHAR mdi_clientW[] = {'M','D','I','C','l','i','e','n','t',0};
50static const WCHAR richeditW[] = {'R','I','C','H','E','D','I','T',0};
51static const WCHAR richedit20aW[] = {'R','i','c','h','E','d','i','t','2','0','A',0};
52static const WCHAR richedit20wW[] = {'R','i','c','h','E','d','i','t','2','0','W',0};
53
54typedef HRESULT (WINAPI *accessible_create)(HWND, const IID*, void**);
55
57extern BOOL WINAPI OLEACC_DllMain(HINSTANCE, DWORD, void*) DECLSPEC_HIDDEN;
58extern HRESULT WINAPI OLEACC_DllRegisterServer(void) DECLSPEC_HIDDEN;
59extern HRESULT WINAPI OLEACC_DllUnregisterServer(void) DECLSPEC_HIDDEN;
60
61static struct {
62 const WCHAR *name;
63 DWORD idx;
64 accessible_create create_client;
67 {WC_LISTBOXW, 0x10000, NULL, NULL},
68 {menuW, 0x10001, NULL, NULL},
69 {WC_BUTTONW, 0x10002, NULL, NULL},
70 {WC_STATICW, 0x10003, NULL, NULL},
71 {WC_EDITW, 0x10004, NULL, NULL},
72 {WC_COMBOBOXW, 0x10005, NULL, NULL},
73 {dialogW, 0x10006, NULL, NULL},
74 {winswitchW, 0x10007, NULL, NULL},
75 {mdi_clientW, 0x10008, NULL, NULL},
76 {desktopW, 0x10009, NULL, NULL},
77 {WC_SCROLLBARW, 0x1000a, NULL, NULL},
78 {STATUSCLASSNAMEW, 0x1000b, NULL, NULL},
79 {TOOLBARCLASSNAMEW, 0x1000c, NULL, NULL},
80 {PROGRESS_CLASSW, 0x1000d, NULL, NULL},
81 {ANIMATE_CLASSW, 0x1000e, NULL, NULL},
82 {WC_TABCONTROLW, 0x1000f, NULL, NULL},
83 {HOTKEY_CLASSW, 0x10010, NULL, NULL},
84 {WC_HEADERW, 0x10011, NULL, NULL},
85 {TRACKBAR_CLASSW, 0x10012, NULL, NULL},
86 {WC_LISTVIEWW, 0x10013, NULL, NULL},
87 {UPDOWN_CLASSW, 0x10016, NULL, NULL},
88 {TOOLTIPS_CLASSW, 0x10018, NULL, NULL},
89 {WC_TREEVIEWW, 0x10019, NULL, NULL},
92 {WC_IPADDRESSW, 0, NULL, NULL},
93 {richeditW, 0x1001c, NULL, NULL},
94 {richedit20aW, 0, NULL, NULL},
95 {richedit20wW, 0, NULL, NULL},
96};
97
99
101{
102 switch(V_VT(v)) {
103 case VT_I4:
104 return V_I4(v);
105 default:
106 FIXME("unhandled child ID variant type: %d\n", V_VT(v));
107 return -1;
108 }
109}
110
112{
113 WCHAR class_name[64];
114 int i, idx;
115
116 if(!RealGetWindowClassW(hwnd, class_name, ARRAY_SIZE(class_name)))
117 return NULL;
118 TRACE("got window class: %s\n", debugstr_w(class_name));
119
120 for(i=0; i<ARRAY_SIZE(builtin_classes); i++) {
121 if(!wcsicmp(class_name, builtin_classes[i].name)) {
123
124 ret = (objid==OBJID_CLIENT ?
125 builtin_classes[i].create_client :
126 builtin_classes[i].create_window);
127 if(!ret)
128 FIXME("unhandled window class: %s\n", debugstr_w(class_name));
129 return ret;
130 }
131 }
132
133 idx = SendMessageW(hwnd, WM_GETOBJECT, 0, OBJID_QUERYCLASSNAMEIDX);
134 if(idx) {
135 for(i=0; i<ARRAY_SIZE(builtin_classes); i++) {
136 if(idx == builtin_classes[i].idx) {
138
139 ret = (objid==OBJID_CLIENT ?
140 builtin_classes[i].create_client :
141 builtin_classes[i].create_window);
142 if(!ret)
143 FIXME("unhandled class name idx: %x\n", idx);
144 return ret;
145 }
146 }
147
148 WARN("unhandled class name idx: %x\n", idx);
149 }
150
151 return NULL;
152}
153
155 REFIID riidInterface, void** ppvObject )
156{
158
159 TRACE("%p %d %s %p\n", hwnd, idObject,
160 debugstr_guid( riidInterface ), ppvObject );
161
162 switch(idObject) {
163 case OBJID_CLIENT:
165 if(create) return create(hwnd, riidInterface, ppvObject);
166 return create_client_object(hwnd, riidInterface, ppvObject);
167 case OBJID_WINDOW:
169 if(create) return create(hwnd, riidInterface, ppvObject);
170 return create_window_object(hwnd, riidInterface, ppvObject);
171 default:
172 FIXME("unhandled object id: %d\n", idObject);
173 return E_NOTIMPL;
174 }
175}
176
178{
179 WCHAR atom_str[ARRAY_SIZE(lresult_atom_prefix)+3*8+3];
180 HANDLE server_proc, server_mapping, mapping;
181 DWORD proc_id, size;
184 void *view;
185 HRESULT hr;
186 WCHAR *p;
187
188 TRACE("%ld %s %ld %p\n", result, debugstr_guid(riid), wParam, ppObject );
189
190 if(wParam)
191 FIXME("unsupported wParam = %lx\n", wParam);
192
193 if(!ppObject)
194 return E_INVALIDARG;
195 *ppObject = NULL;
196
197 if(result != (ATOM)result)
198 return E_FAIL;
199
200 if(!GlobalGetAtomNameW(result, atom_str, ARRAY_SIZE(atom_str)))
201 return E_FAIL;
202 if(memcmp(atom_str, lresult_atom_prefix, sizeof(lresult_atom_prefix)))
203 return E_FAIL;
204 p = atom_str + ARRAY_SIZE(lresult_atom_prefix);
205 proc_id = wcstoul(p, &p, 16);
206 if(*p != ':')
207 return E_FAIL;
208 server_mapping = ULongToHandle( wcstoul(p+1, &p, 16) );
209 if(*p != ':')
210 return E_FAIL;
211 size = wcstoul(p+1, &p, 16);
212 if(*p != 0)
213 return E_FAIL;
214
215 server_proc = OpenProcess(PROCESS_DUP_HANDLE, FALSE, proc_id);
216 if(!server_proc)
217 return E_FAIL;
218
219 if(!DuplicateHandle(server_proc, server_mapping, GetCurrentProcess(), &mapping,
221 return E_FAIL;
222 CloseHandle(server_proc);
224
227 if(!view)
228 return E_FAIL;
229
231 if(!data) {
233 return E_OUTOFMEMORY;
234 }
235 memcpy(data, view, size);
237
239 if(FAILED(hr)) {
241 return hr;
242 }
243
244 hr = CoUnmarshalInterface(stream, riid, ppObject);
245 IStream_Release(stream);
246 return hr;
247}
248
250{
251 static const WCHAR atom_fmt[] = {'%','0','8','x',':','%','0','8','x',':','%','0','8','x',0};
252 static const LARGE_INTEGER seek_zero = {{0}};
253
254 WCHAR atom_str[ARRAY_SIZE(lresult_atom_prefix)+3*8+3];
257 STATSTG stat;
258 HRESULT hr;
259 ATOM atom;
260 void *view;
261
262 TRACE("%s %ld %p\n", debugstr_guid(riid), wParam, pAcc);
263
264 if(wParam)
265 FIXME("unsupported wParam = %lx\n", wParam);
266
267 if(!pAcc)
268 return E_INVALIDARG;
269
271 if(FAILED(hr))
272 return hr;
273
274 hr = CoMarshalInterface(stream, riid, pAcc, MSHCTX_LOCAL, NULL, MSHLFLAGS_NORMAL);
275 if(FAILED(hr)) {
276 IStream_Release(stream);
277 return hr;
278 }
279
280 hr = IStream_Seek(stream, seek_zero, STREAM_SEEK_SET, NULL);
281 if(FAILED(hr)) {
282 IStream_Release(stream);
283 return hr;
284 }
285
286 hr = IStream_Stat(stream, &stat, STATFLAG_NONAME);
287 if(FAILED(hr)) {
289 IStream_Release(stream);
290 return hr;
291 }else if(stat.cbSize.u.HighPart) {
292 FIXME("stream size to big\n");
294 IStream_Release(stream);
295 return E_NOTIMPL;
296 }
297
299 stat.cbSize.u.HighPart, stat.cbSize.u.LowPart, NULL);
300 if(!mapping) {
302 IStream_Release(stream);
303 return hr;
304 }
305
307 if(!view) {
310 IStream_Release(stream);
311 return E_FAIL;
312 }
313
314 hr = IStream_Read(stream, view, stat.cbSize.u.LowPart, NULL);
316 if(FAILED(hr)) {
318 hr = IStream_Seek(stream, seek_zero, STREAM_SEEK_SET, NULL);
319 if(SUCCEEDED(hr))
321 IStream_Release(stream);
322 return hr;
323
324 }
325
328 HandleToUlong(mapping), stat.cbSize.u.LowPart);
329 atom = GlobalAddAtomW(atom_str);
330 if(!atom) {
332 hr = IStream_Seek(stream, seek_zero, STREAM_SEEK_SET, NULL);
333 if(SUCCEEDED(hr))
335 IStream_Release(stream);
336 return E_FAIL;
337 }
338
339 IStream_Release(stream);
340 return atom;
341}
342
344{
345 FIXME("{%d,%d} %p %p: stub\n", ptScreen.x, ptScreen.y, ppacc, pvarChild );
346 return E_NOTIMPL;
347}
348
350 REFIID riid, void** ppvObject )
351{
352 TRACE("%p %d %s %p\n", hwnd, dwObjectID,
354
355 if(!ppvObject)
356 return E_INVALIDARG;
357 *ppvObject = NULL;
358
359 if(IsWindow(hwnd)) {
360 LRESULT lres;
361
362 lres = SendMessageW(hwnd, WM_GETOBJECT, 0xffffffff, dwObjectID);
363 if(FAILED(lres))
364 return lres;
365 else if(lres)
366 return ObjectFromLresult(lres, riid, 0, ppvObject);
367 }
368
369 return CreateStdAccessibleObject(hwnd, dwObjectID, riid, ppvObject);
370}
371
373{
375 IOleWindow *ow;
377
378 TRACE("%p %p\n", acc, phwnd);
379
380 IAccessible_AddRef(acc);
381 while(1) {
382 hres = IAccessible_QueryInterface(acc, &IID_IOleWindow, (void**)&ow);
383 if(SUCCEEDED(hres)) {
384 hres = IOleWindow_GetWindow(ow, phwnd);
385 IOleWindow_Release(ow);
386 IAccessible_Release(acc);
387 return hres;
388 }
389
390 hres = IAccessible_get_accParent(acc, &parent);
391 IAccessible_Release(acc);
392 if(FAILED(hres))
393 return hres;
394 if(hres!=S_OK || !parent) {
395 *phwnd = NULL;
396 return hres;
397 }
398
399 hres = IDispatch_QueryInterface(parent, &IID_IAccessible, (void**)&acc);
400 IDispatch_Release(parent);
401 if(FAILED(hres))
402 return hres;
403 }
404}
405
406BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason,
408{
409 TRACE("%p, %d, %p\n", hinstDLL, fdwReason, lpvReserved);
410
411 switch (fdwReason)
412 {
414 oleacc_handle = hinstDLL;
416 break;
417 }
418
419 return OLEACC_DllMain(hinstDLL, fdwReason, lpvReserved);
420}
421
423{
424 return OLEACC_DllRegisterServer();
425}
426
428{
429 return OLEACC_DllUnregisterServer();
430}
431
433{
434 if(IsEqualGUID(&CLSID_CAccPropServices, rclsid)) {
435 TRACE("(CLSID_CAccPropServices %s %p)\n", debugstr_guid(iid), ppv);
436 return get_accpropservices_factory(iid, ppv);
437 }
438
439 if(IsEqualGUID(&CLSID_PSFactoryBuffer, rclsid)) {
440 TRACE("(CLSID_PSFactoryBuffer %s %p)\n", debugstr_guid(iid), ppv);
441 return OLEACC_DllGetClassObject(rclsid, iid, ppv);
442 }
443
444 FIXME("%s %s %p: stub\n", debugstr_guid(rclsid), debugstr_guid(iid), ppv);
445 return E_NOTIMPL;
446}
447
448void WINAPI GetOleaccVersionInfo(DWORD* pVersion, DWORD* pBuild)
449{
450#ifdef __REACTOS__
451 *pVersion = MAKELONG(2,4); /* Windows XP version of oleacc: 4.2.5406.0 */
452 *pBuild = MAKELONG(0,5406);
453#else
454 *pVersion = MAKELONG(0,7); /* Windows 7 version of oleacc: 7.0.0.0 */
455 *pBuild = MAKELONG(0,0);
456#endif
457}
458
460{
461 DWORD proc_id;
462
463 TRACE("%p\n", hwnd);
464
465 if(!GetWindowThreadProcessId(hwnd, &proc_id))
466 return NULL;
469}
470
471UINT WINAPI GetRoleTextW(DWORD role, LPWSTR lpRole, UINT rolemax)
472{
473 INT ret;
474 WCHAR *resptr;
475
476 TRACE("%u %p %u\n", role, lpRole, rolemax);
477
478 /* return role text length */
479 if(!lpRole)
480 return LoadStringW(oleacc_handle, role, (LPWSTR)&resptr, 0);
481
482 ret = LoadStringW(oleacc_handle, role, lpRole, rolemax);
483 if(!(ret > 0)){
484 if(rolemax > 0) lpRole[0] = '\0';
485 return 0;
486 }
487
488 return ret;
489}
490
491UINT WINAPI GetRoleTextA(DWORD role, LPSTR lpRole, UINT rolemax)
492{
493 UINT length;
494 WCHAR *roletextW;
495
496 TRACE("%u %p %u\n", role, lpRole, rolemax);
497
498 if(lpRole && !rolemax)
499 return 0;
500
501 length = GetRoleTextW(role, NULL, 0);
502 if(!length) {
503 if(lpRole && rolemax)
504 lpRole[0] = 0;
505 return 0;
506 }
507
508 roletextW = HeapAlloc(GetProcessHeap(), 0, (length + 1)*sizeof(WCHAR));
509 if(!roletextW)
510 return 0;
511
512 GetRoleTextW(role, roletextW, length + 1);
513
514 length = WideCharToMultiByte( CP_ACP, 0, roletextW, -1, NULL, 0, NULL, NULL );
515
516 if(!lpRole){
517 HeapFree(GetProcessHeap(), 0, roletextW);
518 return length - 1;
519 }
520
521 if(rolemax < length) {
522 HeapFree(GetProcessHeap(), 0, roletextW);
523 lpRole[0] = 0;
524 return 0;
525 }
526
527 WideCharToMultiByte( CP_ACP, 0, roletextW, -1, lpRole, rolemax, NULL, NULL );
528
529 if(rolemax < length){
530 lpRole[rolemax-1] = '\0';
531 length = rolemax;
532 }
533
534 HeapFree(GetProcessHeap(), 0, roletextW);
535
536 return length - 1;
537}
538
539UINT WINAPI GetStateTextW(DWORD state_bit, WCHAR *state_str, UINT state_str_len)
540{
541 DWORD state_id;
542
543 TRACE("%x %p %u\n", state_bit, state_str, state_str_len);
544
545 if(state_bit & ~(STATE_SYSTEM_VALID | STATE_SYSTEM_HASPOPUP)) {
546 if(state_str && state_str_len)
547 state_str[0] = 0;
548 return 0;
549 }
550
551 state_id = IDS_STATE_NORMAL;
552 while(state_bit) {
553 state_id++;
554 state_bit /= 2;
555 }
556
557 if(state_str) {
558 UINT ret = LoadStringW(oleacc_handle, state_id, state_str, state_str_len);
559 if(!ret && state_str_len)
560 state_str[0] = 0;
561 return ret;
562 }else {
563 WCHAR *tmp;
564 return LoadStringW(oleacc_handle, state_id, (WCHAR*)&tmp, 0);
565 }
566
567}
568
569UINT WINAPI GetStateTextA(DWORD state_bit, CHAR *state_str, UINT state_str_len)
570{
571 DWORD state_id;
572
573 TRACE("%x %p %u\n", state_bit, state_str, state_str_len);
574
575 if(state_str && !state_str_len)
576 return 0;
577
578 if(state_bit & ~(STATE_SYSTEM_VALID | STATE_SYSTEM_HASPOPUP)) {
579 if(state_str && state_str_len)
580 state_str[0] = 0;
581 return 0;
582 }
583
584 state_id = IDS_STATE_NORMAL;
585 while(state_bit) {
586 state_id++;
587 state_bit /= 2;
588 }
589
590 if(state_str) {
591 UINT ret = LoadStringA(oleacc_handle, state_id, state_str, state_str_len);
592 if(!ret && state_str_len)
593 state_str[0] = 0;
594 return ret;
595 }else {
596 CHAR tmp[256];
597 return LoadStringA(oleacc_handle, state_id, tmp, sizeof(tmp));
598 }
599}
600
602 LONG start, LONG count, VARIANT *children, LONG *children_cnt)
603{
604 IEnumVARIANT *ev;
605 LONG i, child_no;
606 HRESULT hr;
607
608 TRACE("%p %d %d %p %p\n", container, start, count, children, children_cnt);
609
610 if(!container || !children || !children_cnt)
611 return E_INVALIDARG;
612
613 for(i=0; i<count; i++)
614 VariantInit(children+i);
615
616 hr = IAccessible_QueryInterface(container, &IID_IEnumVARIANT, (void**)&ev);
617 if(SUCCEEDED(hr)) {
618 hr = IEnumVARIANT_Reset(ev);
619 if(SUCCEEDED(hr))
620 hr = IEnumVARIANT_Skip(ev, start);
621 if(SUCCEEDED(hr))
622 hr = IEnumVARIANT_Next(ev, count, children, (ULONG*)children_cnt);
623 IEnumVARIANT_Release(ev);
624 return hr;
625 }
626
627 hr = IAccessible_get_accChildCount(container, &child_no);
628 if(FAILED(hr))
629 return hr;
630
631 for(i=0; i<count && start+i+1<=child_no; i++) {
632 IDispatch *disp;
633
634 V_VT(children+i) = VT_I4;
635 V_I4(children+i) = start+i+1;
636
637 hr = IAccessible_get_accChild(container, children[i], &disp);
638 if(SUCCEEDED(hr) && disp) {
639 V_VT(children+i) = VT_DISPATCH;
640 V_DISPATCH(children+i) = disp;
641 }
642 }
643
644 *children_cnt = i;
645 return i==count ? S_OK : S_FALSE;
646}
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
Definition: utclib.c:112
#define stat
Definition: acwin.h:99
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
Definition: precomp.h:23
#define ARRAY_SIZE(A)
Definition: main.h:20
#define FIXME(fmt,...)
Definition: precomp.h:53
#define WARN(fmt,...)
Definition: precomp.h:61
#define HandleToUlong(h)
Definition: basetsd.h:79
#define ULongToHandle(h)
Definition: basetsd.h:81
WPARAM wParam
Definition: combotst.c:138
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define E_INVALIDARG
Definition: ddrawi.h:101
#define E_NOTIMPL
Definition: ddrawi.h:99
#define E_FAIL
Definition: ddrawi.h:102
WORD ATOM
Definition: dimm.idl:113
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved)
Definition: main.c:26
HRESULT WINAPI DllRegisterServer(void)
Definition: main.c:212
HRESULT WINAPI DllUnregisterServer(void)
Definition: main.c:220
HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
Definition: main.c:166
unsigned int idx
Definition: utils.c:41
#define DECLSPEC_HIDDEN
Definition: precomp.h:8
#define CloseHandle
Definition: compat.h:739
#define GetProcessHeap()
Definition: compat.h:736
#define DLL_PROCESS_ATTACH
Definition: compat.h:131
#define UnmapViewOfFile
Definition: compat.h:746
#define CP_ACP
Definition: compat.h:109
HANDLE HWND
Definition: compat.h:19
#define INVALID_HANDLE_VALUE
Definition: compat.h:731
#define HeapAlloc
Definition: compat.h:733
#define CreateFileMappingW(a, b, c, d, e, f)
Definition: compat.h:744
#define GetCurrentProcess()
Definition: compat.h:759
#define HeapFree(x, y, z)
Definition: compat.h:735
#define FILE_MAP_READ
Definition: compat.h:776
#define WideCharToMultiByte
Definition: compat.h:111
#define MapViewOfFile
Definition: compat.h:745
@ VT_I4
Definition: compat.h:2298
@ VT_DISPATCH
Definition: compat.h:2304
#define wcsicmp
Definition: compat.h:15
UINT WINAPI GlobalGetAtomNameW(ATOM nAtom, LPWSTR lpBuffer, int nSize)
Definition: atom.c:496
ATOM WINAPI GlobalDeleteAtom(ATOM nAtom)
Definition: atom.c:454
ATOM WINAPI GlobalAddAtomW(LPCWSTR lpString)
Definition: atom.c:444
BOOL WINAPI DuplicateHandle(IN HANDLE hSourceProcessHandle, IN HANDLE hSourceHandle, IN HANDLE hTargetProcessHandle, OUT LPHANDLE lpTargetHandle, IN DWORD dwDesiredAccess, IN BOOL bInheritHandle, IN DWORD dwOptions)
Definition: handle.c:149
BOOL WINAPI DisableThreadLibraryCalls(IN HMODULE hLibModule)
Definition: loader.c:85
HANDLE WINAPI OpenProcess(IN DWORD dwDesiredAccess, IN BOOL bInheritHandle, IN DWORD dwProcessId)
Definition: proc.c:1227
HRESULT WINAPI CreateStreamOnHGlobal(HGLOBAL hGlobal, BOOL fDeleteOnRelease, LPSTREAM *ppstm)
HRESULT WINAPI CoReleaseMarshalData(IStream *pStream)
Definition: marshal.c:2055
HRESULT WINAPI CoUnmarshalInterface(IStream *pStream, REFIID riid, LPVOID *ppv)
Definition: marshal.c:1981
HRESULT WINAPI CoMarshalInterface(IStream *pStream, REFIID riid, IUnknown *pUnk, DWORD dwDestContext, void *pvDestContext, DWORD mshlFlags)
Definition: marshal.c:1876
HRESULT create_client_object(HWND hwnd, const IID *iid, void **obj)
Definition: client.c:625
static HINSTANCE oleacc_handle
Definition: main.c:98
HRESULT WINAPI AccessibleObjectFromPoint(POINT ptScreen, IAccessible **ppacc, VARIANT *pvarChild)
Definition: main.c:343
static const WCHAR desktopW[]
Definition: main.c:46
HANDLE WINAPI GetProcessHandleFromHwnd(HWND hwnd)
Definition: main.c:459
LRESULT WINAPI LresultFromObject(REFIID riid, WPARAM wParam, LPUNKNOWN pAcc)
Definition: main.c:249
HRESULT WINAPI AccessibleObjectFromWindow(HWND hwnd, DWORD dwObjectID, REFIID riid, void **ppvObject)
Definition: main.c:349
void WINAPI GetOleaccVersionInfo(DWORD *pVersion, DWORD *pBuild)
Definition: main.c:448
static const WCHAR dialogW[]
Definition: main.c:47
HRESULT WINAPI ObjectFromLresult(LRESULT result, REFIID riid, WPARAM wParam, void **ppObject)
Definition: main.c:177
int convert_child_id(VARIANT *v)
Definition: main.c:100
UINT WINAPI GetStateTextW(DWORD state_bit, WCHAR *state_str, UINT state_str_len)
Definition: main.c:539
UINT WINAPI GetStateTextA(DWORD state_bit, CHAR *state_str, UINT state_str_len)
Definition: main.c:569
HRESULT WINAPI OLEACC_DllGetClassObject(REFCLSID, REFIID, void **)
Definition: main.c:56
HRESULT WINAPI AccessibleChildren(IAccessible *container, LONG start, LONG count, VARIANT *children, LONG *children_cnt)
Definition: main.c:601
HRESULT(WINAPI * accessible_create)(HWND, const IID *, void **)
Definition: main.c:54
builtin_classes[]
Definition: main.c:66
static const WCHAR winswitchW[]
Definition: main.c:48
static const WCHAR lresult_atom_prefix[]
Definition: main.c:43
UINT WINAPI GetRoleTextA(DWORD role, LPSTR lpRole, UINT rolemax)
Definition: main.c:491
HRESULT WINAPI WindowFromAccessibleObject(IAccessible *acc, HWND *phwnd)
Definition: main.c:372
static const WCHAR richeditW[]
Definition: main.c:50
static const WCHAR richedit20wW[]
Definition: main.c:52
static accessible_create get_builtin_accessible_obj(HWND hwnd, LONG objid)
Definition: main.c:111
HRESULT WINAPI CreateStdAccessibleObject(HWND hwnd, LONG idObject, REFIID riidInterface, void **ppvObject)
Definition: main.c:154
static const WCHAR menuW[]
Definition: main.c:45
static const WCHAR richedit20aW[]
Definition: main.c:51
UINT WINAPI GetRoleTextW(DWORD role, LPWSTR lpRole, UINT rolemax)
Definition: main.c:471
static const WCHAR mdi_clientW[]
Definition: main.c:49
#define IDS_STATE_NORMAL
Definition: resource.h:19
#define swprintf
Definition: precomp.h:40
r parent
Definition: btrfs.c:3010
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
GLuint start
Definition: gl.h:1545
const GLdouble * v
Definition: gl.h:2040
GLuint GLuint GLsizei count
Definition: gl.h:1545
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
GLsizeiptr size
Definition: glext.h:5919
GLuint GLsizei GLsizei * length
Definition: glext.h:6040
GLenum GLenum GLenum GLenum mapping
Definition: glext.h:9031
GLfloat GLfloat p
Definition: glext.h:8902
GLuint64EXT * result
Definition: glext.h:11304
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
HGLOBAL NTAPI GlobalFree(HGLOBAL hMem)
Definition: heapmem.c:611
HGLOBAL NTAPI GlobalAlloc(UINT uFlags, SIZE_T dwBytes)
Definition: heapmem.c:368
_Check_return_ unsigned long __cdecl wcstoul(_In_z_ const wchar_t *_Str, _Out_opt_ _Deref_post_z_ wchar_t **_EndPtr, _In_ int _Radix)
#define PROCESS_VM_READ
Definition: pstypes.h:162
#define PROCESS_VM_WRITE
Definition: pstypes.h:163
#define PROCESS_VM_OPERATION
Definition: pstypes.h:161
REFIID riid
Definition: atlbase.h:39
REFIID LPVOID * ppv
Definition: atlbase.h:39
#define PROCESS_DUP_HANDLE
#define S_OK
Definition: intsafe.h:52
#define SUCCEEDED(hr)
Definition: intsafe.h:50
#define FAILED(hr)
Definition: intsafe.h:51
#define debugstr_guid
Definition: kernel32.h:35
#define debugstr_w
Definition: kernel32.h:32
static IN DWORD IN LPVOID lpvReserved
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
static HWND create_window(void)
Definition: imagelist.c:159
HRESULT hres
Definition: protocol.c:465
static const struct access_res create[16]
Definition: package.c:7505
unsigned int UINT
Definition: ndis.h:50
static LPUNKNOWN
Definition: ndr_ole.c:49
#define SYNCHRONIZE
Definition: nt_native.h:61
#define PAGE_READWRITE
Definition: nt_native.h:1304
HRESULT create_window_object(HWND, const IID *, void **) DECLSPEC_HIDDEN
Definition: window.c:414
HRESULT get_accpropservices_factory(REFIID, void **) DECLSPEC_HIDDEN
Definition: propservice.c:247
#define V_VT(A)
Definition: oleauto.h:211
#define V_I4(A)
Definition: oleauto.h:247
#define V_DISPATCH(A)
Definition: oleauto.h:239
const GUID IID_IOleWindow
long LONG
Definition: pedump.c:60
#define WC_TABCONTROLW
Definition: commctrl.h:3940
#define UPDOWN_CLASSW
Definition: commctrl.h:2124
#define MONTHCAL_CLASSW
Definition: commctrl.h:4180
#define WC_BUTTONW
Definition: commctrl.h:4628
#define HOTKEY_CLASSW
Definition: commctrl.h:2241
#define PROGRESS_CLASSW
Definition: commctrl.h:2181
#define WC_LISTVIEWW
Definition: commctrl.h:2262
#define WC_EDITW
Definition: commctrl.h:4692
#define TOOLTIPS_CLASSW
Definition: commctrl.h:1707
#define TRACKBAR_CLASSW
Definition: commctrl.h:2016
#define STATUSCLASSNAMEW
Definition: commctrl.h:1941
#define ANIMATE_CLASSW
Definition: commctrl.h:4146
#define WC_HEADERW
Definition: commctrl.h:624
#define WC_IPADDRESSW
Definition: commctrl.h:4477
#define TOOLBARCLASSNAMEW
Definition: commctrl.h:943
#define WC_TREEVIEWW
Definition: commctrl.h:3248
#define DATETIMEPICK_CLASSW
Definition: commctrl.h:4327
#define WC_STATICW
Definition: commctrl.h:4685
#define WC_LISTBOXW
Definition: commctrl.h:4716
#define WC_SCROLLBARW
Definition: commctrl.h:4734
#define WC_COMBOBOXW
Definition: commctrl.h:4722
#define IsEqualGUID(rguid1, rguid2)
Definition: guiddef.h:147
#define REFIID
Definition: guiddef.h:118
#define REFCLSID
Definition: guiddef.h:117
HRESULT hr
Definition: shlfolder.c:183
#define TRACE(s)
Definition: solgame.cpp:4
Definition: name.c:39
Definition: stat.h:55
Definition: parse.h:23
long y
Definition: polytest.cpp:48
long x
Definition: polytest.cpp:48
int32_t INT
Definition: typedefs.h:58
#define MAKELONG(a, b)
Definition: typedefs.h:249
uint32_t ULONG
Definition: typedefs.h:59
void WINAPI VariantInit(VARIANTARG *pVarg)
Definition: variant.c:568
int ret
#define OBJID_CLIENT
Definition: winable.h:19
#define OBJID_WINDOW
Definition: winable.h:15
#define FILE_MAP_WRITE
Definition: winbase.h:154
DWORD WINAPI GetCurrentProcessId(void)
Definition: proc.c:1158
#define GMEM_FIXED
Definition: winbase.h:293
DWORD WINAPI GetWindowThreadProcessId(HWND hWnd, PDWORD lpdwProcessId)
_In_ void _In_ PCCERT_CONTEXT _In_opt_ LPFILETIME _In_ DWORD _In_ DWORD _Outptr_opt_ void ** ppvObject
Definition: wincrypt.h:6082
_In_ LONG _In_ HWND hwnd
Definition: winddi.h:4023
LONG_PTR LRESULT
Definition: windef.h:209
UINT_PTR WPARAM
Definition: windef.h:207
#define HRESULT
Definition: msvc.h:7
#define WINAPI
Definition: msvc.h:6
#define S_FALSE
Definition: winerror.h:2357
BOOL WINAPI IsWindow(_In_opt_ HWND)
int WINAPI LoadStringW(_In_opt_ HINSTANCE hInstance, _In_ UINT uID, _Out_writes_to_(cchBufferMax, return+1) LPWSTR lpBuffer, _In_ int cchBufferMax)
int WINAPI LoadStringA(_In_opt_ HINSTANCE hInstance, _In_ UINT uID, _Out_writes_to_(cchBufferMax, return+1) LPSTR lpBuffer, _In_ int cchBufferMax)
UINT WINAPI RealGetWindowClassW(_In_ HWND hwnd, _Out_writes_to_(cchClassNameMax, return) LPWSTR ptszClassName, _In_ UINT cchClassNameMax)
#define STATE_SYSTEM_VALID
Definition: winuser.h:2894
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define DUPLICATE_SAME_ACCESS
#define DUPLICATE_CLOSE_SOURCE
char * LPSTR
Definition: xmlstorage.h:182
__wchar_t WCHAR
Definition: xmlstorage.h:180
WCHAR * LPWSTR
Definition: xmlstorage.h:184
char CHAR
Definition: xmlstorage.h:175