0
votes

I have C# .Net 4.0 COM interoperable libraries which uses the same common helper libraries...

For ex: .Net COM interop Library 1 (say library name : netCom1.dll) .Net COM interop library 2 (say library name : netCom2.dll) Both referring to same (Common libraries) lib1.dll, lib2.dll and lib3.dll.

And Their output directory are .Net COM interop Library 1 /bin => netCom1.dll, lib1.dll, lib2.dll and lib3.dll. .Net COM interop Library 2 /bin => netCom2.dll, lib1.dll, lib2.dll and lib3.dll

Now, these COM interop libraries run in the Single frame process. (Frame.exe). But what I observed is, eventhough common libraries lib1.dll, lib2.dll and lib3.dll are in different folders for netCom1.dll and netCom2.dll, when it is run the frame,exe, these common libraries are loaded only once i.e. static variables are the same for netCom1.dll and netCom2.dll.

Is there any way that I can make netCom1.dll to refer its folder's lib1.dll, lib2.dll and lib3.dll and netCom2.dll to refer its folder's lib1.dll, lib2.dll and lib3.dll when both com operable libraries are loaded in the single frame process.

1
What is the nature of these libX.dll libraries - are they .NET assemblies, COM DLLs or just plain windows DLLs? - Damien_The_Unbeliever
Common libraries (libX.dll) are simple .Net 4.0 dlls. - Saqwes

1 Answers

1
votes

To do this you need to create multiple AppDomains inside your process and run each code in its own AppDomain.