I am developing a .NET code that will run on client's PC. The code must call COM object allready registered at Client's PC for the purpose of another program. So I only need to share a registered component.
I got the same distributive with COM component that client has, installed it on my development machine and referenced it in my Visual Studio. The code works well on my PC and multiple instances of my program don't create multiple instances of COM object (pslist shows several MyProgram.exe processes but only one COM process).
When I build my program it also includes referenced COM component. After I distribute it to Client's PC and run, pslist shows that there are two processes running COM component. I.e. Client runs his own program that uses his COM object and my program also creates its own COM process. This is bad because I still need one process at Client's PC that runs COM component. Both client's program and my program are started as the same user.
I do suspect that COM component included with my build is being registered at runtime on Client's PC with another ObjectID (but actually comes from the same install package) and OS doesn't recognize it as the same component that allready runs. Need a help to diagnose the very source of this issue and fix it.
Thank you