ReactOS 0.4.15-dev-8222-g9164419
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
53DEFINE_EXPECT(Accessible_QI_IEnumVARIANT);
56
57static HANDLE (WINAPI *pGetProcessHandleFromHwnd)(HWND);
58
59static 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
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
274static IAccessibleVtbl AccessibleVtbl = {
303};
304
306
307static 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
419static 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
485static int Object_ref = 1;
487{
489 *ppv = iface;
490 IUnknown_AddRef(iface);
491 return S_OK;
492 }
493 return E_NOINTERFACE;
494}
495
497{
499}
500
502{
504}
505
506static IUnknownVtbl ObjectVtbl = {
510};
511
513
514static void test_LresultFromObject(const char *name)
515{
518 char cmdline[MAX_PATH];
519 IUnknown *unk;
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);
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
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);
565 return E_UNEXPECTED;
569 return 0;
570
571 ok(0, "unexpected (%ld)\n", lparam);
572 return 0;
573 }
574
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
590static 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");
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;
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
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;
913 rect.left = pt.x;
914 rect.top = pt.y;
915 pt.x = rect.right;
916 pt.y = rect.bottom;
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
967static void test_CAccPropServices(void)
968{
969 IAccPropServices *acc_prop_services;
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;
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
1001 return;
1002 }
1003
1004 if(!register_window_class()) {
1005 skip("can't register test window class\n");
1006 return;
1007 }
1008
1016
1019
1023}
static int argc
Definition: ServiceArgs.c:12
@ lparam
Definition: SystemMenu.c:31
@ wparam
Definition: SystemMenu.c:30
#define broken(x)
Definition: _sntprintf.h:21
int strcmp(const char *String1, const char *String2)
Definition: utclib.c:469
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
Definition: utclib.c:112
static void startup(void)
#define InterlockedIncrement
Definition: armddk.h:53
#define InterlockedDecrement
Definition: armddk.h:52
#define ok(value,...)
Definition: atltest.h:57
#define skip(...)
Definition: atltest.h:64
#define START_TEST(x)
Definition: atltest.h:75
#define msg(x)
Definition: auth_time.c:54
#define ARRAY_SIZE(A)
Definition: main.h:33
const GUID IID_IUnknown
r l[0]
Definition: byte_order.h:168
#define E_INVALIDARG
Definition: ddrawi.h:101
#define E_NOTIMPL
Definition: ddrawi.h:99
#define E_FAIL
Definition: ddrawi.h:102
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
const char * wine_dbgstr_wn(const WCHAR *str, int n)
Definition: compat.c:367
#define CloseHandle
Definition: compat.h:739
#define GetProcessHeap()
Definition: compat.h:736
HANDLE HWND
Definition: compat.h:19
#define GetProcAddress(x, y)
Definition: compat.h:753
#define HeapAlloc
Definition: compat.h:733
static __inline const char * wine_dbgstr_longlong(ULONGLONG ll)
Definition: compat.h:49
OLECHAR * BSTR
Definition: compat.h:2293
#define MAX_PATH
Definition: compat.h:34
#define HeapFree(x, y, z)
Definition: compat.h:735
@ VT_I4
Definition: compat.h:2298
@ VT_EMPTY
Definition: compat.h:2295
@ VT_DISPATCH
Definition: compat.h:2304
#define lstrlenW
Definition: compat.h:750
HMODULE WINAPI DECLSPEC_HOTPATCH GetModuleHandleA(LPCSTR lpModuleName)
Definition: loader.c:812
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:4741
int WINAPI lstrcmpW(LPCWSTR str1, LPCWSTR str2)
Definition: locale.c:4242
HRESULT WINAPI DECLSPEC_HOTPATCH CoCreateInstance(REFCLSID rclsid, LPUNKNOWN pUnkOuter, DWORD dwClsContext, REFIID iid, LPVOID *ppv)
Definition: compobj.c:3325
HRESULT WINAPI DECLSPEC_HOTPATCH CoInitializeEx(LPVOID lpReserved, DWORD dwCoInit)
Definition: compobj.c:2002
HRESULT WINAPI CoInitialize(LPVOID lpReserved)
Definition: compobj.c:1964
void WINAPI DECLSPEC_HOTPATCH CoUninitialize(void)
Definition: compobj.c:2067
LRESULT WINAPI LresultFromObject(REFIID riid, WPARAM wParam, LPUNKNOWN pAcc)
Definition: main.c:249
HRESULT WINAPI AccessibleObjectFromWindow(HWND hwnd, DWORD dwObjectID, REFIID riid, void **ppvObject)
Definition: main.c:349
HRESULT WINAPI ObjectFromLresult(LRESULT result, REFIID riid, WPARAM wParam, void **ppObject)
Definition: main.c:177
UINT WINAPI GetStateTextW(DWORD state_bit, WCHAR *state_str, UINT state_str_len)
Definition: main.c:539
UINT WINAPI GetStateTextA(DWORD state_bit, CHAR *state_str, UINT state_str_len)
Definition: main.c:569
HRESULT WINAPI AccessibleChildren(IAccessible *container, LONG start, LONG count, VARIANT *children, LONG *children_cnt)
Definition: main.c:601
UINT WINAPI GetRoleTextA(DWORD role, LPSTR lpRole, UINT rolemax)
Definition: main.c:491
HRESULT WINAPI WindowFromAccessibleObject(IAccessible *acc, HWND *phwnd)
Definition: main.c:372
HRESULT WINAPI CreateStdAccessibleObject(HWND hwnd, LONG idObject, REFIID riidInterface, void **ppvObject)
Definition: main.c:154
UINT WINAPI GetRoleTextW(DWORD role, LPWSTR lpRole, UINT rolemax)
Definition: main.c:471
#define pt(x, y)
Definition: drawing.c:79
int main()
Definition: test.c:6
static unsigned char buff[32768]
Definition: fatten.c:17
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
unsigned short WORD
Definition: ntddk_ex.h:93
const GLdouble * v
Definition: gl.h:2040
GLuint GLuint GLsizei count
Definition: gl.h:1545
GLint GLint GLsizei GLsizei height
Definition: gl.h:1546
GLint GLint GLsizei width
Definition: gl.h:1546
GLdouble GLdouble GLdouble GLdouble top
Definition: glext.h:10859
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
GLint left
Definition: glext.h:7726
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
REFIID riid
Definition: atlbase.h:39
REFIID LPVOID * ppv
Definition: atlbase.h:39
#define S_OK
Definition: intsafe.h:52
#define SUCCEEDED(hr)
Definition: intsafe.h:50
static const WCHAR testW[]
Definition: jsregexp.c:44
#define wine_dbgstr_w
Definition: kernel32.h:34
int WINAPI lstrlenA(LPCSTR lpString)
Definition: lstring.c:145
static PVOID ptr
Definition: dispmode.c:27
#define sprintf(buf, format,...)
Definition: sprintf.c:55
HRESULT hres
Definition: protocol.c:465
#define todo_wine
Definition: custom.c:79
static LPOLESTR
Definition: stg_prop.c:27
#define SET_EXPECT(func)
Definition: main.c:32
static void test_GetProcessHandleFromHwnd(void)
Definition: main.c:624
static HRESULT WINAPI Accessible_accHitTest(IAccessible *iface, LONG xLeft, LONG yTop, VARIANT *pvarID)
Definition: main.c:246
static LRESULT WINAPI test_window_proc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam)
Definition: main.c:554
static HRESULT WINAPI Accessible_get_accParent(IAccessible *iface, IDispatch **ppdispParent)
Definition: main.c:123
static ULONG WINAPI Object_AddRef(IUnknown *iface)
Definition: main.c:496
static void test_LresultFromObject(const char *name)
Definition: main.c:514
static HRESULT WINAPI Accessible_get_accChildCount(IAccessible *iface, LONG *pcountChildren)
Definition: main.c:130
static HRESULT WINAPI Accessible_accLocation(IAccessible *iface, LONG *pxLeft, LONG *pyTop, LONG *pcxWidth, LONG *pcyHeight, VARIANT varID)
Definition: main.c:232
static BOOL register_window_class(void)
Definition: main.c:578
#define CHECK_EXPECT(func)
Definition: main.c:41
static HRESULT WINAPI Accessible_get_accRole(IAccessible *iface, VARIANT varID, VARIANT *pvarRole)
Definition: main.c:170
#define DEFINE_EXPECT(func)
Definition: main.c:29
static ULONG WINAPI Object_Release(IUnknown *iface)
Definition: main.c:501
static HRESULT WINAPI Accessible_get_accState(IAccessible *iface, VARIANT varID, VARIANT *pvarState)
Definition: main.c:177
static HRESULT WINAPI Accessible_put_accName(IAccessible *iface, VARIANT varID, BSTR pszName)
Definition: main.c:260
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
static ULONG WINAPI Accessible_Release(IAccessible *iface)
Definition: main.c:89
static HRESULT WINAPI Accessible_get_accKeyboardShortcut(IAccessible *iface, VARIANT varID, BSTR *pszKeyboardShortcut)
Definition: main.c:198
static HRESULT WINAPI Accessible_GetIDsOfNames(IAccessible *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
Definition: main.c:108
static HRESULT WINAPI Accessible_put_accValue(IAccessible *iface, VARIANT varID, BSTR pszValue)
Definition: main.c:267
static IAccessibleVtbl AccessibleVtbl
Definition: main.c:274
static void test_CAccPropServices(void)
Definition: main.c:967
static HRESULT WINAPI Accessible_get_accFocus(IAccessible *iface, VARIANT *pvarID)
Definition: main.c:205
static HRESULT WINAPI Accessible_get_accName(IAccessible *iface, VARIANT varID, BSTR *pszName)
Definition: main.c:149
static ULONG WINAPI Accessible_AddRef(IAccessible *iface)
Definition: main.c:84
static IUnknownVtbl ObjectVtbl
Definition: main.c:506
static HRESULT WINAPI Object_QueryInterface(IUnknown *iface, REFIID riid, void **ppv)
Definition: main.c:486
static HRESULT WINAPI Accessible_GetTypeInfoCount(IAccessible *iface, UINT *pctinfo)
Definition: main.c:94
static IAccessible Accessible
Definition: main.c:305
static void test_default_client_accessible_object(void)
Definition: main.c:727
static HRESULT WINAPI Accessible_get_accChild(IAccessible *iface, VARIANT varChildID, IDispatch **ppdispChild)
Definition: main.c:138
static HRESULT WINAPI Accessible_GetTypeInfo(IAccessible *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
Definition: main.c:101
static HRESULT WINAPI Accessible_QueryInterface(IAccessible *iface, REFIID riid, void **ppvObject)
Definition: main.c:72
static int Object_ref
Definition: main.c:485
static HRESULT WINAPI Accessible_accNavigate(IAccessible *iface, LONG navDir, VARIANT varStart, VARIANT *pvarEnd)
Definition: main.c:239
static void test_getroletext(void)
Definition: main.c:307
static HRESULT WINAPI Accessible_get_accHelp(IAccessible *iface, VARIANT varID, BSTR *pszHelp)
Definition: main.c:184
static HRESULT WINAPI Accessible_get_accDescription(IAccessible *iface, VARIANT varID, BSTR *pszDescription)
Definition: main.c:163
#define CHECK_CALLED(func)
Definition: main.c:47
static HRESULT WINAPI Accessible_get_accSelection(IAccessible *iface, VARIANT *pvarID)
Definition: main.c:211
static HRESULT WINAPI Accessible_get_accDefaultAction(IAccessible *iface, VARIANT varID, BSTR *pszDefaultAction)
Definition: main.c:218
static void test_AccessibleObjectFromWindow(void)
Definition: main.c:595
static HRESULT WINAPI Accessible_accSelect(IAccessible *iface, LONG flagsSelect, VARIANT varID)
Definition: main.c:225
static void test_AccessibleChildren(IAccessible *acc)
Definition: main.c:642
static HRESULT WINAPI Accessible_accDoDefaultAction(IAccessible *iface, VARIANT varID)
Definition: main.c:253
static void unregister_window_class(void)
Definition: main.c:590
static void test_GetStateText(void)
Definition: main.c:419
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
static VARIANTARG static DISPID
Definition: ordinal.c:52
#define argv
Definition: mplay32.c:18
unsigned int UINT
Definition: ndis.h:50
@ COINIT_MULTITHREADED
Definition: objbase.h:279
void WINAPI DECLSPEC_HOTPATCH SysFreeString(BSTR str)
Definition: oleaut.c:271
#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
static HANDLE proc()
Definition: pdb.c:34
#define WS_CHILD
Definition: pedump.c:617
#define WS_OVERLAPPEDWINDOW
Definition: pedump.c:637
#define WS_VISIBLE
Definition: pedump.c:620
long LONG
Definition: pedump.c:60
#define IsEqualIID(riid1, riid2)
Definition: guiddef.h:95
#define REFIID
Definition: guiddef.h:118
const WCHAR * str
DWORD LCID
Definition: nls.h:13
static __inline const char * wine_dbgstr_guid(const GUID *id)
Definition: debug.h:197
#define win_skip
Definition: test.h:163
int winetest_get_mainargs(char ***pargv)
void winetest_wait_child_process(HANDLE process)
#define memset(x, y, z)
Definition: compat.h:39
HRESULT hr
Definition: shlfolder.c:183
& rect
Definition: startmenu.cpp:1413
TCHAR * cmdline
Definition: stretchblt.cpp:32
__int64 _strtoi64(const char *nptr, char **endptr, int base)
Definition: strtoi64.c:90
HINSTANCE hInstance
Definition: winuser.h:3167
LPCSTR lpszClassName
Definition: winuser.h:3172
WNDPROC lpfnWndProc
Definition: winuser.h:3164
Definition: name.c:39
PVOID HANDLE
Definition: typedefs.h:73
int32_t INT
Definition: typedefs.h:58
uint32_t ULONG
Definition: typedefs.h:59
HRESULT WINAPI DECLSPEC_HOTPATCH VariantClear(VARIANTARG *pVarg)
Definition: variant.c:648
int ret
_Must_inspect_result_ _In_ WDFCOLLECTION _In_ WDFOBJECT Object
#define OBJID_CURSOR
Definition: winable.h:24
#define OBJID_CLIENT
Definition: winable.h:19
#define OBJID_WINDOW
Definition: winable.h:15
#define CHILDID_SELF
Definition: winable.h:14
_In_ DWORD _Out_ _In_ WORD wFlags
Definition: wincon.h:531
_In_ void _In_ PCCERT_CONTEXT _In_opt_ LPFILETIME _In_ DWORD _In_ DWORD _Outptr_opt_ void ** ppvObject
Definition: wincrypt.h:6082
_In_ LONG _In_ HWND hwnd
Definition: winddi.h:4023
LONG_PTR LPARAM
Definition: windef.h:208
LONG_PTR LRESULT
Definition: windef.h:209
UINT_PTR WPARAM
Definition: windef.h:207
#define WINAPI
Definition: msvc.h:6
#define S_FALSE
Definition: winerror.h:2357
#define E_NOINTERFACE
Definition: winerror.h:2364
#define E_UNEXPECTED
Definition: winerror.h:2456
static int init
Definition: wintirpc.c:33
BOOL WINAPI ShowWindow(_In_ HWND, _In_ int)
BOOL WINAPI UnregisterClassA(_In_ LPCSTR, HINSTANCE)
LRESULT WINAPI DefWindowProcA(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define CreateWindowA(a, b, c, d, e, f, g, h, i, j, k)
Definition: winuser.h:4315
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)
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
ATOM WINAPI RegisterClassA(_In_ CONST WNDCLASSA *)
#define STATE_SYSTEM_FOCUSABLE
Definition: winuser.h:2882
#define STATE_SYSTEM_INVISIBLE
Definition: winuser.h:2877
BOOL WINAPI DestroyWindow(_In_ HWND)
__wchar_t WCHAR
Definition: xmlstorage.h:180
char CHAR
Definition: xmlstorage.h:175