ReactOS 0.4.17-dev-573-g8315b8c
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 "initguid.h"
24#include "oleacc_private.h"
25#include "resource.h"
26
27#include "wine/debug.h"
28
29#ifdef __REACTOS__
30#include <wchar.h>
31#include <winnls.h>
32#endif
33
35
36static const WCHAR lresult_atom_prefix[] = {'w','i','n','e','_','o','l','e','a','c','c',':'};
37
38#define NAVDIR_INTERNAL_HWND 10
39DEFINE_GUID(SID_AccFromDAWrapper, 0x33f139ee, 0xe509, 0x47f7, 0xbf,0x39, 0x83,0x76,0x44,0xf7,0x45,0x76);
40
45
47
49{
50 switch(V_VT(v)) {
51 case VT_I4:
52 return V_I4(v);
53 default:
54 FIXME("unhandled child ID variant type: %d\n", V_VT(v));
55 return -1;
56 }
57}
58
60{
61 WCHAR class_name[64];
62 int i, idx;
63
64 if(!RealGetWindowClassW(hwnd, class_name, ARRAY_SIZE(class_name)))
65 return NULL;
66 TRACE("got window class: %s\n", debugstr_w(class_name));
67
68 for(i=0; classes[i].name; i++) {
69 if(!wcsicmp(class_name, classes[i].name)) {
70 if(classes[i].stub)
71 FIXME("unhandled window class: %s\n", debugstr_w(class_name));
72 return &classes[i];
73 }
74 }
75
76 idx = SendMessageW(hwnd, WM_GETOBJECT, 0, OBJID_QUERYCLASSNAMEIDX);
77 if(idx) {
78 for(i=0; classes[i].name; i++) {
79 if(idx == classes[i].idx) {
80 if(classes[i].stub)
81 FIXME("unhandled window class: %s\n", debugstr_w(class_name));
82 return &classes[i];
83 }
84 }
85
86 WARN("unhandled class name idx: %x\n", idx);
87 }
88
89 return NULL;
90}
91
93 REFIID riidInterface, void** ppvObject )
94{
95 TRACE("%p %ld %s %p\n", hwnd, idObject,
96 debugstr_guid( riidInterface ), ppvObject );
97
98 switch(idObject) {
99 case OBJID_CLIENT:
100 return create_client_object(hwnd, riidInterface, ppvObject);
101 case OBJID_WINDOW:
102 return create_window_object(hwnd, riidInterface, ppvObject);
103 default:
104 FIXME("unhandled object id: %ld\n", idObject);
105 return E_NOTIMPL;
106 }
107}
108
110{
111 WCHAR atom_str[ARRAY_SIZE(lresult_atom_prefix)+3*8+3];
112 HANDLE server_proc, server_mapping, mapping;
113 DWORD proc_id, size;
116 void *view;
117 HRESULT hr;
118 WCHAR *p;
119
120 TRACE("%Id %s %Id %p\n", result, debugstr_guid(riid), wParam, ppObject );
121
122 if(wParam)
123 FIXME("unsupported wParam = %Ix\n", wParam);
124
125 if(!ppObject)
126 return E_INVALIDARG;
127 *ppObject = NULL;
128
129 if(result != (ATOM)result)
130 return E_FAIL;
131
132 if(!GlobalGetAtomNameW(result, atom_str, ARRAY_SIZE(atom_str)))
133 return E_FAIL;
134 if(memcmp(atom_str, lresult_atom_prefix, sizeof(lresult_atom_prefix)))
135 return E_FAIL;
136 p = atom_str + ARRAY_SIZE(lresult_atom_prefix);
137 proc_id = wcstoul(p, &p, 16);
138 if(*p != ':')
139 return E_FAIL;
140 server_mapping = ULongToHandle( wcstoul(p+1, &p, 16) );
141 if(*p != ':')
142 return E_FAIL;
143 size = wcstoul(p+1, &p, 16);
144 if(*p != 0)
145 return E_FAIL;
146
147 server_proc = OpenProcess(PROCESS_DUP_HANDLE, FALSE, proc_id);
148 if(!server_proc)
149 return E_FAIL;
150
151 if(!DuplicateHandle(server_proc, server_mapping, GetCurrentProcess(), &mapping,
153 return E_FAIL;
154 CloseHandle(server_proc);
156
159 if(!view)
160 return E_FAIL;
161
163 if(!data) {
165 return E_OUTOFMEMORY;
166 }
167 memcpy(data, view, size);
169
171 if(FAILED(hr)) {
173 return hr;
174 }
175
176 hr = CoUnmarshalInterface(stream, riid, ppObject);
177 IStream_Release(stream);
178 return hr;
179}
180
182{
183 static const LARGE_INTEGER seek_zero = {{0}};
184
185 WCHAR atom_str[ARRAY_SIZE(lresult_atom_prefix)+3*8+3];
188 STATSTG stat;
189 HRESULT hr;
190 ATOM atom;
191 void *view;
192
193 TRACE("%s %Id %p\n", debugstr_guid(riid), wParam, pAcc);
194
195 if(wParam)
196 FIXME("unsupported wParam = %Ix\n", wParam);
197
198 if(!pAcc)
199 return E_INVALIDARG;
200
202 if(FAILED(hr))
203 return hr;
204
205 hr = CoMarshalInterface(stream, riid, pAcc, MSHCTX_LOCAL, NULL, MSHLFLAGS_NORMAL);
206 if(FAILED(hr)) {
207 IStream_Release(stream);
208 return hr;
209 }
210
211 hr = IStream_Seek(stream, seek_zero, STREAM_SEEK_SET, NULL);
212 if(FAILED(hr)) {
213 IStream_Release(stream);
214 return hr;
215 }
216
217 hr = IStream_Stat(stream, &stat, STATFLAG_NONAME);
218 if(FAILED(hr)) {
220 IStream_Release(stream);
221 return hr;
222 }else if(stat.cbSize.u.HighPart) {
223 FIXME("stream size to big\n");
225 IStream_Release(stream);
226 return E_NOTIMPL;
227 }
228
230 stat.cbSize.u.HighPart, stat.cbSize.u.LowPart, NULL);
231 if(!mapping) {
233 IStream_Release(stream);
234 return hr;
235 }
236
238 if(!view) {
241 IStream_Release(stream);
242 return E_FAIL;
243 }
244
245 hr = IStream_Read(stream, view, stat.cbSize.u.LowPart, NULL);
247 if(FAILED(hr)) {
249 hr = IStream_Seek(stream, seek_zero, STREAM_SEEK_SET, NULL);
250 if(SUCCEEDED(hr))
252 IStream_Release(stream);
253 return hr;
254
255 }
256
258 swprintf(atom_str+ARRAY_SIZE(lresult_atom_prefix), 3*8 + 3, L"%08x:%08x:%08x", GetCurrentProcessId(),
259 HandleToUlong(mapping), stat.cbSize.u.LowPart);
260 atom = GlobalAddAtomW(atom_str);
261 if(!atom) {
263 hr = IStream_Seek(stream, seek_zero, STREAM_SEEK_SET, NULL);
264 if(SUCCEEDED(hr))
266 IStream_Release(stream);
267 return E_FAIL;
268 }
269
270 IStream_Release(stream);
271 return atom;
272}
273
274static void variant_init_i4( VARIANT *v, int val )
275{
276 V_VT(v) = VT_I4;
277 V_I4(v) = val;
278}
279
281{
283 HRESULT hr;
284 VARIANT v;
285 HWND hwnd;
286
287 TRACE("{%ld,%ld} %p %p\n", point.x, point.y, acc, child_id);
288
289 if (!acc || !child_id)
290 return E_INVALIDARG;
291
292 *acc = NULL;
293 V_VT(child_id) = VT_EMPTY;
294
296 if (!hwnd)
297 return E_FAIL;
299
300 hr = AccessibleObjectFromWindow(hwnd, OBJID_WINDOW, &IID_IAccessible, (void **)&cur);
301 if (FAILED(hr))
302 return hr;
303 if (!cur)
304 return E_FAIL;
305
306 V_VT(&v) = VT_EMPTY;
307 while (1)
308 {
309 hr = IAccessible_accHitTest(cur, point.x, point.y, &v);
310 if (FAILED(hr))
311 {
312 IAccessible_Release(cur);
313 return hr;
314 }
315
316 if (V_VT(&v) == VT_I4)
317 {
318 *acc = cur;
319 variant_init_i4(child_id, V_I4(&v));
320 return S_OK;
321 }
322 else if (V_VT(&v) == VT_DISPATCH)
323 {
324 IAccessible_Release(cur);
325
326 hr = IDispatch_QueryInterface(V_DISPATCH(&v), &IID_IAccessible, (void**)&cur);
327 VariantClear(&v);
328 if (FAILED(hr))
329 return hr;
330 if (!cur)
331 return E_FAIL;
332 }
333 else
334 {
335 VariantClear(&v);
336 IAccessible_Release(cur);
337 FIXME("unhandled variant type: %d\n", V_VT(&v));
338 return E_NOTIMPL;
339 }
340 }
341
342 return S_OK;
343}
344
346 IAccessible **acc_out, VARIANT *child_id_out )
347{
348 VARIANT child_id_variant;
349 IAccessible *acc = NULL;
351 HRESULT hr;
352
353 TRACE("%p %ld %ld %p %p\n", hwnd, object_id, child_id, acc_out, child_id_out);
354
355 if (!acc_out)
356 return E_INVALIDARG;
357 *acc_out = NULL;
358 VariantInit(child_id_out);
359
360 hr = AccessibleObjectFromWindow(hwnd, object_id, &IID_IAccessible, (void **)&acc);
361 if (FAILED(hr))
362 return hr;
363
364 variant_init_i4(&child_id_variant, child_id);
365 hr = IAccessible_get_accChild(acc, child_id_variant, &child);
366 if (FAILED(hr))
367 TRACE("get_accChild failed with %#lx!\n", hr);
368
369 if (SUCCEEDED(hr) && child)
370 {
371 IAccessible_Release(acc);
372 hr = IDispatch_QueryInterface(child, &IID_IAccessible, (void **)&acc);
373 IDispatch_Release(child);
374 if (FAILED(hr))
375 return hr;
376
377 variant_init_i4(&child_id_variant, CHILDID_SELF);
378 }
379
380 *acc_out = acc;
381 *child_id_out = child_id_variant;
382
383 return S_OK;
384}
385
387 REFIID riid, void** ppvObject )
388{
389 TRACE("%p %ld %s %p\n", hwnd, dwObjectID,
390 debugstr_guid( riid ), ppvObject );
391
392 if(!ppvObject)
393 return E_INVALIDARG;
394 *ppvObject = NULL;
395
396 if(IsWindow(hwnd)) {
397 LRESULT lres;
398
399 lres = SendMessageW(hwnd, WM_GETOBJECT, 0xffffffff, dwObjectID);
400 if(FAILED(lres))
401 return lres;
402 else if(lres)
403 return ObjectFromLresult(lres, riid, 0, ppvObject);
404 }
405
406 return CreateStdAccessibleObject(hwnd, dwObjectID, riid, ppvObject);
407}
408
410{
412 IAccessible *acc2;
414 IOleWindow *ow;
415 VARIANT v, cid;
417
418 TRACE("%p %p\n", acc, phwnd);
419
420 hres = IAccessible_QueryInterface(acc, &IID_IOleWindow, (void**)&ow);
421 if(SUCCEEDED(hres)) {
422 hres = IOleWindow_GetWindow(ow, phwnd);
423 IOleWindow_Release(ow);
424 if(SUCCEEDED(hres) && *phwnd)
425 return S_OK;
426 }
427
428 VariantInit(&v);
430 hres = IAccessible_accNavigate(acc, NAVDIR_INTERNAL_HWND, cid, &v);
431 if(SUCCEEDED(hres)) {
432 if(hres == S_OK && V_VT(&v) == VT_I4 && V_I4(&v)) {
433 *phwnd = LongToHandle(V_I4(&v));
434 return S_OK;
435 }
436 /* native leaks v here */
437 VariantClear(&v);
438 }
439
440 hres = IAccessible_QueryInterface(acc, &IID_IServiceProvider, (void**)&sp);
441 if(SUCCEEDED(hres)) {
442 hres = IServiceProvider_QueryService(sp, &SID_AccFromDAWrapper,
443 &IID_IAccessible, (void**)&acc2);
444 IServiceProvider_Release(sp);
445 }
446 if(FAILED(hres)) {
447 acc2 = acc;
448 IAccessible_AddRef(acc2);
449 }
450
451 while(1) {
452 hres = IAccessible_QueryInterface(acc2, &IID_IOleWindow, (void**)&ow);
453 if(SUCCEEDED(hres)) {
454 hres = IOleWindow_GetWindow(ow, phwnd);
455 IOleWindow_Release(ow);
456 if(SUCCEEDED(hres)) {
457 IAccessible_Release(acc2);
458 return hres;
459 }
460 }
461
462 hres = IAccessible_get_accParent(acc, &parent);
463 IAccessible_Release(acc2);
464 if(FAILED(hres))
465 return hres;
466 if(!parent) {
467 *phwnd = NULL;
468 return hres;
469 }
470
471 hres = IDispatch_QueryInterface(parent, &IID_IAccessible, (void**)&acc2);
472 IDispatch_Release(parent);
473 if(FAILED(hres))
474 return hres;
475 acc = acc2;
476 }
477}
478
481{
482 TRACE("%p, %ld, %p\n", hinstDLL, fdwReason, lpvReserved);
483
484 switch (fdwReason)
485 {
487 oleacc_handle = hinstDLL;
489 break;
490 }
491
492 return OLEACC_DllMain(hinstDLL, fdwReason, lpvReserved);
493}
494
496{
498}
499
501{
503}
504
506{
507 if(IsEqualGUID(&CLSID_CAccPropServices, rclsid)) {
508 TRACE("(CLSID_CAccPropServices %s %p)\n", debugstr_guid(iid), ppv);
509 return get_accpropservices_factory(iid, ppv);
510 }
511
512 if(IsEqualGUID(&CLSID_PSFactoryBuffer, rclsid)) {
513 TRACE("(CLSID_PSFactoryBuffer %s %p)\n", debugstr_guid(iid), ppv);
514 return OLEACC_DllGetClassObject(rclsid, iid, ppv);
515 }
516
517 FIXME("%s %s %p: stub\n", debugstr_guid(rclsid), debugstr_guid(iid), ppv);
518 return E_NOTIMPL;
519}
520
521void WINAPI GetOleaccVersionInfo(DWORD* pVersion, DWORD* pBuild)
522{
523 *pVersion = MAKELONG(0,7); /* Windows 7 version of oleacc: 7.0.0.0 */
524 *pBuild = MAKELONG(0,0);
525}
526
528{
529 DWORD proc_id;
530
531 TRACE("%p\n", hwnd);
532
533 if(!GetWindowThreadProcessId(hwnd, &proc_id))
534 return NULL;
537}
538
539UINT WINAPI GetRoleTextW(DWORD role, LPWSTR lpRole, UINT rolemax)
540{
541 INT ret;
542 WCHAR *resptr;
543
544 TRACE("%lu %p %u\n", role, lpRole, rolemax);
545
546 /* return role text length */
547 if(!lpRole)
548 return LoadStringW(oleacc_handle, role, (LPWSTR)&resptr, 0);
549
550 ret = LoadStringW(oleacc_handle, role, lpRole, rolemax);
551 if(!(ret > 0)){
552 if(rolemax > 0) lpRole[0] = '\0';
553 return 0;
554 }
555
556 return ret;
557}
558
559UINT WINAPI GetRoleTextA(DWORD role, LPSTR lpRole, UINT rolemax)
560{
561 UINT length;
562 WCHAR *roletextW;
563
564 TRACE("%lu %p %u\n", role, lpRole, rolemax);
565
566 if(lpRole && !rolemax)
567 return 0;
568
569 length = GetRoleTextW(role, NULL, 0);
570 if(!length) {
571 if(lpRole && rolemax)
572 lpRole[0] = 0;
573 return 0;
574 }
575
576 roletextW = HeapAlloc(GetProcessHeap(), 0, (length + 1)*sizeof(WCHAR));
577 if(!roletextW)
578 return 0;
579
580 GetRoleTextW(role, roletextW, length + 1);
581
582 length = WideCharToMultiByte( CP_ACP, 0, roletextW, -1, NULL, 0, NULL, NULL );
583
584 if(!lpRole){
585 HeapFree(GetProcessHeap(), 0, roletextW);
586 return length - 1;
587 }
588
589 if(rolemax < length) {
590 HeapFree(GetProcessHeap(), 0, roletextW);
591 lpRole[0] = 0;
592 return 0;
593 }
594
595 WideCharToMultiByte( CP_ACP, 0, roletextW, -1, lpRole, rolemax, NULL, NULL );
596
597 if(rolemax < length){
598 lpRole[rolemax-1] = '\0';
599 length = rolemax;
600 }
601
602 HeapFree(GetProcessHeap(), 0, roletextW);
603
604 return length - 1;
605}
606
607UINT WINAPI GetStateTextW(DWORD state_bit, WCHAR *state_str, UINT state_str_len)
608{
609 DWORD state_id;
610
611 TRACE("%lx %p %u\n", state_bit, state_str, state_str_len);
612
613 if(state_bit & ~(STATE_SYSTEM_VALID | STATE_SYSTEM_HASPOPUP)) {
614 if(state_str && state_str_len)
615 state_str[0] = 0;
616 return 0;
617 }
618
619 state_id = IDS_STATE_NORMAL;
620 while(state_bit) {
621 state_id++;
622 state_bit /= 2;
623 }
624
625 if(state_str) {
626 UINT ret = LoadStringW(oleacc_handle, state_id, state_str, state_str_len);
627 if(!ret && state_str_len)
628 state_str[0] = 0;
629 return ret;
630 }else {
631 WCHAR *tmp;
632 return LoadStringW(oleacc_handle, state_id, (WCHAR*)&tmp, 0);
633 }
634
635}
636
637UINT WINAPI GetStateTextA(DWORD state_bit, CHAR *state_str, UINT state_str_len)
638{
639 DWORD state_id;
640
641 TRACE("%lx %p %u\n", state_bit, state_str, state_str_len);
642
643 if(state_str && !state_str_len)
644 return 0;
645
646 if(state_bit & ~(STATE_SYSTEM_VALID | STATE_SYSTEM_HASPOPUP)) {
647 if(state_str && state_str_len)
648 state_str[0] = 0;
649 return 0;
650 }
651
652 state_id = IDS_STATE_NORMAL;
653 while(state_bit) {
654 state_id++;
655 state_bit /= 2;
656 }
657
658 if(state_str) {
659 UINT ret = LoadStringA(oleacc_handle, state_id, state_str, state_str_len);
660 if(!ret && state_str_len)
661 state_str[0] = 0;
662 return ret;
663 }else {
664 CHAR tmp[256];
665 return LoadStringA(oleacc_handle, state_id, tmp, sizeof(tmp));
666 }
667}
668
670 LONG start, LONG count, VARIANT *children, LONG *children_cnt)
671{
672 IEnumVARIANT *ev;
673 LONG i, child_no;
674 HRESULT hr;
675
676 TRACE("%p %ld %ld %p %p\n", container, start, count, children, children_cnt);
677
678 if(!container || !children || !children_cnt)
679 return E_INVALIDARG;
680
681 for(i=0; i<count; i++)
682 VariantInit(children+i);
683
684 hr = IAccessible_QueryInterface(container, &IID_IEnumVARIANT, (void**)&ev);
685 if(SUCCEEDED(hr)) {
686 hr = IEnumVARIANT_Reset(ev);
687 if(SUCCEEDED(hr))
688 hr = IEnumVARIANT_Skip(ev, start);
689 if(SUCCEEDED(hr))
690 hr = IEnumVARIANT_Next(ev, count, children, (ULONG*)children_cnt);
691 IEnumVARIANT_Release(ev);
692 return hr;
693 }
694
695 hr = IAccessible_get_accChildCount(container, &child_no);
696 if(FAILED(hr))
697 return hr;
698
699 for(i=0; i<count && start+i+1<=child_no; i++) {
700 IDispatch *disp;
701
702 V_VT(children+i) = VT_I4;
703 V_I4(children+i) = start+i+1;
704
705 hr = IAccessible_get_accChild(container, children[i], &disp);
706 if(SUCCEEDED(hr) && disp) {
707 V_VT(children+i) = VT_DISPATCH;
708 V_DISPATCH(children+i) = disp;
709 }
710 }
711
712 *children_cnt = i;
713 return i==count ? S_OK : S_FALSE;
714}
#define stat
Definition: acwin.h:100
static DWORD const fdwReason
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
Definition: precomp.h:23
#define ARRAY_SIZE(A)
Definition: main.h:20
BOOL NTAPI DllMain(_In_ HINSTANCE hDll, _In_ ULONG dwReason, _In_opt_ PVOID pReserved)
Definition: main.c:33
#define FIXME(fmt,...)
Definition: precomp.h:53
#define WARN(fmt,...)
Definition: precomp.h:61
#define LongToHandle(h)
Definition: basetsd.h:76
#define HandleToUlong(h)
Definition: basetsd.h:73
#define ULongToHandle(h)
Definition: basetsd.h:75
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
HRESULT hr
Definition: delayimp.cpp:582
WORD ATOM
Definition: dimm.idl:113
static LPVOID LPUNKNOWN
Definition: dinput.c:53
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
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
HRESULT WINAPI CreateStreamOnHGlobal(HGLOBAL hGlobal, BOOL delete_on_release, IStream **stream)
HRESULT WINAPI CoMarshalInterface(IStream *stream, REFIID riid, IUnknown *unk, DWORD dest_context, void *pvDestContext, DWORD mshlFlags)
Definition: marshal.c:483
HRESULT WINAPI CoReleaseMarshalData(IStream *stream)
Definition: marshal.c:673
HRESULT WINAPI CoUnmarshalInterface(IStream *stream, REFIID riid, void **ppv)
Definition: marshal.c:793
#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
#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_EMPTY
Definition: compat.h:2295
@ VT_DISPATCH
Definition: compat.h:2304
#define wcsicmp
Definition: compat.h:15
UINT WINAPI GlobalGetAtomNameW(ATOM nAtom, LPWSTR lpBuffer, int nSize)
Definition: atom.c:476
ATOM WINAPI GlobalDeleteAtom(ATOM nAtom)
Definition: atom.c:444
ATOM WINAPI GlobalAddAtomW(LPCWSTR lpString)
Definition: atom.c:434
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:1224
INT WINAPI DECLSPEC_HOTPATCH LoadStringA(HINSTANCE instance, UINT resource_id, LPSTR buffer, INT buflen)
Definition: string.c:1307
_ACRTIMP __msvcrt_ulong __cdecl wcstoul(const wchar_t *, wchar_t **, int)
Definition: wcs.c:2917
_ACRTIMP int __cdecl memcmp(const void *, const void *, size_t)
Definition: string.c:2807
HRESULT create_client_object(HWND hwnd, const IID *iid, void **obj)
Definition: client.c:904
static const struct win_class_data classes[]
Definition: client.c:872
static HINSTANCE oleacc_handle
Definition: main.c:46
HRESULT WINAPI OLEACC_DllRegisterServer(void)
HANDLE WINAPI GetProcessHandleFromHwnd(HWND hwnd)
Definition: main.c:527
LRESULT WINAPI LresultFromObject(REFIID riid, WPARAM wParam, LPUNKNOWN pAcc)
Definition: main.c:181
HRESULT WINAPI AccessibleObjectFromWindow(HWND hwnd, DWORD dwObjectID, REFIID riid, void **ppvObject)
Definition: main.c:386
BOOL WINAPI OLEACC_DllMain(HINSTANCE, DWORD, void *)
void WINAPI GetOleaccVersionInfo(DWORD *pVersion, DWORD *pBuild)
Definition: main.c:521
HRESULT WINAPI AccessibleObjectFromPoint(POINT point, IAccessible **acc, VARIANT *child_id)
Definition: main.c:280
HRESULT WINAPI ObjectFromLresult(LRESULT result, REFIID riid, WPARAM wParam, void **ppObject)
Definition: main.c:109
int convert_child_id(VARIANT *v)
Definition: main.c:48
UINT WINAPI GetStateTextW(DWORD state_bit, WCHAR *state_str, UINT state_str_len)
Definition: main.c:607
UINT WINAPI GetStateTextA(DWORD state_bit, CHAR *state_str, UINT state_str_len)
Definition: main.c:637
HRESULT WINAPI OLEACC_DllGetClassObject(REFCLSID, REFIID, void **)
HRESULT WINAPI AccessibleChildren(IAccessible *container, LONG start, LONG count, VARIANT *children, LONG *children_cnt)
Definition: main.c:669
static const WCHAR lresult_atom_prefix[]
Definition: main.c:36
UINT WINAPI GetRoleTextA(DWORD role, LPSTR lpRole, UINT rolemax)
Definition: main.c:559
#define NAVDIR_INTERNAL_HWND
Definition: main.c:38
HRESULT WINAPI WindowFromAccessibleObject(IAccessible *acc, HWND *phwnd)
Definition: main.c:409
HRESULT WINAPI OLEACC_DllUnregisterServer(void)
HRESULT WINAPI AccessibleObjectFromEvent(HWND hwnd, DWORD object_id, DWORD child_id, IAccessible **acc_out, VARIANT *child_id_out)
Definition: main.c:345
HRESULT WINAPI CreateStdAccessibleObject(HWND hwnd, LONG idObject, REFIID riidInterface, void **ppvObject)
Definition: main.c:92
UINT WINAPI GetRoleTextW(DWORD role, LPWSTR lpRole, UINT rolemax)
Definition: main.c:539
const struct win_class_data * find_class_data(HWND hwnd, const struct win_class_data *classes)
Definition: main.c:59
static void variant_init_i4(VARIANT *v, int val)
Definition: main.c:274
#define IDS_STATE_NORMAL
Definition: resource.h:19
#define swprintf
Definition: precomp.h:40
return ret
Definition: mutex.c:146
#define L(x)
Definition: resources.c:13
r parent
Definition: btrfs.c:3010
POINTL point
Definition: edittest.c:50
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
FxCollectionEntry * cur
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
GLuint GLfloat * val
Definition: glext.h:7180
GLuint64EXT * result
Definition: glext.h:11304
GLenum GLenum GLenum GLenum mapping
Definition: glext.h:9031
GLfloat GLfloat p
Definition: glext.h:8902
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
unsigned int UINT
Definition: sysinfo.c:13
HGLOBAL NTAPI GlobalFree(HGLOBAL hMem)
Definition: heapmem.c:611
HGLOBAL NTAPI GlobalAlloc(UINT uFlags, SIZE_T dwBytes)
Definition: heapmem.c:368
#define PROCESS_VM_READ
Definition: pstypes.h:157
#define PROCESS_VM_WRITE
Definition: pstypes.h:158
#define PROCESS_VM_OPERATION
Definition: pstypes.h:156
REFIID riid
Definition: atlbase.h:39
REFIID LPVOID * ppv
Definition: atlbase.h:39
#define PROCESS_DUP_HANDLE
static TfClientId cid
#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
LONG_PTR LRESULT
Definition: minwindef.h:176
UINT_PTR WPARAM
Definition: minwindef.h:174
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
HRESULT hres
Definition: protocol.c:465
static const WCHAR sp[]
Definition: suminfo.c:287
static HWND child
Definition: cursoricon.c:298
#define SYNCHRONIZE
Definition: nt_native.h:61
#define PAGE_READWRITE
Definition: nt_native.h:1307
HRESULT get_accpropservices_factory(REFIID, void **)
Definition: propservice.c:247
HRESULT create_window_object(HWND, const IID *, void **)
Definition: window.c:500
#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
short WCHAR
Definition: pedump.c:58
long LONG
Definition: pedump.c:60
char CHAR
Definition: pedump.c:57
#define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8)
Definition: guiddef.h:68
#define IsEqualGUID(rguid1, rguid2)
Definition: guiddef.h:147
#define REFIID
Definition: guiddef.h:118
#define REFCLSID
Definition: guiddef.h:117
#define LoadStringW
Definition: utils.h:64
#define TRACE(s)
Definition: solgame.cpp:4
LONG y
Definition: windef.h:130
LONG x
Definition: windef.h:129
Definition: stubgen.c:11
Definition: name.c:39
Definition: stat.h:66
Definition: parse.h:23
uint16_t * LPWSTR
Definition: typedefs.h:56
char * LPSTR
Definition: typedefs.h:51
int32_t INT
Definition: typedefs.h:58
#define MAKELONG(a, b)
Definition: typedefs.h:249
uint32_t ULONG
Definition: typedefs.h:59
GUID const CLSID_PSFactoryBuffer
HRESULT WINAPI DECLSPEC_HOTPATCH VariantClear(VARIANTARG *pVarg)
Definition: variant.c:626
void WINAPI VariantInit(VARIANTARG *pVarg)
Definition: variant.c:547
#define OBJID_CLIENT
Definition: winable.h:19
#define OBJID_WINDOW
Definition: winable.h:15
#define CHILDID_SELF
Definition: winable.h:14
#define FILE_MAP_WRITE
Definition: winbase.h:157
DWORD WINAPI GetCurrentProcessId(void)
Definition: proc.c:1155
#define GMEM_FIXED
Definition: winbase.h:317
DWORD WINAPI GetWindowThreadProcessId(HWND hWnd, PDWORD lpdwProcessId)
_In_ LONG _In_ HWND hwnd
Definition: winddi.h:4023
#define WINAPI
Definition: msvc.h:6
#define S_FALSE
Definition: winerror.h:3451
BOOL WINAPI IsWindow(_In_opt_ HWND)
#define GA_ROOT
Definition: winuser.h:2893
UINT WINAPI RealGetWindowClassW(_In_ HWND hwnd, _Out_writes_to_(cchClassNameMax, return) LPWSTR ptszClassName, _In_ UINT cchClassNameMax)
HWND WINAPI WindowFromPoint(_In_ POINT)
#define STATE_SYSTEM_VALID
Definition: winuser.h:2999
HWND WINAPI GetAncestor(_In_ HWND, _In_ UINT)
Definition: window.c:929
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define DUPLICATE_SAME_ACCESS
#define DUPLICATE_CLOSE_SOURCE