The app does not support Active Accessibility. The WM_GETOBJECT event is passed to DefWindowProc, and the NotifyWinEvent function is not called. When start Screen Reader on Windows 7, everything works fine. But on Windows Vista and higher, an exception occurs in oleacc.dll. Call stack:
oleacc.dll!AccWrap_Base::ProcessIDispatch()
oleacc.dll!AccWrap_Base::ProcessVariant()
oleacc.dll!AccWrap_Base::get_accFocus(struct tagVARIANT *)
oleacc.dll!AccWrap_Annotate::get_accFocus(struct tagVARIANT *)
UIAutomationCore.dll!AccNavUtils::HitTestOrFocus()
UIAutomationCore.dll!MsaaProxy::GetFocus()
UIAutomationCore.dll!GetFocusedChild(struct IRawElementProviderSimple *)
UIAutomationCore.dll!HookBasedServerConnection::ClaimPendingObject()
UIAutomationCore.dll!ProcessStaticMethod()
UIAutomationCore.dll!ProcessIncomingRequest()
UIAutomationCore.dll!HookBasedServerConnectionManager::HookCallback()
UIAutomationCore.dll!HandleHookMessage()
UIAutomationCore.dll!HookUtil<&HookBasedClientConnection::HookCallback(void *,unsigned long,void * *,unsigned long *,void * *),0>::CallWndProc(int,unsigned int,long)
[…]
The problem is in the VARIANT structure. The "vt" field specifies the value VT_DISPATCH, but the structure stores a value of the VT_I4 type. Because of this, the AccWrap_Base::ProcessVariant function calls AccWrap_Base:: ProcessIDispatch, which tries to access the address 0x14.
Where to find the problem?