Using an activation context API with many DLLs in different places

I use the API to activate in the .Net client running in location A to download the COM component without registering in location B (which is completely different from A, not from brother / descendant, etc. on the same machine) on WS2008, passing in location B in ACTCTX, and it works great.

However, now I need to do the same with another COM-dll, which in turn has dependencies on several .NET COM nodes that live in completely different places.

I added the .Net dependent assemblies to the manifest and placed the manifest and COM-dll at location B, but I have to put the .Net dependent assemblies at location A (where the client works) to make it work. In fact, they will live in completely different directories at location A and location B.

I am trying to do this, i.e. can I load multiple COM components in different unrelated directories using the api activation context?

+4
source share
1 answer

.NET considers the activation and activation contexts of a process to discover case-insensitive metadata ( <clrClass> , etc.), as native COM does. However, unlike native COM, it does not use the information contained in the activation context to determine the location of actual files. There, I believe, it looks only in the GAC, and then the files are placed next to the client EXE. You can probably confirm this using Sysinternals Procmon. I would suggest that you can try workarounds. Hans suggested or preloaded the necessary assemblies manually into your process and looked to see if this worked; I could not try this because in my script the exe client was a native exe in which I did not control.

+4
source

All Articles