Appdomains in COM Interop

I have a .Net class that calls a C ++ COM object, which in turn calls another .Net class in COM. I found that the two .Net classes are in separate applications (which creates problems with log4net). Note that they are in the same thread.

Why is this? Is there a way to ensure that they are in the same application?

+3
source share
1 answer

Calling a .NET class that maps to COM requires data marshaling. AppDomains detaches data access. When you call a COM component (regardless of whether it is a .NET application), you should make it in the form of sand. In .NET, the sandbox uses a different AppDomain.

0
source

Source: https://habr.com/ru/post/1711977/


All Articles