Re: COM / connecting to a running COM instance
Brian,
my understanding, which is slightly less laughable, is that whether you
connect to a running server app or instead start a new instance of one is
determined by whoever compiled the app. One of the black arts in compiling
a COM server app is knowing what settings to use to get the app to do what
you want. The settings that control what you want are mentioned as single
threaded vs multi threaded apartments. If the app is set up to handle
multi-threading, then creating a COM object instance of that type and
initing it in your app should establish communication with the
already-running server app on the target machine, presumably your local
machine. Remote machine communication is another ball of wax, but doable.
Single threaded server apps, you should always get a new process starting
when you create the COM object. If no instance of the server app is
running, then one should start, whether single or multi threaded. Of
course, other compiler settings dealing with permissions, etc. can make for
wonderfully hard to debug problems, especially on remote machines on which
you might not be logged in.
HTH,
Raymond Laning