1

As the title says I want to load a C++ program into a C# AppDomain using C#.

I cannot use AppDomain.ExecuteAssembly() because it has to be a C# or another non C++ language to use this.

Is it possible to load a C++ programm?

1 Answer 1

1

As far as I know AppDomain is a logical region inside a process, in which one or more assemblies can be loaded. That being said, I don't think that this is even feasible.

However, you have the ability you invoke native C++ DLL from a .NET assembly. Here is a helpful link, in which you will some options you have in order to invoke native C++ DLL from a .NET assembly.

side note

I cannot use AppDomain.ExecuteAssembly() because it has to be a C# program to use this.

This is not true. If you write your program in any .NET language, the compiled version of your code would be an assembly, which will contain the same code and data files. So, AppDomain.ExecuteAssembly() can execute any .net assembly, without this assembly have been created by a C# compiler.

Sign up to request clarification or add additional context in comments.

1 Comment

@2767MR Sorry, but I don't get you comment. I have updated my post and you might refer to the old one. Please let me know, if something is not clear. Thanks !

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.