UiaReturnRawElementProvider raises E_CANTCALLOUT_ININPUTSYNCCALL exception

Christophe Blanchard 21 Reputation points
2022-04-04T15:43:48.99+00:00

I want to use UIAutomation as a server from my application.
When calling function "UiaReturnRawElementProvider" in WM_GETOBJECT message, I get E_CANTCALLOUT_ININPUTSYNCCALL (0x8001010D) exception.
I initialize my COM library with OleInitialize().
Any idea ?

C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,593 questions
0 comments No comments
{count} votes

Accepted answer
  1. RLWA32 41,911 Reputation points
    2022-04-05T00:37:28.087+00:00

    When running the UIAutomationSimpleProvider sample under the debugger this exception appears in a message in the output window. However, it has no effect on the functioning of the sample application.

    Also, read this - https://learn.microsoft.com/en-us/windows/win32/com/call-synchronization

    Additionally, the exception in the debugger is what is known as a first-chance exception. The debugger is notified of all exceptions. If it is not configured to break on an exception the exception is then seen by the application being debugged. If the application handles the exception then execution continues.

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful