In C#, I know how to run a .NET executable from code and also find out if an instance of the executable is already running. What I would like to do is if an instance is already running, obtain an instance of the Foo
object within the C# code of a different executable.
I have a windows application, (e.g..NET version of Outlook). A user can use the application as normal, but also running in the background is a process watching for an XML file from a third party system.
What I need is for the watcher process to start the .NET program if it is not running (or obtain a handle if it is), and then call the method CreateEmail
on the object instance within the new/existing process.