[Bug 47287] Accessible Event Watcher Tool 'accevent.exe' from Windows 10 SDK (10.0.17763.x) crashes on unimplemented function oleacc.dll.AccessibleObjectFromEvent

wine-bugs at winehq.org wine-bugs at winehq.org
Thu May 30 05:02:48 CDT 2019


https://bugs.winehq.org/show_bug.cgi?id=47287

--- Comment #2 from Anastasius Focht <focht at gmx.net> ---
Hello Vijay,

the stub prevents the crash. Instead a message 'OBJ_CREATE\t [Error: getting
object: hr=0xFFFFFFFF80004001' is displayed in the log window each time the
user interface is navigated.

--- snip ---
$ pwd
/home/focht/wine-apps/wineprefix64-win10sdk/drive_c/Program Files (x86)/Windows
Kits/10/bin/10.0.17763.0/x64

$ WINEDEBUG=+seh,+relay,+oleacc wine ./accevent.exe >>log.txt 2>&1
...
0036:Call winevent proc 0x180001310
(hook=30042,event=8000,hwnd=0x20044,object_id=0,child_id=0,tid=0036,time=69baad)
0036:Call user32.SetRectEmpty(00248a50) ret=180003969
0036:Ret  user32.SetRectEmpty() retval=00000001 ret=180003969
0036:Call user32.IsWindowVisible(00020044) ret=1800039f9
0036:Ret  user32.IsWindowVisible() retval=00000001 ret=1800039f9
0036:Call oleaut32.VariantInit(00248990) ret=180003ba5
0036:trace:variant:VariantInit (0x248990)
0036:Ret  oleaut32.VariantInit() retval=00000000 ret=180003ba5
0036:Call
oleacc.AccessibleObjectFromEvent(00020044,00000000,00000000,002489f0,00248990)
ret=180003bc2
0036:fixme:oleacc:AccessibleObjectFromEvent 0x20044 0 0 0x2489f0 0x248990: stub
0036:Ret  oleacc.AccessibleObjectFromEvent() retval=80004001 ret=180003bc2
0036:Call
KERNEL32.FormatMessageW(00001000,00000000,80004001,00000400,00248ae8,7f6a000003c4,00000000)
ret=180004834
0036:Ret  KERNEL32.FormatMessageW() retval=00000000 ret=180004834
0036:Call user32.SendMessageW(00010076,00000180,00000000,00248a70)
ret=140001744
0036:Call window proc 0x6e6fcae0
(hwnd=0x10076,msg=LB_ADDSTRING,wp=00000000,lp=00248a70) 
...
0036:Ret  window proc 0x6e6fcae0
(hwnd=0x10076,msg=LB_ADDSTRING,wp=00000000,lp=00248a70) retval=00000000
0036:Ret  user32.SendMessageW() retval=00000000 ret=140001744 
...
0036:Call user32.TabbedTextOutW(0001006a,00000001,00000000,000b5ec0
L"OBJ_CREATE\t [Error: getting object: hr=0xFFFFFFFF80004001 -
]",0000003d,00000001,0009b9a0,00000000) ret=6e6fb0af 
...
--- snip ---

It passes object_id=0 (OBJID_WINDOW in this case), child_id=0 from winevent
proc straight to 'AccessibleObjectFromEvent' as shown in the example snippet:

https://docs.microsoft.com/en-us/windows/desktop/api/oleacc/nf-oleacc-accessibleobjectfromevent

--- snip ---
void CALLBACK HandleWinEvent(HWINEVENTHOOK hook, DWORD event, HWND hwnd, 
                             LONG idObject, LONG idChild, 
                             DWORD dwEventThread, DWORD dwmsEventTime)
{
    IAccessible* pAcc = NULL;
    VARIANT varChild;
    HRESULT hr = AccessibleObjectFromEvent(hwnd, idObject, idChild, &pAcc,
&varChild);  
    if ((hr == S_OK) && (pAcc != NULL))
    {
        // Do something with the accessible object, then release it.        
        // ... 
        pAcc->Release();
    }
}
--- snip ---

https://docs.microsoft.com/en-us/windows/desktop/winauto/winevents

So as of now, the Microsoft Active Accessibility (MSAA) server part/test isn't
useful unless this gets implemented.

We could just this one track an actual semi-stub/implementation of the API
(needs revised summary) or splitting it into another one.

Regards

-- 
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.



More information about the wine-bugs mailing list