0

I'm using Windows UIAutomation quite heavily and it works mostly well. But it's throwing some exceptions that I haven't been able to figure out.

The first of these is:

Exception thrown at 0x762D46D2 (KernelBase.dll) in MyApp.exe: 0x80040155: Interface not registered.

The offending section of code is the last line of:

IUIAutomationElementPtr element;  //This is a valid element
IUIAutomationCacheRequestPtr cachePtr;  //This is a valid cache pointer
IUIAutomationElement **first;

HRESULT hr = myControlWalker->GetFirstChildElementBuildCache(element, cachePtr, firstChild);

The second of these is:

Exception thrown at 0x762D46D2 (KernelBase.dll) in MyApp.exe: 0x40080202: WinRT transform error (parameters: 0x80040155, 0x80004002, 0x0000001D, 0x0565DB4C).

which happens at the same line of code as the previous.

And the last is:

Exception thrown at 0x762D46D2 (KernelBase.dll) in MyApp.exe: 0x8001010D: An outgoing call cannot be made since the application is dispatching an input-synchronous call.

once again, from the same line of code.

The program runs fine and it does what it needs to do, it just bothers me to have zillions of these exceptions being thrown left and right. Any suggestions?

DukeBrymin
  • 351
  • 3
  • 15
  • So you mean they are first chance exception that you only see when you debug, right? In this case, there's nothing yo do except filter them in the debugger. – Simon Mourier Oct 14 '21 at 08:49
  • That's correct--in the debugger only. Anyway, that's what I have been doing, I was just worried that I was ignoring something important. – DukeBrymin Oct 14 '21 at 13:06
  • Unfortunately, there are lots of errors like that in the normal course of operation. This is apparently an increasing practice in how Microsoft develops because they're using "real" c++ more and more including error management. Years ago, errors were more exclusively handled by C-style error code (HRESULT and alike). – Simon Mourier Oct 14 '21 at 16:01

0 Answers0