2

Writing a piece of code which opens another process.

public void StartProcess()
{
    Process p = Process.Start("Process1");
    p.WaitForInputIdle();
    SetParent(p.MainWindowHandle, this.Handle);
    IntPtr h = p.MainWindowHandle;
}

This will start process 1. Is there a way to catch runtime exceptions in Process1?

It is a different question from the code shown here as it tells you how to catch a runtime exception to a .net exectuable assembly. The application I'm opening is built using Delphi and I do not have the source code

Community
  • 1
  • 1
  • @giladgreen It is not a duplicate as the code you showed [here](http://stackoverflow.com/questions/2279181/catch-another-process-unhandled-exception) tells you how to catch a runtime exception to a .net exectuable assembly. The application I'm opening is built using Delphi and I do not have the source code – Procrastinating Programmer Aug 19 '16 at 09:24

1 Answers1

1

Process must catch the exception itself. You may then deliver error reports through an observer pattern.

Boris Schegolev
  • 3,601
  • 5
  • 21
  • 34