ReactOS  0.4.14-dev-554-g2f8d847
main.c
Go to the documentation of this file.
1 /*
2  * oleacc tests
3  *
4  * Copyright 2008 Nikolay Sivov
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 "wine/test.h"
24 #include <stdio.h>
25 
26 #include "initguid.h"
27 #include <oleacc.h>
28 
29 #define DEFINE_EXPECT(func) \
30  static BOOL expect_ ## func = FALSE, called_ ## func = FALSE
31 
32 #define SET_EXPECT(func) \
33  do { called_ ## func = FALSE; expect_ ## func = TRUE; } while(0)
34 
35 #define CHECK_EXPECT2(func) \
36  do { \
37  ok(expect_ ##func, "unexpected call " #func "\n"); \
38  called_ ## func = TRUE; \
39  }while(0)
40 
41 #define CHECK_EXPECT(func) \
42  do { \
43  CHECK_EXPECT2(func); \
44  expect_ ## func = FALSE; \
45  }while(0)
46 
47 #define CHECK_CALLED(func) \
48  do { \
49  ok(called_ ## func, "expected " #func "\n"); \
50  expect_ ## func = called_ ## func = FALSE; \
51  }while(0)
52 
53 DEFINE_EXPECT(Accessible_QI_IEnumVARIANT);
56 
57 static HANDLE (WINAPI *pGetProcessHandleFromHwnd)(HWND);
58 
59 static BOOL init(void)
60 {
61  HMODULE oleacc = GetModuleHandleA("oleacc.dll");
62 
63  pGetProcessHandleFromHwnd = (void*)GetProcAddress(oleacc, "GetProcessHandleFromHwnd");
64  if(!pGetProcessHandleFromHwnd) {
65  win_skip("GetProcessHandleFromHwnd not available\n");
66  return FALSE;
67  }
68 
69  return TRUE;
70 }
71 
73  IAccessible *iface, REFIID riid, void **ppvObject)
74 {
75  if(IsEqualIID(riid, &IID_IEnumVARIANT)) {
76  CHECK_EXPECT(Accessible_QI_IEnumVARIANT);
77  return E_NOINTERFACE;
78  }
79 
80  ok(0, "unexpected QI call: %s\n", wine_dbgstr_guid(riid));
81  return E_NOTIMPL;
82 }
83 
85 {
86  return 2;
87 }
88 
90 {
91  return 1;
92 }
93 
95  IAccessible *iface, UINT *pctinfo)
96 {
97  ok(0, "unexpected call\n");
98  return E_NOTIMPL;
99 }
100 
102  UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
103 {
104  ok(0, "unexpected call\n");
105  return E_NOTIMPL;
106 }
107 
109  LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
110 {
111  ok(0, "unexpected call\n");
112  return E_NOTIMPL;
113 }
114 
115 static HRESULT WINAPI Accessible_Invoke(IAccessible *iface, DISPID dispIdMember,
116  REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams,
117  VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
118 {
119  ok(0, "unexpected call\n");
120  return E_NOTIMPL;
121 }
122 
124  IAccessible *iface, IDispatch **ppdispParent)
125 {
126  ok(0, "unexpected call\n");
127  return E_NOTIMPL;
128 }
129 
131  IAccessible *iface, LONG *pcountChildren)
132 {
134  *pcountChildren = 1;
135  return S_OK;
136 }
137 
139  VARIANT varChildID, IDispatch **ppdispChild)
140 {
142  ok(V_VT(&varChildID) == VT_I4, "V_VT(&varChildID) = %d\n", V_VT(&varChildID));
143  ok(V_I4(&varChildID) == 1, "V_I4(&varChildID) = %d\n", V_I4(&varChildID));
144 
145  *ppdispChild = NULL;
146  return S_OK;
147 }
148 
150  VARIANT varID, BSTR *pszName)
151 {
152  ok(0, "unexpected call\n");
153  return E_NOTIMPL;
154 }
155 
157  VARIANT varID, BSTR *pszValue)
158 {
159  ok(0, "unexpected call\n");
160  return E_NOTIMPL;
161 }
162 
164  VARIANT varID, BSTR *pszDescription)
165 {
166  ok(0, "unexpected call\n");
167  return E_NOTIMPL;
168 }
169 
171  VARIANT varID, VARIANT *pvarRole)
172 {
173  ok(0, "unexpected call\n");
174  return E_NOTIMPL;
175 }
176 
178  VARIANT varID, VARIANT *pvarState)
179 {
180  ok(0, "unexpected call\n");
181  return E_NOTIMPL;
182 }
183 
185  VARIANT varID, BSTR *pszHelp)
186 {
187  ok(0, "unexpected call\n");
188  return E_NOTIMPL;
189 }
190 
192  BSTR *pszHelpFile, VARIANT varID, LONG *pidTopic)
193 {
194  ok(0, "unexpected call\n");
195  return E_NOTIMPL;
196 }
197 
199  VARIANT varID, BSTR *pszKeyboardShortcut)
200 {
201  ok(0, "unexpected call\n");
202  return E_NOTIMPL;
203 }
204 
206 {
207  ok(0, "unexpected call\n");
208  return E_NOTIMPL;
209 }
210 
212  IAccessible *iface, VARIANT *pvarID)
213 {
214  ok(0, "unexpected call\n");
215  return E_NOTIMPL;
216 }
217 
219  VARIANT varID, BSTR *pszDefaultAction)
220 {
221  ok(0, "unexpected call\n");
222  return E_NOTIMPL;
223 }
224 
226  LONG flagsSelect, VARIANT varID)
227 {
228  ok(0, "unexpected call\n");
229  return E_NOTIMPL;
230 }
231 
233  LONG *pyTop, LONG *pcxWidth, LONG *pcyHeight, VARIANT varID)
234 {
235  ok(0, "unexpected call\n");
236  return E_NOTIMPL;
237 }
238 
240  LONG navDir, VARIANT varStart, VARIANT *pvarEnd)
241 {
242  ok(0, "unexpected call\n");
243  return E_NOTIMPL;
244 }
245 
247  LONG xLeft, LONG yTop, VARIANT *pvarID)
248 {
249  ok(0, "unexpected call\n");
250  return E_NOTIMPL;
251 }
252 
254  IAccessible *iface, VARIANT varID)
255 {
256  ok(0, "unexpected call\n");
257  return E_NOTIMPL;
258 }
259 
261  VARIANT varID, BSTR pszName)
262 {
263  ok(0, "unexpected call\n");
264  return E_NOTIMPL;
265 }
266 
268  VARIANT varID, BSTR pszValue)
269 {
270  ok(0, "unexpected call\n");
271  return E_NOTIMPL;
272 }
273 
274 static IAccessibleVtbl AccessibleVtbl = {
303 };
304 
306 
307 static void test_getroletext(void)
308 {
309  INT ret, role;
310  CHAR buf[2], *buff;
311  WCHAR bufW[2], *buffW;
312 
313  /* wrong role number */
314  ret = GetRoleTextA(-1, NULL, 0);
315  ok(ret == 0, "GetRoleTextA doesn't return zero on wrong role number, got %d\n", ret);
316  buf[0] = '*';
317  ret = GetRoleTextA(-1, buf, 2);
318  ok(ret == 0, "GetRoleTextA doesn't return zero on wrong role number, got %d\n", ret);
319  ok(buf[0] == 0, "GetRoleTextA doesn't return NULL char on wrong role number\n");
320  buf[0] = '*';
321  ret = GetRoleTextA(-1, buf, 0);
322  ok(ret == 0, "GetRoleTextA doesn't return zero on wrong role number, got %d\n", ret);
323  ok(buf[0] == '*', "GetRoleTextA modified buffer on wrong role number\n");
324 
325  ret = GetRoleTextW(-1, NULL, 0);
326  ok(ret == 0, "GetRoleTextW doesn't return zero on wrong role number, got %d\n", ret);
327  bufW[0] = '*';
328  ret = GetRoleTextW(-1, bufW, 2);
329  ok(ret == 0, "GetRoleTextW doesn't return zero on wrong role number, got %d\n", ret);
330  ok(bufW[0] == '\0', "GetRoleTextW doesn't return NULL char on wrong role number\n");
331  bufW[0] = '*';
332  ret = GetRoleTextW(-1, bufW, 0);
333  ok(ret == 0, "GetRoleTextW doesn't return zero on wrong role number, got %d\n", ret);
334 
335  /* zero role number - not documented */
336  ret = GetRoleTextA(0, NULL, 0);
337  ok(ret > 0, "GetRoleTextA doesn't return (>0) for zero role number, got %d\n", ret);
338  ret = GetRoleTextW(0, NULL, 0);
339  ok(ret > 0, "GetRoleTextW doesn't return (>0) for zero role number, got %d\n", ret);
340 
341  /* NULL buffer, return length */
342  ret = GetRoleTextA(ROLE_SYSTEM_TITLEBAR, NULL, 0);
343  ok(ret > 0, "GetRoleTextA doesn't return length on NULL buffer, got %d\n", ret);
344  ret = GetRoleTextA(ROLE_SYSTEM_TITLEBAR, NULL, 1);
345  ok(ret > 0, "GetRoleTextA doesn't return length on NULL buffer, got %d\n", ret);
346  ret = GetRoleTextW(ROLE_SYSTEM_TITLEBAR, NULL, 0);
347  ok(ret > 0, "GetRoleTextW doesn't return length on NULL buffer, got %d\n", ret);
348  ret = GetRoleTextW(ROLE_SYSTEM_TITLEBAR, NULL, 1);
349  ok(ret > 0, "GetRoleTextW doesn't return length on NULL buffer, got %d\n", ret);
350 
351  /* use a smaller buffer */
352  bufW[0] = '*';
353  ret = GetRoleTextA(ROLE_SYSTEM_TITLEBAR, buf, 0);
354  ok(!ret, "GetRoleTextA doesn't return 0, got %d\n", ret);
355  ok(buf[0] == '*', "GetRoleTextA modified buffer\n");
356  buffW = NULL;
357  ret = GetRoleTextW(ROLE_SYSTEM_TITLEBAR, (WCHAR*)&buffW, 0);
358  ok(ret, "GetRoleTextW doesn't return length\n");
359  ok(buffW != NULL, "GetRoleTextW doesn't modify buffer\n");
360  buf[0] = '*';
361  ret = GetRoleTextA(ROLE_SYSTEM_TITLEBAR, buf, 1);
362  ok(ret == 0, "GetRoleTextA returned wrong length\n");
363  ok(buf[0] == '\0', "GetRoleTextA returned not zero-length buffer\n");
364  buf[0] = '*';
365  ret = GetRoleTextA(ROLE_SYSTEM_TITLEBAR, buf, 2);
366  ok(!ret, "GetRoleTextA returned wrong length, got %d, expected 0\n", ret);
367  ok(!buf[0] || broken(buf[0]!='*') /* WinXP */,
368  "GetRoleTextA returned not zero-length buffer : (%c)\n", buf[0]);
369 
370  bufW[0] = '*';
371  ret = GetRoleTextW(ROLE_SYSTEM_TITLEBAR, bufW, 1);
372  ok(ret == 0, "GetRoleTextW returned wrong length, got %d, expected 1\n", ret);
373  ok(bufW[0] == '\0', "GetRoleTextW returned not zero-length buffer\n");
374  bufW[1] = '*';
375  ret = GetRoleTextW(ROLE_SYSTEM_TITLEBAR, bufW, 2);
376  ok(ret == 1, "GetRoleTextW returned wrong length, got %d, expected 1\n", ret);
377  ok(bufW[1] == '\0', "GetRoleTextW returned not zero-length buffer\n");
378 
379  /* use bigger buffer */
380  ret = GetRoleTextA(ROLE_SYSTEM_TITLEBAR, NULL, 0);
381  buff = HeapAlloc(GetProcessHeap(), 0, 2*ret);
382  buff[2*ret-1] = '*';
383  ret = GetRoleTextA(ROLE_SYSTEM_TITLEBAR, buff, 2*ret);
384  ok(buff[2*ret-1] == '*', "GetRoleTextA shouldn't modify this part of buffer\n");
386 
387  ret = GetRoleTextW(ROLE_SYSTEM_TITLEBAR, NULL, 0);
388  buffW = HeapAlloc(GetProcessHeap(), 0, 2*ret*sizeof(WCHAR));
389  buffW[2*ret-1] = '*';
390  ret = GetRoleTextW(ROLE_SYSTEM_TITLEBAR, buffW, 2*ret);
391  ok(buffW[2*ret-1] == '*', "GetRoleTextW shouldn't modify this part of buffer\n");
392  HeapFree(GetProcessHeap(), 0, buffW);
393 
394  /* check returned length for all roles */
395  for(role = 0; role <= ROLE_SYSTEM_OUTLINEBUTTON; role++){
396  CHAR buff2[100];
397  WCHAR buff2W[100];
398 
399  /* NT4 and W2K don't clear the buffer on a nonexistent role in the A-call */
400  memset(buff2, 0, sizeof(buff2));
401 
402  ret = GetRoleTextA(role, NULL, 0);
403  ok(ret > 0, "Expected the role to be present\n");
404 
405  GetRoleTextA(role, buff2, sizeof(buff2));
406  ok(ret == lstrlenA(buff2),
407  "GetRoleTextA: returned length doesn't match returned buffer for role %d\n", role);
408 
409  /* Win98 and WinMe don't clear the buffer on a nonexistent role in the W-call */
410  memset(buff2W, 0, sizeof(buff2W));
411 
412  ret = GetRoleTextW(role, NULL, 0);
413  GetRoleTextW(role, buff2W, ARRAY_SIZE(buff2W));
414  ok(ret == lstrlenW(buff2W),
415  "GetRoleTextW: returned length doesn't match returned buffer for role %d\n", role);
416  }
417 }
418 
419 static void test_GetStateText(void)
420 {
421  WCHAR buf[1024], buf2[1024];
422  char bufa[1024];
423  void *ptr;
424  UINT ret, ret2;
425  int i;
426 
427  ret2 = GetStateTextW(0, NULL, 1024);
428  ok(ret2, "GetStateText failed\n");
429 
430  ptr = NULL;
431  ret = GetStateTextW(0, (WCHAR*)&ptr, 0);
432  ok(ret == ret2, "got %d, expected %d\n", ret, ret2);
433  ok(ptr != NULL, "ptr was not changed\n");
434 
435  ret = GetStateTextW(0, buf, 1024);
436  ok(ret == ret2, "got %d, expected %d\n", ret, ret2);
437  ok(!memcmp(buf, ptr, ret*sizeof(WCHAR)), "got %s, expected %s\n",
439 
440  ret = GetStateTextW(0, buf, 1);
441  ok(!ret, "got %d, expected 0\n", ret);
442  ok(!buf[0], "buf[0] = '%c'\n", buf[0]);
443 
444  for(i=0; i<31; i++) {
445  ret = GetStateTextW(1<<i, buf, 1024);
446  ok(ret, "%d) GetStateText failed\n", i);
447  }
448  ret = GetStateTextW(1u<<31, buf, 1024);
449  ok(!ret, "31) GetStateText succeeded: %d\n", ret);
450 
451  ret = GetStateTextW(2, buf, 1024);
452  ok(ret, "GetStateText failed\n");
453  ret2 = GetStateTextW(3, buf2, 1024);
454  ok(ret2, "GetStateText failed\n");
455  ok(ret == ret2, "got %d, expected %d\n", ret2, ret);
456  ok(!memcmp(buf, buf2, ret*sizeof(WCHAR)),
457  "GetStateText(2,...) returned different data than GetStateText(3,...)\n");
458 
459  ret2 = GetStateTextA(0, NULL, 1024);
460  ok(ret2, "GetStateText failed\n");
461 
462  ptr = NULL;
463  ret = GetStateTextA(0, (CHAR*)&ptr, 0);
464  ok(!ret, "got %d\n", ret);
465  ok(ptr == NULL, "ptr was changed\n");
466 
467  ret = GetStateTextA(0, NULL, 0);
468  ok(ret == ret2, "got %d, expected %d\n", ret, ret2);
469 
470  ret = GetStateTextA(0, bufa, 1024);
471  ok(ret == ret2, "got %d, expected %d\n", ret, ret2);
472 
473  ret = GetStateTextA(0, bufa, 1);
474  ok(!ret, "got %d, expected 0\n", ret);
475  ok(!bufa[0], "bufa[0] = '%c'\n", bufa[0]);
476 
477  for(i=0; i<31; i++) {
478  ret = GetStateTextA(1<<i, bufa, 1024);
479  ok(ret, "%d) GetStateText failed\n", i);
480  }
481  ret = GetStateTextA(1u<<31, bufa, 1024);
482  ok(!ret, "31) GetStateText succeeded: %d\n", ret);
483 }
484 
485 static int Object_ref = 1;
487 {
488  if(IsEqualIID(riid, &IID_IUnknown)) {
489  *ppv = iface;
490  IUnknown_AddRef(iface);
491  return S_OK;
492  }
493  return E_NOINTERFACE;
494 }
495 
497 {
499 }
500 
502 {
504 }
505 
506 static IUnknownVtbl ObjectVtbl = {
510 };
511 
513 
514 static void test_LresultFromObject(const char *name)
515 {
518  char cmdline[MAX_PATH];
519  IUnknown *unk;
520  HRESULT hres;
521  LRESULT lres;
522 
523  lres = LresultFromObject(NULL, 0, 0);
524  ok(lres == E_INVALIDARG, "got %lx\n", lres);
525 
526  hres = ObjectFromLresult(0, &IID_IUnknown, 0, (void**)&unk);
527  ok(hres == E_FAIL, "got %x\n", hres);
528  hres = ObjectFromLresult(0x10000, &IID_IUnknown, 0, (void**)&unk);
529  ok(hres == E_FAIL, "got %x\n", hres);
530 
531  ok(Object_ref == 1, "Object_ref = %d\n", Object_ref);
532  lres = LresultFromObject(&IID_IUnknown, 0, &Object);
533  ok(SUCCEEDED(lres), "got %lx\n", lres);
534  ok(Object_ref > 1, "Object_ref = %d\n", Object_ref);
535 
536  hres = ObjectFromLresult(lres, &IID_IUnknown, 0, (void**)&unk);
537  ok(hres == S_OK, "hres = %x\n", hres);
538  ok(unk == &Object, "unk != &Object\n");
539  IUnknown_Release(unk);
540  ok(Object_ref == 1, "Object_ref = %d\n", Object_ref);
541 
542  lres = LresultFromObject(&IID_IUnknown, 0, &Object);
543  ok(SUCCEEDED(lres), "got %lx\n", lres);
544  ok(Object_ref > 1, "Object_ref = %d\n", Object_ref);
545 
546  sprintf(cmdline, "\"%s\" main ObjectFromLresult %s", name, wine_dbgstr_longlong(lres));
547  memset(&startup, 0, sizeof(startup));
548  startup.cb = sizeof(startup);
551  ok(Object_ref == 1, "Object_ref = %d\n", Object_ref);
552 }
553 
555 {
556  switch(msg) {
557  case WM_GETOBJECT:
558  if(lparam == OBJID_QUERYCLASSNAMEIDX) {
559  ok(!wparam, "wparam = %lx\n", wparam);
560  return 0;
561  }
562 
563  ok(wparam==0xffffffff, "wparam = %lx\n", wparam);
564  if(lparam == (DWORD)OBJID_CURSOR)
565  return E_UNEXPECTED;
566  if(lparam == (DWORD)OBJID_CLIENT)
568  if(lparam == (DWORD)OBJID_WINDOW)
569  return 0;
570 
571  ok(0, "unexpected (%ld)\n", lparam);
572  return 0;
573  }
574 
575  return DefWindowProcA(hwnd, msg, wparam, lparam);
576 }
577 
579 {
580  WNDCLASSA cls;
581 
582  memset(&cls, 0, sizeof(cls));
584  cls.lpszClassName = "oleacc_test";
586 
587  return RegisterClassA(&cls);
588 }
589 
590 static void unregister_window_class(void)
591 {
592  UnregisterClassA("oleacc_test", NULL);
593 }
594 
596 {
597  IUnknown *unk;
598  HRESULT hr;
599  HWND hwnd;
600 
602  ok(hr == E_INVALIDARG, "got %x\n", hr);
603 
605  todo_wine ok(hr == S_OK, "got %x\n", hr);
606  if(hr == S_OK) IUnknown_Release(unk);
607 
608  hwnd = CreateWindowA("oleacc_test", "test", WS_OVERLAPPEDWINDOW,
609  0, 0, 0, 0, NULL, NULL, NULL, NULL);
610  ok(hwnd != NULL, "CreateWindow failed\n");
611 
613  ok(hr == E_UNEXPECTED, "got %x\n", hr);
614 
615  ok(Object_ref == 1, "Object_ref = %d\n", Object_ref);
617  ok(hr == S_OK, "got %x\n", hr);
618  ok(Object_ref == 2, "Object_ref = %d\n", Object_ref);
619  IUnknown_Release(unk);
620 
622 }
623 
625 {
626  HANDLE proc;
627  HWND hwnd;
628 
629  proc = pGetProcessHandleFromHwnd(NULL);
630  ok(!proc, "proc = %p\n", proc);
631 
632  hwnd = CreateWindowA("static", "", 0, 0, 0, 0, 0, NULL, NULL, NULL, NULL);
633  ok(hwnd != NULL, "CreateWindow failed\n");
634 
635  proc = pGetProcessHandleFromHwnd(hwnd);
636  ok(proc != NULL, "proc == NULL\n");
637  CloseHandle(proc);
638 
640 }
641 
643 {
644  VARIANT children[3];
645  LONG count;
646  HRESULT hr;
647 
648  count = -1;
649  hr = AccessibleChildren(NULL, 0, 0, children, &count);
650  ok(hr == E_INVALIDARG, "AccessibleChildren returned %x\n", hr);
651  ok(count == -1, "count = %d\n", count);
652  hr = AccessibleChildren(acc, 0, 0, NULL, &count);
653  ok(hr == E_INVALIDARG, "AccessibleChildren returned %x\n", hr);
654  ok(count == -1, "count = %d\n", count);
655  hr = AccessibleChildren(acc, 0, 0, children, NULL);
656  ok(hr == E_INVALIDARG, "AccessibleChildren returned %x\n", hr);
657 
658  if(acc == &Accessible) {
659  SET_EXPECT(Accessible_QI_IEnumVARIANT);
661  }
662  hr = AccessibleChildren(acc, 0, 0, children, &count);
663  ok(hr == S_OK, "AccessibleChildren returned %x\n", hr);
664  if(acc == &Accessible) {
665  CHECK_CALLED(Accessible_QI_IEnumVARIANT);
667  }
668  ok(!count, "count = %d\n", count);
669  count = -1;
670  if(acc == &Accessible) {
671  SET_EXPECT(Accessible_QI_IEnumVARIANT);
673  }
674  hr = AccessibleChildren(acc, 5, 0, children, &count);
675  ok(hr == S_OK, "AccessibleChildren returned %x\n", hr);
676  if(acc == &Accessible) {
677  CHECK_CALLED(Accessible_QI_IEnumVARIANT);
679  }
680  ok(!count, "count = %d\n", count);
681 
682  memset(children, 0xfe, sizeof(children));
683  V_VT(children) = VT_DISPATCH;
684  if(acc == &Accessible) {
685  SET_EXPECT(Accessible_QI_IEnumVARIANT);
688  }
689  hr = AccessibleChildren(acc, 0, 1, children, &count);
690  ok(hr == S_OK, "AccessibleChildren returned %x\n", hr);
691  if(acc == &Accessible) {
692  CHECK_CALLED(Accessible_QI_IEnumVARIANT);
695 
696  ok(V_VT(children) == VT_I4, "V_VT(children) = %d\n", V_VT(children));
697  ok(V_I4(children) == 1, "V_I4(children) = %d\n", V_I4(children));
698  }else {
699  ok(V_VT(children) == VT_DISPATCH, "V_VT(children) = %d\n", V_VT(children));
700  IDispatch_Release(V_DISPATCH(children));
701  }
702  ok(count == 1, "count = %d\n", count);
703 
704  if(acc == &Accessible) {
705  SET_EXPECT(Accessible_QI_IEnumVARIANT);
708  }
709  hr = AccessibleChildren(acc, 0, 3, children, &count);
710  ok(hr == S_FALSE, "AccessibleChildren returned %x\n", hr);
711  if(acc == &Accessible) {
712  CHECK_CALLED(Accessible_QI_IEnumVARIANT);
715 
716  ok(V_VT(children) == VT_I4, "V_VT(children) = %d\n", V_VT(children));
717  ok(V_I4(children) == 1, "V_I4(children) = %d\n", V_I4(children));
718  }else {
719  ok(V_VT(children) == VT_DISPATCH, "V_VT(children) = %d\n", V_VT(children));
720  IDispatch_Release(V_DISPATCH(children));
721  }
722  ok(count == 1, "count = %d\n", count);
723  ok(V_VT(children+1) == VT_EMPTY, "V_VT(children+1) = %d\n", V_VT(children+1));
724  ok(V_VT(children+2) == VT_EMPTY, "V_VT(children+2) = %d\n", V_VT(children+2));
725 }
726 
728 {
729  static const WCHAR testW[] = {'t','e','s','t',' ','t',' ','&','j','u','n','k',0};
730  static const WCHAR shortcutW[] = {'A','l','t','+','t',0};
731 
732  IAccessible *acc;
733  IDispatch *disp;
734  IOleWindow *ow;
735  IEnumVARIANT *ev;
736  HWND chld, hwnd, hwnd2;
737  HRESULT hr;
738  VARIANT vid, v;
739  BSTR str;
740  POINT pt;
741  RECT rect;
742  LONG l, left, top, width, height;
743  ULONG fetched;
744 
745  hwnd = CreateWindowA("oleacc_test", "test &t &junk", WS_OVERLAPPEDWINDOW,
746  0, 0, 100, 100, NULL, NULL, NULL, NULL);
747  ok(hwnd != NULL, "CreateWindow failed\n");
748  chld = CreateWindowA("static", "message", WS_CHILD | WS_VISIBLE,
749  0, 0, 50, 50, hwnd, NULL, NULL, NULL);
750  ok(chld != NULL, "CreateWindow failed\n");
751 
752  hr = CreateStdAccessibleObject(NULL, OBJID_CLIENT, &IID_IAccessible, (void**)&acc);
753  ok(hr == E_FAIL, "got %x\n", hr);
754 
755  hr = CreateStdAccessibleObject(hwnd, OBJID_CLIENT, &IID_IAccessible, (void**)&acc);
756  ok(hr == S_OK, "got %x\n", hr);
757 
758  hr = IAccessible_QueryInterface(acc, &IID_IOleWindow, (void**)&ow);
759  ok(hr == S_OK, "got %x\n", hr);
760  hr = IOleWindow_GetWindow(ow, &hwnd2);
761  ok(hr == S_OK, "got %x\n", hr);
762  ok(hwnd == hwnd2, "hwnd2 = %p, expected %p\n", hwnd2, hwnd);
763  hr = WindowFromAccessibleObject(acc, &hwnd2);
764  ok(hr == S_OK, "got %x\n", hr);
765  ok(hwnd == hwnd2, "hwnd2 = %p, expected %p\n", hwnd2, hwnd);
766  IOleWindow_Release(ow);
767 
768  hr = IAccessible_get_accChildCount(acc, &l);
769  ok(hr == S_OK, "got %x\n", hr);
770  ok(l == 1, "l = %d\n", l);
771 
772  V_VT(&vid) = VT_I4;
773  V_I4(&vid) = CHILDID_SELF;
774  disp = (void*)0xdeadbeef;
775  hr = IAccessible_get_accChild(acc, vid, &disp);
776  ok(hr == E_INVALIDARG, "get_accChild returned %x\n", hr);
777  ok(disp == NULL, "disp = %p\n", disp);
778 
779  V_I4(&vid) = 1;
780  disp = (void*)0xdeadbeef;
781  hr = IAccessible_get_accChild(acc, vid, &disp);
782  ok(hr == E_INVALIDARG, "get_accChild returned %x\n", hr);
783  ok(disp == NULL, "disp = %p\n", disp);
784 
785  hr = IAccessible_QueryInterface(acc, &IID_IEnumVARIANT, (void**)&ev);
786  ok(hr == S_OK, "got %x\n", hr);
787 
788  hr = IEnumVARIANT_Skip(ev, 100);
789  ok(hr == S_FALSE, "Skip returned %x\n", hr);
790 
791  V_VT(&v) = VT_I4;
792  fetched = 1;
793  hr = IEnumVARIANT_Next(ev, 1, &v, &fetched);
794  ok(hr == S_FALSE, "got %x\n", hr);
795  ok(V_VT(&v) == VT_I4, "V_VT(&v) = %d\n", V_VT(&v));
796  ok(fetched == 0, "fetched = %d\n", fetched);
797 
798  hr = IEnumVARIANT_Reset(ev);
799  ok(hr == S_OK, "got %x\n", hr);
800 
801  V_VT(&v) = VT_I4;
802  fetched = 2;
803  hr = IEnumVARIANT_Next(ev, 1, &v, &fetched);
804  ok(hr == S_OK, "got %x\n", hr);
805  ok(V_VT(&v) == VT_DISPATCH, "V_VT(&v) = %d\n", V_VT(&v));
806  IDispatch_Release(V_DISPATCH(&v));
807  ok(fetched == 1, "fetched = %d\n", fetched);
808  IEnumVARIANT_Release(ev);
809 
811 
812  V_VT(&vid) = VT_I4;
813  V_I4(&vid) = CHILDID_SELF;
814  hr = IAccessible_get_accName(acc, vid, &str);
815  ok(hr == S_OK, "got %x\n", hr);
816  ok(!lstrcmpW(str, testW), "name = %s\n", wine_dbgstr_w(str));
818 
819  V_I4(&vid) = 1;
820  str = (void*)0xdeadbeef;
821  hr = IAccessible_get_accName(acc, vid, &str);
822  ok(hr == E_INVALIDARG, "got %x\n", hr);
823  ok(!str, "str != NULL\n");
824  V_I4(&vid) = CHILDID_SELF;
825 
826  str = (void*)0xdeadbeef;
827  hr = IAccessible_get_accValue(acc, vid, &str);
828  ok(hr == S_FALSE, "got %x\n", hr);
829  ok(!str, "str != NULL\n");
830 
831  str = (void*)0xdeadbeef;
832  hr = IAccessible_get_accDescription(acc, vid, &str);
833  ok(hr == S_FALSE, "got %x\n", hr);
834  ok(!str, "str != NULL\n");
835 
836  V_VT(&v) = VT_DISPATCH;
837  V_DISPATCH(&v) = (void*)0xdeadbeef;
838  hr = IAccessible_get_accRole(acc, vid, &v);
839  ok(hr == S_OK, "got %x\n", hr);
840  ok(V_VT(&v) == VT_I4, "V_VT(&v) = %d\n", V_VT(&v));
841  ok(V_I4(&v) == ROLE_SYSTEM_CLIENT, "V_I4(&v) = %d\n", V_I4(&v));
842 
843  V_VT(&v) = VT_DISPATCH;
844  V_DISPATCH(&v) = (void*)0xdeadbeef;
845  hr = IAccessible_get_accState(acc, vid, &v);
846  ok(hr == S_OK, "got %x\n", hr);
847  ok(V_VT(&v) == VT_I4, "V_VT(&v) = %d\n", V_VT(&v));
849  "V_I4(&v) = %x\n", V_I4(&v));
850 
851  str = (void*)0xdeadbeef;
852  hr = IAccessible_get_accHelp(acc, vid, &str);
853  ok(hr == S_FALSE, "got %x\n", hr);
854  ok(!str, "str != NULL\n");
855 
856  hr = IAccessible_get_accKeyboardShortcut(acc, vid, &str);
857  ok(hr == S_OK, "got %x\n", hr);
858  ok(!lstrcmpW(str, shortcutW), "str = %s\n", wine_dbgstr_w(str));
860 
861  str = (void*)0xdeadbeef;
862  hr = IAccessible_get_accDefaultAction(acc, vid, &str);
863  ok(hr == S_FALSE, "got %x\n", hr);
864  ok(!str, "str != NULL\n");
865 
866  pt.x = pt.y = 60;
867  ok(ClientToScreen(hwnd, &pt), "ClientToScreen failed\n");
868  hr = IAccessible_accHitTest(acc, pt.x, pt.y, &v);
869  ok(hr == S_OK, "got %x\n", hr);
870  ok(V_VT(&v) == VT_I4, "V_VT(&v) = %d\n", V_VT(&v));
871  ok(V_I4(&v) == 0, "V_I4(&v) = %d\n", V_I4(&v));
872 
873  pt.x = pt.y = 25;
874  ok(ClientToScreen(hwnd, &pt), "ClientToScreen failed\n");
875  hr = IAccessible_accHitTest(acc, pt.x, pt.y, &v);
876  ok(hr == S_OK, "got %x\n", hr);
877  ok(V_VT(&v) == VT_I4, "V_VT(&v) = %d\n", V_VT(&v));
878  ok(V_I4(&v) == 0, "V_I4(&v) = %d\n", V_I4(&v));
879 
880  ShowWindow(hwnd, TRUE);
881  pt.x = pt.y = 60;
882  ok(ClientToScreen(hwnd, &pt), "ClientToScreen failed\n");
883  hr = IAccessible_accHitTest(acc, pt.x, pt.y, &v);
884  ok(hr == S_OK, "got %x\n", hr);
885  ok(V_VT(&v) == VT_I4, "V_VT(&v) = %d\n", V_VT(&v));
886  ok(V_I4(&v) == 0, "V_I4(&v) = %d\n", V_I4(&v));
887 
888  pt.x = pt.y = 25;
889  ok(ClientToScreen(hwnd, &pt), "ClientToScreen failed\n");
890  hr = IAccessible_accHitTest(acc, pt.x, pt.y, &v);
891  ok(hr == S_OK, "got %x\n", hr);
892  ok(V_VT(&v) == VT_DISPATCH, "V_VT(&v) = %d\n", V_VT(&v));
893  ok(V_DISPATCH(&v) != NULL, "V_DISPATCH(&v) = %p\n", V_DISPATCH(&v));
894  VariantClear(&v);
895 
896  ShowWindow(chld, FALSE);
897  pt.x = pt.y = 25;
898  ok(ClientToScreen(hwnd, &pt), "ClientToScreen failed\n");
899  hr = IAccessible_accHitTest(acc, pt.x, pt.y, &v);
900  ok(hr == S_OK, "got %x\n", hr);
901  ok(V_VT(&v) == VT_I4, "V_VT(&v) = %d\n", V_VT(&v));
902  ok(V_I4(&v) == 0, "V_I4(&v) = %d\n", V_I4(&v));
903 
904  hr = IAccessible_get_accParent(acc, &disp);
905  ok(hr == S_OK, "got %x\n", hr);
906  ok(disp != NULL, "disp == NULL\n");
907  IDispatch_Release(disp);
908 
909  ok(GetClientRect(hwnd, &rect), "GetClientRect failed\n");
910  pt.x = rect.left;
911  pt.y = rect.top;
912  MapWindowPoints(hwnd, NULL, &pt, 1);
913  rect.left = pt.x;
914  rect.top = pt.y;
915  pt.x = rect.right;
916  pt.y = rect.bottom;
917  MapWindowPoints(hwnd, NULL, &pt, 1);
918  hr = IAccessible_accLocation(acc, &left, &top, &width, &height, vid);
919  ok(hr == S_OK, "got %x\n", hr);
920  ok(left == rect.left, "left = %d, expected %d\n", left, rect.left);
921  ok(top == rect.top, "top = %d, expected %d\n", top, rect.top);
922  ok(width == pt.x-rect.left, "width = %d, expected %d\n", width, pt.x-rect.left);
923  ok(height == pt.y-rect.top, "height = %d, expected %d\n", height, pt.y-rect.top);
924 
926 
927  hr = IAccessible_get_accChildCount(acc, &l);
928  ok(hr == S_OK, "got %x\n", hr);
929  ok(l == 0, "l = %d\n", l);
930 
931  hr = IAccessible_get_accName(acc, vid, &str);
932  ok(hr == E_INVALIDARG, "got %x\n", hr);
933 
934  hr = IAccessible_get_accValue(acc, vid, &str);
935  ok(hr == S_FALSE, "got %x\n", hr);
936 
937  hr = IAccessible_get_accRole(acc, vid, &v);
938  ok(hr == S_OK, "got %x\n", hr);
939  ok(V_VT(&v) == VT_I4, "V_VT(&v) = %d\n", V_VT(&v));
940  ok(V_I4(&v) == ROLE_SYSTEM_CLIENT, "V_I4(&v) = %d\n", V_I4(&v));
941 
942  hr = IAccessible_get_accState(acc, vid, &v);
943  ok(hr == S_OK, "got %x\n", hr);
944  ok(V_VT(&v) == VT_I4, "V_VT(&v) = %d\n", V_VT(&v));
945  ok(V_I4(&v) == STATE_SYSTEM_INVISIBLE, "V_I4(&v) = %x\n", V_I4(&v));
946 
947  hr = IAccessible_accHitTest(acc, 200, 200, &v);
948  ok(hr == S_OK, "got %x\n", hr);
949  ok(V_VT(&v) == VT_I4, "V_VT(&v) = %d\n", V_VT(&v));
950  ok(V_I4(&v) == 0, "V_I4(&v) = %d\n", V_I4(&v));
951 
952  disp = (void*)0xdeadbeef;
953  hr = IAccessible_get_accParent(acc, &disp);
954  ok(hr == E_FAIL, "got %x\n", hr);
955  ok(disp == NULL, "disp = %p\n", disp);
956 
957  hr = IAccessible_accLocation(acc, &left, &top, &width, &height, vid);
958  ok(hr == S_OK, "got %x\n", hr);
959  ok(left == 0, "left = %d\n", left);
960  ok(top == 0, "top = %d\n", top);
961  ok(width == 0, "width = %d\n", width);
962  ok(height == 0, "height = %d\n", height);
963 
964  IAccessible_Release(acc);
965 }
966 
967 static void test_CAccPropServices(void)
968 {
969  IAccPropServices *acc_prop_services;
970  HRESULT hres;
971 
972  hres = CoCreateInstance(&CLSID_CAccPropServices, NULL, CLSCTX_INPROC_SERVER|CLSCTX_INPROC_HANDLER,
973  &IID_IAccPropServices, (void**)&acc_prop_services);
974  ok(hres == S_OK, "Could not create CAccPropServices instance: %08x\n", hres);
975 
976  IAccPropServices_Release(acc_prop_services);
977 }
978 
980 {
981  int argc;
982  char **argv;
983 
984  if(!init())
985  return;
986 
988 
990  if(argc == 4 && !strcmp(argv[2], "ObjectFromLresult")) {
991  IUnknown *unk;
992  HRESULT hres;
993  LRESULT lres;
994 
995  lres = _strtoi64( argv[3], NULL, 16 );
996  hres = ObjectFromLresult(lres, &IID_IUnknown, 0, (void**)&unk);
997  ok(hres == S_OK, "hres = %x\n", hres);
998  IUnknown_Release(unk);
999 
1000  CoUninitialize();
1001  return;
1002  }
1003 
1004  if(!register_window_class()) {
1005  skip("can't register test window class\n");
1006  return;
1007  }
1008 
1009  test_getroletext();
1016 
1018  CoUninitialize();
1019 
1020  CoInitialize(NULL);
1022  CoUninitialize();
1023 }
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 * u
Definition: glfuncs.h:240
static void test_LresultFromObject(const char *name)
Definition: main.c:514
disp
Definition: i386-dis.c:3181
const DOCKBAR PVOID HWND HWND * hwnd
Definition: tooldock.h:22
static int argc
Definition: ServiceArgs.c:12
GLint GLint GLsizei width
Definition: gl.h:1546
HRESULT WINAPI WindowFromAccessibleObject(IAccessible *acc, HWND *phwnd)
Definition: main.c:372
static LRESULT WINAPI test_window_proc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam)
Definition: main.c:554
#define REFIID
Definition: guiddef.h:118
#define TRUE
Definition: types.h:120
#define CloseHandle
Definition: compat.h:406
#define E_NOINTERFACE
Definition: winerror.h:2364
#define STATE_SYSTEM_FOCUSABLE
Definition: winuser.h:2857
Definition: compat.h:1947
static int Object_ref
Definition: main.c:485
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
Definition: utclib.c:112
static HRESULT WINAPI Accessible_get_accKeyboardShortcut(IAccessible *iface, VARIANT varID, BSTR *pszKeyboardShortcut)
Definition: main.c:198
int WINAPI MapWindowPoints(_In_opt_ HWND hWndFrom, _In_opt_ HWND hWndTo, _Inout_updates_(cPoints) LPPOINT lpPoints, _In_ UINT cPoints)
BOOL WINAPI ClientToScreen(_In_ HWND, _Inout_ LPPOINT)
HRESULT hr
Definition: shlfolder.c:183
#define OBJID_CURSOR
Definition: winable.h:24
static HRESULT WINAPI Accessible_Invoke(IAccessible *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
Definition: main.c:115
#define CHECK_EXPECT(func)
Definition: main.c:41
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
static HRESULT WINAPI Accessible_get_accSelection(IAccessible *iface, VARIANT *pvarID)
Definition: main.c:211
#define pt(x, y)
Definition: drawing.c:79
REFIID riid
Definition: precomp.h:44
char * wine_dbgstr_w(const wchar_t *wstr)
Definition: atltest.h:87
static HRESULT WINAPI Accessible_get_accHelpTopic(IAccessible *iface, BSTR *pszHelpFile, VARIANT varID, LONG *pidTopic)
Definition: main.c:191
static HRESULT WINAPI Accessible_get_accValue(IAccessible *iface, VARIANT varID, BSTR *pszValue)
Definition: main.c:156
int WINAPI lstrcmpW(LPCWSTR lpString1, LPCWSTR lpString2)
Definition: lstring.c:170
static ULONG WINAPI Object_AddRef(IUnknown *iface)
Definition: main.c:496
GLuint GLuint GLsizei count
Definition: gl.h:1545
char CHAR
Definition: xmlstorage.h:175
_Check_return_ __MINGW_EXTENSION _CRTIMP __int64 __cdecl _strtoi64(_In_z_ const char *_String, _Out_opt_ _Deref_post_z_ char **_EndPtr, _In_ int _Radix)
#define OBJID_WINDOW
Definition: winable.h:15
#define SET_EXPECT(func)
Definition: main.c:32
static HRESULT WINAPI Accessible_get_accFocus(IAccessible *iface, VARIANT *pvarID)
Definition: main.c:205
REFIID LPVOID * ppv
Definition: atlbase.h:39
HANDLE HWND
Definition: compat.h:13
static HRESULT WINAPI Accessible_GetTypeInfoCount(IAccessible *iface, UINT *pctinfo)
Definition: main.c:94
START_TEST(main)
Definition: main.c:511
const char * wine_dbgstr_guid(const GUID *guid)
static HRESULT WINAPI Accessible_accLocation(IAccessible *iface, LONG *pxLeft, LONG *pyTop, LONG *pcxWidth, LONG *pcyHeight, VARIANT varID)
Definition: main.c:232
int startup(int argc, const char *argv[])
Definition: startup.c:430
static HRESULT WINAPI Accessible_get_accHelp(IAccessible *iface, VARIANT varID, BSTR *pszHelp)
Definition: main.c:184
DWORD LCID
Definition: nls.h:13
UINT_PTR WPARAM
Definition: windef.h:207
static HANDLE proc()
Definition: pdb.c:32
#define WS_CHILD
Definition: pedump.c:617
OLECHAR * BSTR
Definition: compat.h:1942
TCHAR * cmdline
Definition: stretchblt.cpp:32
BOOL WINAPI ShowWindow(_In_ HWND, _In_ int)
#define argv
Definition: mplay32.c:18
static LPOLESTR
Definition: stg_prop.c:27
#define lstrlenW
Definition: compat.h:415
#define E_FAIL
Definition: ddrawi.h:102
BOOL WINAPI DestroyWindow(_In_ HWND)
int32_t INT
Definition: typedefs.h:56
HRESULT WINAPI CreateStdAccessibleObject(HWND hwnd, LONG idObject, REFIID riidInterface, void **ppvObject)
Definition: main.c:154
& rect
Definition: startmenu.cpp:1413
#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:491
#define sprintf(buf, format,...)
Definition: sprintf.c:55
static HRESULT WINAPI Object_QueryInterface(IUnknown *iface, REFIID riid, void **ppv)
Definition: main.c:486
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:177
static ULONG WINAPI Object_Release(IUnknown *iface)
Definition: main.c:501
#define DEFINE_EXPECT(func)
Definition: main.c:29
static void test_getroletext(void)
Definition: main.c:307
static void test_AccessibleChildren(IAccessible *acc)
Definition: main.c:642
unsigned int BOOL
Definition: ntddk_ex.h:94
long LONG
Definition: pedump.c:60
static UINT WPARAM LPARAM lparam
Definition: combo.c:716
static PVOID ptr
Definition: dispmode.c:27
#define CreateWindowA(a, b, c, d, e, f, g, h, i, j, k)
Definition: winuser.h:4290
static HRESULT WINAPI Accessible_get_accChildCount(IAccessible *iface, LONG *pcountChildren)
Definition: main.c:130
#define CHILDID_SELF
Definition: winable.h:14
HRESULT WINAPI AccessibleObjectFromWindow(HWND hwnd, DWORD dwObjectID, REFIID riid, void **ppvObject)
Definition: main.c:349
#define S_FALSE
Definition: winerror.h:2357
static HRESULT WINAPI Accessible_GetTypeInfo(IAccessible *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
Definition: main.c:101
#define E_INVALIDARG
Definition: ddrawi.h:101
const WCHAR * str
smooth NULL
Definition: ftsmooth.c:416
#define CHECK_CALLED(func)
Definition: main.c:47
LONG_PTR LPARAM
Definition: windef.h:208
static HANDLE(WINAPI *pGetProcessHandleFromHwnd)(HWND)
static HRESULT WINAPI Accessible_get_accDefaultAction(IAccessible *iface, VARIANT varID, BSTR *pszDefaultAction)
Definition: main.c:218
static HRESULT WINAPI Accessible_accHitTest(IAccessible *iface, LONG xLeft, LONG yTop, VARIANT *pvarID)
Definition: main.c:246
static ULONG WINAPI Accessible_Release(IAccessible *iface)
Definition: main.c:89
r l[0]
Definition: byte_order.h:167
static IAccessibleVtbl AccessibleVtbl
Definition: main.c:274
#define OBJID_CLIENT
Definition: winable.h:19
static HRESULT WINAPI Accessible_accNavigate(IAccessible *iface, LONG navDir, VARIANT varStart, VARIANT *pvarEnd)
Definition: main.c:239
HRESULT hres
Definition: protocol.c:465
#define GetProcessHeap()
Definition: compat.h:403
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
__wchar_t WCHAR
Definition: xmlstorage.h:180
LONG HRESULT
Definition: typedefs.h:77
const GUID IID_IUnknown
BOOL WINAPI DECLSPEC_HOTPATCH CreateProcessA(LPCSTR lpApplicationName, LPSTR lpCommandLine, LPSECURITY_ATTRIBUTES lpProcessAttributes, LPSECURITY_ATTRIBUTES lpThreadAttributes, BOOL bInheritHandles, DWORD dwCreationFlags, LPVOID lpEnvironment, LPCSTR lpCurrentDirectory, LPSTARTUPINFOA lpStartupInfo, LPPROCESS_INFORMATION lpProcessInformation)
Definition: proc.c:4742
#define MAX_PATH
Definition: compat.h:26
#define WINAPI
Definition: msvc.h:8
static void test_CAccPropServices(void)
Definition: main.c:967
static HRESULT WINAPI Accessible_get_accState(IAccessible *iface, VARIANT varID, VARIANT *pvarState)
Definition: main.c:177
unsigned short WORD
Definition: ntddk_ex.h:93
unsigned long DWORD
Definition: ntddk_ex.h:95
GLint left
Definition: glext.h:7726
static HRESULT WINAPI Accessible_QueryInterface(IAccessible *iface, REFIID riid, void **ppvObject)
Definition: main.c:72
int winetest_get_mainargs(char ***pargv)
static IUnknown Object
Definition: main.c:512
static HRESULT WINAPI Accessible_get_accParent(IAccessible *iface, IDispatch **ppdispParent)
Definition: main.c:123
int main(int argc, const char *argv[])
Definition: main.c:122
static IAccessible Accessible
Definition: main.c:305
UINT WINAPI GetStateTextA(DWORD state_bit, CHAR *state_str, UINT state_str_len)
Definition: main.c:569
int ret
static BOOL init(void)
Definition: main.c:59
HRESULT WINAPI DECLSPEC_HOTPATCH VariantClear(VARIANTARG *pVarg)
Definition: variant.c:648
#define todo_wine
Definition: test.h:163
#define InterlockedDecrement
Definition: armddk.h:52
#define V_VT(A)
Definition: oleauto.h:211
static HRESULT WINAPI Accessible_get_accName(IAccessible *iface, VARIANT varID, BSTR *pszName)
Definition: main.c:149
HMODULE WINAPI DECLSPEC_HOTPATCH GetModuleHandleA(LPCSTR lpModuleName)
Definition: loader.c:821
REFIID LPVOID * ppvObject
Definition: precomp.h:44
const char * wine_dbgstr_wn(const WCHAR *str, int n)
Definition: compat.c:342
LRESULT WINAPI DefWindowProcA(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
LPCSTR lpszClassName
Definition: winuser.h:3147
static HRESULT WINAPI Accessible_get_accDescription(IAccessible *iface, VARIANT varID, BSTR *pszDescription)
Definition: main.c:163
GLint GLint GLsizei GLsizei height
Definition: gl.h:1546
#define broken(x)
Definition: _sntprintf.h:21
static HRESULT WINAPI Accessible_accDoDefaultAction(IAccessible *iface, VARIANT varID)
Definition: main.c:253
void winetest_wait_child_process(HANDLE process)
HRESULT WINAPI DECLSPEC_HOTPATCH CoCreateInstance(REFCLSID rclsid, LPUNKNOWN pUnkOuter, DWORD dwClsContext, REFIID iid, LPVOID *ppv)
Definition: compobj.c:3325
static HRESULT WINAPI Accessible_put_accValue(IAccessible *iface, VARIANT varID, BSTR pszValue)
Definition: main.c:267
_In_ DWORD _Out_ _In_ WORD wFlags
Definition: wincon.h:519
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
struct stdole::EXCEPINFO EXCEPINFO
#define S_OK
Definition: intsafe.h:59
static VARIANTARG static DISPID
Definition: ordinal.c:49
int WINAPI lstrlenA(LPCSTR lpString)
Definition: lstring.c:145
#define InterlockedIncrement
Definition: armddk.h:53
const GLdouble * v
Definition: gl.h:2040
HINSTANCE hInstance
Definition: winuser.h:3142
void WINAPI DECLSPEC_HOTPATCH CoUninitialize(void)
Definition: compobj.c:2067
#define ARRAY_SIZE(a)
Definition: main.h:24
#define ok(value,...)
Definition: atltest.h:57
HRESULT WINAPI AccessibleChildren(IAccessible *container, LONG start, LONG count, VARIANT *children, LONG *children_cnt)
Definition: main.c:601
#define E_NOTIMPL
Definition: ddrawi.h:99
static BOOL register_window_class(void)
Definition: main.c:578
static HRESULT WINAPI Accessible_put_accName(IAccessible *iface, VARIANT varID, BSTR pszName)
Definition: main.c:260
HRESULT WINAPI DECLSPEC_HOTPATCH CoInitializeEx(LPVOID lpReserved, DWORD dwCoInit)
Definition: compobj.c:2002
void WINAPI DECLSPEC_HOTPATCH SysFreeString(BSTR str)
Definition: oleaut.c:271
unsigned int UINT
Definition: ndis.h:50
static void test_default_client_accessible_object(void)
Definition: main.c:727
static void test_AccessibleObjectFromWindow(void)
Definition: main.c:595
UINT WINAPI GetStateTextW(DWORD state_bit, WCHAR *state_str, UINT state_str_len)
Definition: main.c:539
static IUnknownVtbl ObjectVtbl
Definition: main.c:506
#define E_UNEXPECTED
Definition: winerror.h:2456
WNDPROC lpfnWndProc
Definition: winuser.h:3139
#define skip(...)
Definition: atltest.h:64
static HRESULT WINAPI Accessible_GetIDsOfNames(IAccessible *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
Definition: main.c:108
HRESULT WINAPI CoInitialize(LPVOID lpReserved)
Definition: compobj.c:1964
#define msg(x)
Definition: auth_time.c:54
static void test_GetProcessHandleFromHwnd(void)
Definition: main.c:624
Definition: name.c:38
struct stdole::DISPPARAMS DISPPARAMS
const GUID IID_IOleWindow
#define WS_OVERLAPPEDWINDOW
Definition: pedump.c:637
UINT WINAPI GetRoleTextW(DWORD role, LPWSTR lpRole, UINT rolemax)
Definition: main.c:471
unsigned int ULONG
Definition: retypes.h:1
static __inline const char * wine_dbgstr_longlong(ULONGLONG ll)
Definition: compat.h:41
int strcmp(const char *String1, const char *String2)
Definition: utclib.c:469
static HRESULT WINAPI Accessible_get_accRole(IAccessible *iface, VARIANT varID, VARIANT *pvarRole)
Definition: main.c:170
#define GetProcAddress(x, y)
Definition: compat.h:418
BOOL WINAPI UnregisterClassA(_In_ LPCSTR, HINSTANCE)
GLdouble GLdouble GLdouble GLdouble top
Definition: glext.h:10859
static void unregister_window_class(void)
Definition: main.c:590
static HRESULT WINAPI Accessible_get_accChild(IAccessible *iface, VARIANT varChildID, IDispatch **ppdispChild)
Definition: main.c:138
static void test_GetStateText(void)
Definition: main.c:419
LONG_PTR LRESULT
Definition: windef.h:209
static ULONG WINAPI Accessible_AddRef(IAccessible *iface)
Definition: main.c:84
LRESULT WINAPI LresultFromObject(REFIID riid, WPARAM wParam, LPUNKNOWN pAcc)
Definition: main.c:249
static const WCHAR testW[]
Definition: main.c:223
#define WS_VISIBLE
Definition: pedump.c:620
#define memset(x, y, z)
Definition: compat.h:39
#define win_skip
Definition: test.h:150
static HRESULT WINAPI Accessible_accSelect(IAccessible *iface, LONG flagsSelect, VARIANT varID)
Definition: main.c:225
static unsigned char buff[32768]
Definition: fatten.c:17
#define HeapFree(x, y, z)
Definition: compat.h:402
ATOM WINAPI RegisterClassA(_In_ CONST WNDCLASSA *)
#define IsEqualIID(riid1, riid2)
Definition: guiddef.h:95
#define STATE_SYSTEM_INVISIBLE
Definition: winuser.h:2852
#define SUCCEEDED(hr)
Definition: intsafe.h:57
static UINT WPARAM wparam
Definition: combo.c:716