There is a scenario I'm interested in.
User runs COM based application in a separate window, I want my C# application to manipulate that application through COM calls. I've found COM interface I'm interested in and VisualStudio has successfully generated wrapper (MyApp.interop). So I can write something like new Interop.MyApplication()
but I do not want new Application I want to work with existing one.
views:
17answers:
1
A:
I've found the solution, code looks like
var app = Marshal.GetActiveObject("MapInfo.Application")
((MyApp)app).OpenFile(...)
Alex Ilyin
2010-10-08 12:14:53