1
votes

Here is the setup :

  • a delphi COM component we developed makes calls to some dll we don't have hands on (some are old fortran ones, some are C)
  • a .NET service is calling the COM component

Sometimes, depending on the parameters we send to the COM component, the old dlls we don't have hands on are displaying an error message box - they are buggy.

And of course, this is a server application, nobody works in front of it, and the whole service gets stuck, waiting for someone to click those Dialog boxes before it can resume working.

So my question is : Is there a way to setup the com component to prevent it from showing dialog boxes ?

Thank you!

1

1 Answers

1
votes

There's nothing in COM to restrict message boxes, you'll have to engineer some solution inside your component.

One way is to create a separate thread that will periodically enumerate all windows, find the ones that belong to that process, locate the right button there and programmatically press that button.