ReactOS  0.4.14-dev-50-g13bb5e2
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 #include "initguid.h"
31 #include "oleacc_private.h"
32 #include "resource.h"
33 
34 #include "wine/unicode.h"
35 #include "wine/debug.h"
36 
38 
39 static const WCHAR lresult_atom_prefix[] = {'w','i','n','e','_','o','l','e','a','c','c',':'};
40 
41 static const WCHAR menuW[] = {'#','3','2','7','6','8',0};
42 static const WCHAR desktopW[] = {'#','3','2','7','6','9',0};
43 static const WCHAR dialogW[] = {'#','3','2','7','7','0',0};
44 static const WCHAR winswitchW[] = {'#','3','2','7','7','1',0};
45 static const WCHAR mdi_clientW[] = {'M','D','I','C','l','i','e','n','t',0};
46 static const WCHAR richeditW[] = {'R','I','C','H','E','D','I','T',0};
47 static const WCHAR richedit20aW[] = {'R','i','c','h','E','d','i','t','2','0','A',0};
48 static const WCHAR richedit20wW[] = {'R','i','c','h','E','d','i','t','2','0','W',0};
49 
50 typedef HRESULT (WINAPI *accessible_create)(HWND, const IID*, void**);
51 
53 extern BOOL WINAPI OLEACC_DllMain(HINSTANCE, DWORD, void*) DECLSPEC_HIDDEN;
54 extern HRESULT WINAPI OLEACC_DllRegisterServer(void) DECLSPEC_HIDDEN;
55 extern HRESULT WINAPI OLEACC_DllUnregisterServer(void) DECLSPEC_HIDDEN;
56 
57 static struct {
58  const WCHAR *name;
59  DWORD idx;
60  accessible_create create_client;
63  {WC_LISTBOXW, 0x10000, NULL, NULL},
64  {menuW, 0x10001, NULL, NULL},
65  {WC_BUTTONW, 0x10002, NULL, NULL},
66  {WC_STATICW, 0x10003, NULL, NULL},
67  {WC_EDITW, 0x10004, NULL, NULL},
68  {WC_COMBOBOXW, 0x10005, NULL, NULL},
69  {dialogW, 0x10006, NULL, NULL},
70  {winswitchW, 0x10007, NULL, NULL},
71  {mdi_clientW, 0x10008, NULL, NULL},
72  {desktopW, 0x10009, NULL, NULL},
73  {WC_SCROLLBARW, 0x1000a, NULL, NULL},
74  {STATUSCLASSNAMEW, 0x1000b, NULL, NULL},
75  {TOOLBARCLASSNAMEW, 0x1000c, NULL, NULL},
76  {PROGRESS_CLASSW, 0x1000d, NULL, NULL},
77  {ANIMATE_CLASSW, 0x1000e, NULL, NULL},
78  {WC_TABCONTROLW, 0x1000f, NULL, NULL},
79  {HOTKEY_CLASSW, 0x10010, NULL, NULL},
80  {WC_HEADERW, 0x10011, NULL, NULL},
81  {TRACKBAR_CLASSW, 0x10012, NULL, NULL},
82  {WC_LISTVIEWW, 0x10013, NULL, NULL},
83  {UPDOWN_CLASSW, 0x10016, NULL, NULL},
84  {TOOLTIPS_CLASSW, 0x10018, NULL, NULL},
85  {WC_TREEVIEWW, 0x10019, NULL, NULL},
86  {MONTHCAL_CLASSW, 0, NULL, NULL},
88  {WC_IPADDRESSW, 0, NULL, NULL},
89  {richeditW, 0x1001c, NULL, NULL},
90  {richedit20aW, 0, NULL, NULL},
91  {richedit20wW, 0, NULL, NULL},
92 };
93 
95 
97 {
98  switch(V_VT(v)) {
99  case VT_I4:
100  return V_I4(v);
101  default:
102  FIXME("unhandled child ID variant type: %d\n", V_VT(v));
103  return -1;
104  }
105 }
106 
108 {
109  WCHAR class_name[64];
110  int i, idx;
111 
112  if(!RealGetWindowClassW(hwnd, class_name, ARRAY_SIZE(class_name)))
113  return NULL;
114  TRACE("got window class: %s\n", debugstr_w(class_name));
115 
116  for(i=0; i<ARRAY_SIZE(builtin_classes); i++) {
117  if(!strcmpiW(class_name, builtin_classes[i].name)) {
119 
120  ret = (objid==OBJID_CLIENT ?
121  builtin_classes[i].create_client :
122  builtin_classes[i].create_window);
123  if(!ret)
124  FIXME("unhandled window class: %s\n", debugstr_w(class_name));
125  return ret;
126  }
127  }
128 
129  idx = SendMessageW(hwnd, WM_GETOBJECT, 0, OBJID_QUERYCLASSNAMEIDX);
130  if(idx) {
131  for(i=0; i<ARRAY_SIZE(builtin_classes); i++) {
132  if(idx == builtin_classes[i].idx) {
134 
135  ret = (objid==OBJID_CLIENT ?
136  builtin_classes[i].create_client :
137  builtin_classes[i].create_window);
138  if(!ret)
139  FIXME("unhandled class name idx: %x\n", idx);
140  return ret;
141  }
142  }
143 
144  WARN("unhandled class name idx: %x\n", idx);
145  }
146 
147  return NULL;
148 }
149 
151  REFIID riidInterface, void** ppvObject )
152 {
154 
155  TRACE("%p %d %s %p\n", hwnd, idObject,
156  debugstr_guid( riidInterface ), ppvObject );
157 
158  switch(idObject) {
159  case OBJID_CLIENT:
161  if(create) return create(hwnd, riidInterface, ppvObject);
162  return create_client_object(hwnd, riidInterface, ppvObject);
163  case OBJID_WINDOW:
165  if(create) return create(hwnd, riidInterface, ppvObject);
166  return create_window_object(hwnd, riidInterface, ppvObject);
167  default:
168  FIXME("unhandled object id: %d\n", idObject);
169  return E_NOTIMPL;
170  }
171 }
172 
174 {
175  WCHAR atom_str[ARRAY_SIZE(lresult_atom_prefix)+3*8+3];
176  HANDLE server_proc, server_mapping, mapping;
177  DWORD proc_id, size;
178  IStream *stream;
179  HGLOBAL data;
180  void *view;
181  HRESULT hr;
182  WCHAR *p;
183 
184  TRACE("%ld %s %ld %p\n", result, debugstr_guid(riid), wParam, ppObject );
185 
186  if(wParam)
187  FIXME("unsupported wParam = %lx\n", wParam);
188 
189  if(!ppObject)
190  return E_INVALIDARG;
191  *ppObject = NULL;
192 
193  if(result != (ATOM)result)
194  return E_FAIL;
195 
196  if(!GlobalGetAtomNameW(result, atom_str, ARRAY_SIZE(atom_str)))
197  return E_FAIL;
198  if(memcmp(atom_str, lresult_atom_prefix, sizeof(lresult_atom_prefix)))
199  return E_FAIL;
200  p = atom_str + ARRAY_SIZE(lresult_atom_prefix);
201  proc_id = strtoulW(p, &p, 16);
202  if(*p != ':')
203  return E_FAIL;
204  server_mapping = ULongToHandle( strtoulW(p+1, &p, 16) );
205  if(*p != ':')
206  return E_FAIL;
207  size = strtoulW(p+1, &p, 16);
208  if(*p != 0)
209  return E_FAIL;
210 
211  server_proc = OpenProcess(PROCESS_DUP_HANDLE, FALSE, proc_id);
212  if(!server_proc)
213  return E_FAIL;
214 
215  if(!DuplicateHandle(server_proc, server_mapping, GetCurrentProcess(), &mapping,
217  return E_FAIL;
218  CloseHandle(server_proc);
220 
223  if(!view)
224  return E_FAIL;
225 
227  if(!data) {
229  return E_OUTOFMEMORY;
230  }
231  memcpy(data, view, size);
233 
235  if(FAILED(hr)) {
236  GlobalFree(data);
237  return hr;
238  }
239 
240  hr = CoUnmarshalInterface(stream, riid, ppObject);
241  IStream_Release(stream);
242  return hr;
243 }
244 
246 {
247  static const WCHAR atom_fmt[] = {'%','0','8','x',':','%','0','8','x',':','%','0','8','x',0};
248  static const LARGE_INTEGER seek_zero = {{0}};
249 
250  WCHAR atom_str[ARRAY_SIZE(lresult_atom_prefix)+3*8+3];
251  IStream *stream;
252  HANDLE mapping;
253  STATSTG stat;
254  HRESULT hr;
255  ATOM atom;
256  void *view;
257 
258  TRACE("%s %ld %p\n", debugstr_guid(riid), wParam, pAcc);
259 
260  if(wParam)
261  FIXME("unsupported wParam = %lx\n", wParam);
262 
263  if(!pAcc)
264  return E_INVALIDARG;
265 
267  if(FAILED(hr))
268  return hr;
269 
270  hr = CoMarshalInterface(stream, riid, pAcc, MSHCTX_LOCAL, NULL, MSHLFLAGS_NORMAL);
271  if(FAILED(hr)) {
272  IStream_Release(stream);
273  return hr;
274  }
275 
276  hr = IStream_Seek(stream, seek_zero, STREAM_SEEK_SET, NULL);
277  if(FAILED(hr)) {
278  IStream_Release(stream);
279  return hr;
280  }
281 
282  hr = IStream_Stat(stream, &stat, STATFLAG_NONAME);
283  if(FAILED(hr)) {
285  IStream_Release(stream);
286  return hr;
287  }else if(stat.cbSize.u.HighPart) {
288  FIXME("stream size to big\n");
290  IStream_Release(stream);
291  return E_NOTIMPL;
292  }
293 
295  stat.cbSize.u.HighPart, stat.cbSize.u.LowPart, NULL);
296  if(!mapping) {
298  IStream_Release(stream);
299  return hr;
300  }
301 
303  if(!view) {
306  IStream_Release(stream);
307  return E_FAIL;
308  }
309 
310  hr = IStream_Read(stream, view, stat.cbSize.u.LowPart, NULL);
312  if(FAILED(hr)) {
314  hr = IStream_Seek(stream, seek_zero, STREAM_SEEK_SET, NULL);
315  if(SUCCEEDED(hr))
317  IStream_Release(stream);
318  return hr;
319 
320  }
321 
322  memcpy(atom_str, lresult_atom_prefix, sizeof(lresult_atom_prefix));
324  HandleToUlong(mapping), stat.cbSize.u.LowPart);
325  atom = GlobalAddAtomW(atom_str);
326  if(!atom) {
328  hr = IStream_Seek(stream, seek_zero, STREAM_SEEK_SET, NULL);
329  if(SUCCEEDED(hr))
331  IStream_Release(stream);
332  return E_FAIL;
333  }
334 
335  IStream_Release(stream);
336  return atom;
337 }
338 
340 {
341  FIXME("{%d,%d} %p %p: stub\n", ptScreen.x, ptScreen.y, ppacc, pvarChild );
342  return E_NOTIMPL;
343 }
344 
346  REFIID riid, void** ppvObject )
347 {
348  TRACE("%p %d %s %p\n", hwnd, dwObjectID,
350 
351  if(!ppvObject)
352  return E_INVALIDARG;
353  *ppvObject = NULL;
354 
355  if(IsWindow(hwnd)) {
356  LRESULT lres;
357 
358  lres = SendMessageW(hwnd, WM_GETOBJECT, 0xffffffff, dwObjectID);
359  if(FAILED(lres))
360  return lres;
361  else if(lres)
362  return ObjectFromLresult(lres, riid, 0, ppvObject);
363  }
364 
365  return CreateStdAccessibleObject(hwnd, dwObjectID, riid, ppvObject);
366 }
367 
369 {
370  IDispatch *parent;
371  IOleWindow *ow;
372  HRESULT hres;
373 
374  TRACE("%p %p\n", acc, phwnd);
375 
376  IAccessible_AddRef(acc);
377  while(1) {
378  hres = IAccessible_QueryInterface(acc, &IID_IOleWindow, (void**)&ow);
379  if(SUCCEEDED(hres)) {
380  hres = IOleWindow_GetWindow(ow, phwnd);
381  IOleWindow_Release(ow);
382  IAccessible_Release(acc);
383  return hres;
384  }
385 
386  hres = IAccessible_get_accParent(acc, &parent);
387  IAccessible_Release(acc);
388  if(FAILED(hres))
389  return hres;
390  if(hres!=S_OK || !parent) {
391  *phwnd = NULL;
392  return hres;
393  }
394 
395  hres = IDispatch_QueryInterface(parent, &IID_IAccessible, (void**)&acc);
396  IDispatch_Release(parent);
397  if(FAILED(hres))
398  return hres;
399  }
400 }
401 
402 BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason,
404 {
405  TRACE("%p, %d, %p\n", hinstDLL, fdwReason, lpvReserved);
406 
407  switch (fdwReason)
408  {
409  case DLL_PROCESS_ATTACH:
410  oleacc_handle = hinstDLL;
411  DisableThreadLibraryCalls(hinstDLL);
412  break;
413  }
414 
415  return OLEACC_DllMain(hinstDLL, fdwReason, lpvReserved);
416 }
417 
419 {
420  return OLEACC_DllRegisterServer();
421 }
422 
424 {
425  return OLEACC_DllUnregisterServer();
426 }
427 
429 {
430  if(IsEqualGUID(&CLSID_CAccPropServices, rclsid)) {
431  TRACE("(CLSID_CAccPropServices %s %p)\n", debugstr_guid(iid), ppv);
432  return get_accpropservices_factory(iid, ppv);
433  }
434 
435  if(IsEqualGUID(&CLSID_PSFactoryBuffer, rclsid)) {
436  TRACE("(CLSID_PSFactoryBuffer %s %p)\n", debugstr_guid(iid), ppv);
437  return OLEACC_DllGetClassObject(rclsid, iid, ppv);
438  }
439 
440  FIXME("%s %s %p: stub\n", debugstr_guid(rclsid), debugstr_guid(iid), ppv);
441  return E_NOTIMPL;
442 }
443 
444 void WINAPI GetOleaccVersionInfo(DWORD* pVersion, DWORD* pBuild)
445 {
446 #ifdef __REACTOS__
447  *pVersion = MAKELONG(2,4); /* Windows XP version of oleacc: 4.2.5406.0 */
448  *pBuild = MAKELONG(0,5406);
449 #else
450  *pVersion = MAKELONG(0,7); /* Windows 7 version of oleacc: 7.0.0.0 */
451  *pBuild = MAKELONG(0,0);
452 #endif
453 }
454 
456 {
457  DWORD proc_id;
458 
459  TRACE("%p\n", hwnd);
460 
461  if(!GetWindowThreadProcessId(hwnd, &proc_id))
462  return NULL;
465 }
466 
467 UINT WINAPI GetRoleTextW(DWORD role, LPWSTR lpRole, UINT rolemax)
468 {
469  INT ret;
470  WCHAR *resptr;
471 
472  TRACE("%u %p %u\n", role, lpRole, rolemax);
473 
474  /* return role text length */
475  if(!lpRole)
476  return LoadStringW(oleacc_handle, role, (LPWSTR)&resptr, 0);
477 
478  ret = LoadStringW(oleacc_handle, role, lpRole, rolemax);
479  if(!(ret > 0)){
480  if(rolemax > 0) lpRole[0] = '\0';
481  return 0;
482  }
483 
484  return ret;
485 }
486 
487 UINT WINAPI GetRoleTextA(DWORD role, LPSTR lpRole, UINT rolemax)
488 {
489  UINT length;
490  WCHAR *roletextW;
491 
492  TRACE("%u %p %u\n", role, lpRole, rolemax);
493 
494  if(lpRole && !rolemax)
495  return 0;
496 
497  length = GetRoleTextW(role, NULL, 0);
498  if(!length) {
499  if(lpRole && rolemax)
500  lpRole[0] = 0;
501  return 0;
502  }
503 
504  roletextW = HeapAlloc(GetProcessHeap(), 0, (length + 1)*sizeof(WCHAR));
505  if(!roletextW)
506  return 0;
507 
508  GetRoleTextW(role, roletextW, length + 1);
509 
510  length = WideCharToMultiByte( CP_ACP, 0, roletextW, -1, NULL, 0, NULL, NULL );
511 
512  if(!lpRole){
513  HeapFree(GetProcessHeap(), 0, roletextW);
514  return length - 1;
515  }
516 
517  if(rolemax < length) {
518  HeapFree(GetProcessHeap(), 0, roletextW);
519  lpRole[0] = 0;
520  return 0;
521  }
522 
523  WideCharToMultiByte( CP_ACP, 0, roletextW, -1, lpRole, rolemax, NULL, NULL );
524 
525  if(rolemax < length){
526  lpRole[rolemax-1] = '\0';
527  length = rolemax;
528  }
529 
530  HeapFree(GetProcessHeap(), 0, roletextW);
531 
532  return length - 1;
533 }
534 
535 UINT WINAPI GetStateTextW(DWORD state_bit, WCHAR *state_str, UINT state_str_len)
536 {
537  DWORD state_id;
538 
539  TRACE("%x %p %u\n", state_bit, state_str, state_str_len);
540 
541  if(state_bit & ~(STATE_SYSTEM_VALID | STATE_SYSTEM_HASPOPUP)) {
542  if(state_str && state_str_len)
543  state_str[0] = 0;
544  return 0;
545  }
546 
547  state_id = IDS_STATE_NORMAL;
548  while(state_bit) {
549  state_id++;
550  state_bit /= 2;
551  }
552 
553  if(state_str) {
554  UINT ret = LoadStringW(oleacc_handle, state_id, state_str, state_str_len);
555  if(!ret && state_str_len)
556  state_str[0] = 0;
557  return ret;
558  }else {
559  WCHAR *tmp;
560  return LoadStringW(oleacc_handle, state_id, (WCHAR*)&tmp, 0);
561  }
562 
563 }
564 
565 UINT WINAPI GetStateTextA(DWORD state_bit, CHAR *state_str, UINT state_str_len)
566 {
567  DWORD state_id;
568 
569  TRACE("%x %p %u\n", state_bit, state_str, state_str_len);
570 
571  if(state_str && !state_str_len)
572  return 0;
573 
574  if(state_bit & ~(STATE_SYSTEM_VALID | STATE_SYSTEM_HASPOPUP)) {
575  if(state_str && state_str_len)
576  state_str[0] = 0;
577  return 0;
578  }
579 
580  state_id = IDS_STATE_NORMAL;
581  while(state_bit) {
582  state_id++;
583  state_bit /= 2;
584  }
585 
586  if(state_str) {
587  UINT ret = LoadStringA(oleacc_handle, state_id, state_str, state_str_len);
588  if(!ret && state_str_len)
589  state_str[0] = 0;
590  return ret;
591  }else {
592  CHAR tmp[256];
593  return LoadStringA(oleacc_handle, state_id, tmp, sizeof(tmp));
594  }
595 }
596 
598  LONG start, LONG count, VARIANT *children, LONG *children_cnt)
599 {
600  IEnumVARIANT *ev;
601  LONG i, child_no;
602  HRESULT hr;
603 
604  TRACE("%p %d %d %p %p\n", container, start, count, children, children_cnt);
605 
606  if(!container || !children || !children_cnt)
607  return E_INVALIDARG;
608 
609  for(i=0; i<count; i++)
610  VariantInit(children+i);
611 
612  hr = IAccessible_QueryInterface(container, &IID_IEnumVARIANT, (void**)&ev);
613  if(SUCCEEDED(hr)) {
614  hr = IEnumVARIANT_Reset(ev);
615  if(SUCCEEDED(hr))
616  hr = IEnumVARIANT_Skip(ev, start);
617  if(SUCCEEDED(hr))
618  hr = IEnumVARIANT_Next(ev, count, children, (ULONG*)children_cnt);
619  IEnumVARIANT_Release(ev);
620  return hr;
621  }
622 
623  hr = IAccessible_get_accChildCount(container, &child_no);
624  if(FAILED(hr))
625  return hr;
626 
627  for(i=0; i<count && start+i+1<=child_no; i++) {
628  IDispatch *disp;
629 
630  V_VT(children+i) = VT_I4;
631  V_I4(children+i) = start+i+1;
632 
633  hr = IAccessible_get_accChild(container, children[i], &disp);
634  if(SUCCEEDED(hr) && disp) {
635  V_VT(children+i) = VT_DISPATCH;
636  V_DISPATCH(children+i) = disp;
637  }
638  }
639 
640  *children_cnt = i;
641  return i==count ? S_OK : S_FALSE;
642 }
HRESULT WINAPI CoReleaseMarshalData(IStream *pStream)
Definition: marshal.c:2056
#define STATUSCLASSNAMEW
Definition: commctrl.h:1908
#define WC_IPADDRESSW
Definition: commctrl.h:4444
builtin_classes[]
Definition: main.c:62
ATOM WINAPI GlobalDeleteAtom(ATOM nAtom)
Definition: atom.c:454
disp
Definition: i386-dis.c:3181
const DOCKBAR PVOID HWND HWND * hwnd
Definition: tooldock.h:22
#define HRESULT
Definition: msvc.h:9
HRESULT WINAPI CoUnmarshalInterface(IStream *pStream, REFIID riid, LPVOID *ppv)
Definition: marshal.c:1982
#define DUPLICATE_CLOSE_SOURCE
#define ULongToHandle(h)
Definition: basetsd.h:81
HRESULT WINAPI WindowFromAccessibleObject(IAccessible *acc, HWND *phwnd)
Definition: main.c:368
#define REFIID
Definition: guiddef.h:118
#define TRUE
Definition: types.h:120
#define WC_TREEVIEWW
Definition: commctrl.h:3215
#define WC_EDITW
Definition: commctrl.h:4658
HGLOBAL NTAPI GlobalAlloc(UINT uFlags, SIZE_T dwBytes)
Definition: heapmem.c:368
#define CloseHandle
Definition: compat.h:398
static const WCHAR menuW[]
Definition: main.c:41
Definition: compat.h:1939
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
Definition: utclib.c:112
long y
Definition: polytest.cpp:48
#define MapViewOfFile
Definition: compat.h:402
#define WideCharToMultiByte
Definition: compat.h:101
HRESULT(WINAPI * accessible_create)(HWND, const IID *, void **)
Definition: main.c:50
HRESULT hr
Definition: shlfolder.c:183
BOOL WINAPI IsWindow(_In_opt_ HWND)
WINE_DEFAULT_DEBUG_CHANNEL(wmic)
long x
Definition: polytest.cpp:48
WORD ATOM
Definition: dimm.idl:113
static const WCHAR richedit20wW[]
Definition: main.c:48
REFIID riid
Definition: precomp.h:44
#define REFCLSID
Definition: guiddef.h:117
#define CP_ACP
Definition: compat.h:99
GLuint GLuint GLsizei count
Definition: gl.h:1545
UINT WINAPI RealGetWindowClassW(_In_ HWND hwnd, _Out_writes_to_(cchClassNameMax, return) LPWSTR ptszClassName, _In_ UINT cchClassNameMax)
char CHAR
Definition: xmlstorage.h:175
int WINAPI LoadStringA(_In_opt_ HINSTANCE hInstance, _In_ UINT uID, _Out_writes_to_(cchBufferMax, return+1) LPSTR lpBuffer, _In_ int cchBufferMax)
#define WARN(fmt,...)
Definition: debug.h:111
#define HandleToUlong(h)
Definition: basetsd.h:79
#define OBJID_WINDOW
Definition: winable.h:15
#define WC_LISTVIEWW
Definition: commctrl.h:2229
REFIID LPVOID * ppv
Definition: atlbase.h:39
#define TOOLBARCLASSNAMEW
Definition: commctrl.h:915
HANDLE HWND
Definition: compat.h:13
BOOL WINAPI DisableThreadLibraryCalls(IN HMODULE hLibModule)
Definition: loader.c:85
#define MONTHCAL_CLASSW
Definition: commctrl.h:4147
static accessible_create get_builtin_accessible_obj(HWND hwnd, LONG objid)
Definition: main.c:107
#define INVALID_HANDLE_VALUE
Definition: compat.h:391
const char * name
Definition: main.c:224
HRESULT create_window_object(HWND, const IID *, void **) DECLSPEC_HIDDEN
Definition: window.c:415
HRESULT WINAPI CreateStreamOnHGlobal(HGLOBAL hGlobal, BOOL fDeleteOnRelease, LPSTREAM *ppstm)
#define DLL_PROCESS_ATTACH
Definition: compat.h:120
UINT_PTR WPARAM
Definition: windef.h:207
void WINAPI VariantInit(VARIANTARG *pVarg)
Definition: variant.c:571
char * LPSTR
Definition: xmlstorage.h:182
#define E_FAIL
Definition: ddrawi.h:102
int WINAPI LoadStringW(_In_opt_ HINSTANCE hInstance, _In_ UINT uID, _Out_writes_to_(cchBufferMax, return+1) LPWSTR lpBuffer, _In_ int cchBufferMax)
int32_t INT
Definition: typedefs.h:56
HRESULT WINAPI CreateStdAccessibleObject(HWND hwnd, LONG idObject, REFIID riidInterface, void **ppvObject)
Definition: main.c:150
WPARAM wParam
Definition: combotst.c:138
static IN DWORD IN LPVOID lpvReserved
#define V_I4(A)
Definition: oleauto.h:247
#define V_DISPATCH(A)
Definition: oleauto.h:239
UINT WINAPI GetRoleTextA(DWORD role, LPSTR lpRole, UINT rolemax)
Definition: main.c:487
HRESULT WINAPI AccessibleObjectFromPoint(POINT ptScreen, IAccessible **ppacc, VARIANT *pvarChild)
Definition: main.c:339
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
HRESULT WINAPI ObjectFromLresult(LRESULT result, REFIID riid, WPARAM wParam, void **ppObject)
Definition: main.c:173
#define DUPLICATE_SAME_ACCESS
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
HRESULT WINAPI DllRegisterServer(void)
Definition: main.c:212
unsigned int BOOL
Definition: ntddk_ex.h:94
long LONG
Definition: pedump.c:60
HRESULT create_client_object(HWND hwnd, const IID *iid, void **obj)
Definition: client.c:626
static LPUNKNOWN
Definition: ndr_ole.c:49
HRESULT WINAPI DllUnregisterServer(void)
Definition: main.c:220
#define PROCESS_DUP_HANDLE
#define debugstr_w
Definition: kernel32.h:32
#define FIXME(fmt,...)
Definition: debug.h:110
static const WCHAR winswitchW[]
Definition: main.c:44
unsigned int idx
Definition: utils.c:41
HRESULT WINAPI AccessibleObjectFromWindow(HWND hwnd, DWORD dwObjectID, REFIID riid, void **ppvObject)
Definition: main.c:345
#define S_FALSE
Definition: winerror.h:2357
DWORD WINAPI GetWindowThreadProcessId(HWND, PDWORD)
#define E_INVALIDARG
Definition: ddrawi.h:101
#define MAKELONG(a, b)
Definition: typedefs.h:248
smooth NULL
Definition: ftsmooth.c:416
static const WCHAR mdi_clientW[]
Definition: main.c:45
#define FILE_MAP_READ
Definition: compat.h:427
#define debugstr_guid
Definition: kernel32.h:35
#define PROGRESS_CLASSW
Definition: commctrl.h:2148
UINT WINAPI GlobalGetAtomNameW(ATOM nAtom, LPWSTR lpBuffer, int nSize)
Definition: atom.c:496
#define OBJID_CLIENT
Definition: winable.h:19
#define TRACE(s)
Definition: solgame.cpp:4
GLsizeiptr size
Definition: glext.h:5919
HRESULT hres
Definition: protocol.c:465
#define PROCESS_VM_WRITE
Definition: pstypes.h:154
#define GetProcessHeap()
Definition: compat.h:395
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
r parent
Definition: btrfs.c:2897
__wchar_t WCHAR
Definition: xmlstorage.h:180
static const WCHAR dialogW[]
Definition: main.c:43
LONG HRESULT
Definition: typedefs.h:77
GLenum GLuint GLenum GLsizei length
Definition: glext.h:5579
#define CreateFileMappingW(a, b, c, d, e, f)
Definition: compat.h:401
HANDLE WINAPI GetCurrentProcess(VOID)
Definition: proc.c:1138
#define FILE_MAP_WRITE
Definition: winbase.h:154
#define WINAPI
Definition: msvc.h:8
#define WC_LISTBOXW
Definition: commctrl.h:4682
unsigned long DWORD
Definition: ntddk_ex.h:95
GLenum GLenum GLenum GLenum mapping
Definition: glext.h:9031
HGLOBAL NTAPI GlobalFree(HGLOBAL hMem)
Definition: heapmem.c:611
static HWND create_window(void)
Definition: imagelist.c:163
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
#define TOOLTIPS_CLASSW
Definition: commctrl.h:1679
HRESULT get_accpropservices_factory(REFIID, void **) DECLSPEC_HIDDEN
Definition: propservice.c:247
int convert_child_id(VARIANT *v)
Definition: main.c:96
UINT WINAPI GetStateTextA(DWORD state_bit, CHAR *state_str, UINT state_str_len)
Definition: main.c:565
int ret
static const WCHAR desktopW[]
Definition: main.c:42
#define ANIMATE_CLASSW
Definition: commctrl.h:4113
Definition: parse.h:22
#define GMEM_FIXED
Definition: winbase.h:290
GLuint GLuint stream
Definition: glext.h:7522
#define V_VT(A)
Definition: oleauto.h:211
#define WC_TABCONTROLW
Definition: commctrl.h:3907
Definition: stat.h:55
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
REFIID LPVOID * ppvObject
Definition: precomp.h:44
#define SYNCHRONIZE
Definition: nt_native.h:61
#define strcmpiW(s1, s2)
Definition: unicode.h:39
_CRTIMP int __cdecl stat(const char *_Filename, struct stat *_Stat)
Definition: stat.h:345
#define S_OK
Definition: intsafe.h:59
HANDLE WINAPI OpenProcess(IN DWORD dwDesiredAccess, IN BOOL bInheritHandle, IN DWORD dwProcessId)
Definition: proc.c:1227
#define DECLSPEC_HIDDEN
Definition: precomp.h:8
const GLdouble * v
Definition: gl.h:2040
#define DATETIMEPICK_CLASSW
Definition: commctrl.h:4294
GLuint start
Definition: gl.h:1545
#define ARRAY_SIZE(a)
Definition: main.h:24
#define WC_BUTTONW
Definition: commctrl.h:4595
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
HRESULT WINAPI AccessibleChildren(IAccessible *container, LONG start, LONG count, VARIANT *children, LONG *children_cnt)
Definition: main.c:597
#define E_NOTIMPL
Definition: ddrawi.h:99
#define sprintfW
Definition: unicode.h:58
#define IDS_STATE_NORMAL
Definition: resource.h:19
unsigned int UINT
Definition: ndis.h:50
HRESULT WINAPI OLEACC_DllGetClassObject(REFCLSID, REFIID, void **)
Definition: main.c:52
BOOL WINAPI IsEqualGUID(REFGUID rguid1, REFGUID rguid2)
Definition: compobj.c:4021
#define WC_SCROLLBARW
Definition: commctrl.h:4700
ATOM WINAPI GlobalAddAtomW(LPCWSTR lpString)
Definition: atom.c:444
UINT WINAPI GetStateTextW(DWORD state_bit, WCHAR *state_str, UINT state_str_len)
Definition: main.c:535
#define WC_STATICW
Definition: commctrl.h:4651
#define PROCESS_VM_READ
Definition: pstypes.h:153
#define TRACKBAR_CLASSW
Definition: commctrl.h:1983
Definition: name.c:36
const GUID IID_IOleWindow
UINT WINAPI GetRoleTextW(DWORD role, LPWSTR lpRole, UINT rolemax)
Definition: main.c:467
unsigned int ULONG
Definition: retypes.h:1
#define WC_HEADERW
Definition: commctrl.h:609
static HINSTANCE oleacc_handle
Definition: main.c:94
static IOleDocumentView * view
Definition: activex.c:1749
#define PROCESS_VM_OPERATION
Definition: pstypes.h:152
#define STATE_SYSTEM_VALID
Definition: winuser.h:2865
#define strtoulW(s1, s2, b)
Definition: unicode.h:41
void WINAPI GetOleaccVersionInfo(DWORD *pVersion, DWORD *pBuild)
Definition: main.c:444
GLfloat GLfloat p
Definition: glext.h:8902
WCHAR * LPWSTR
Definition: xmlstorage.h:184
LONG_PTR LRESULT
Definition: windef.h:209
HRESULT WINAPI CoMarshalInterface(IStream *pStream, REFIID riid, IUnknown *pUnk, DWORD dwDestContext, void *pvDestContext, DWORD mshlFlags)
Definition: marshal.c:1877
#define UPDOWN_CLASSW
Definition: commctrl.h:2091
#define HOTKEY_CLASSW
Definition: commctrl.h:2208
#define UnmapViewOfFile
Definition: compat.h:403
LRESULT WINAPI LresultFromObject(REFIID riid, WPARAM wParam, LPUNKNOWN pAcc)
Definition: main.c:245
GLuint64EXT * result
Definition: glext.h:11304
static const struct access_res create[16]
Definition: package.c:7720
HANDLE WINAPI GetProcessHandleFromHwnd(HWND hwnd)
Definition: main.c:455
static const WCHAR richedit20aW[]
Definition: main.c:47
#define HeapFree(x, y, z)
Definition: compat.h:394
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
DWORD WINAPI GetCurrentProcessId(VOID)
Definition: proc.c:1158
#define SUCCEEDED(hr)
Definition: intsafe.h:57
HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
Definition: main.c:166
BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved)
Definition: main.c:26
#define PAGE_READWRITE
Definition: nt_native.h:1304
static const WCHAR lresult_atom_prefix[]
Definition: main.c:39
static const WCHAR richeditW[]
Definition: main.c:46
#define WC_COMBOBOXW
Definition: commctrl.h:4688