Currently my code uses
SurferApp = Marshal.GetActiveObject("Surfer.Application") as Surfer.Application
to get the running instance of a software called surfer, for the sake of simplicity we can replace Surfer to Word that everyone knows about.
Now let's say I have 2 MS word application running and I want to get both of them using Marshal.GetActiveObject()
, how can I get both the running instances and associate each with a separate object?