Hi,
I can use Marshal.GetActiveObject to attach to a running instance of some
application. I can then use Type.InvokeMember to control it.
My question is how to attach to a SPECFIC running instance of some
application when there may be two instances running.
How do I distinguish between them?
GetActiveObject will only return the first instance it encounters.
Any ideas or tips on a direction to take will be much appreciated.
Cheers, Chris.
Mattias Sjögren - 21 Apr 2006 20:44 GMT
Christopher,
>My question is how to attach to a SPECFIC running instance of some
>application when there may be two instances running.
>How do I distinguish between them?
If they are all registered in the Running Object Table (ROT) with
unique monikers you can get them that way. Check out the
GetRunningObjectTable and related APIs.
Mattias

Signature
Mattias Sjögren [C# MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.