Let's say I have the same .net managed dll (same version, same code) in two diferent bin folders of two diferent exe applications. If I register the two dlls into COM+ using RegSvcs.exe /appname:app1 pathtodll1/example.dll and RegSvcs.exe /appname:app2 pathtodll2/example.dll. Can I assume one exe will allways run the app1 com+ and the other exe will run the app2 com+?
I mean I don't see how the exe client application, a managed application by the way, resolve which COM+ application it should run when asking for the dll if I am able to change the appname at registering time...
Do they use the registry CodeBase property to figure out the appname?
Edit: It seems I cannot register the second time. Then I have another question... When app2 runs and ask for example.dll services which dll is really uploaded the one next to app1.exe or the one from app2.exe? Do I really need to copy example.dll in app2 bin folder?
If I add a third non com+ dll (second.dll) in the mix, that is referenced by the two exe's and by the example.dll which second.dll will get loaded in the app2.exe app domain?
It seems which dll the loader choose has nothing to do with component services. COM+ from a .net perspective is just a settings store. So when a given dll is loaded as usual in the app domain, it asks the COM+ store if itself (ie a dll with the same version and interface) exists there. If it exists then it reads its COM+ settings. If it doesn't I think it tries to autoregister itself in COM+ (using default COM+ settings).