user3848314
user3848314

Reputation:

Load a C++ program into a C# AppDomain

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?

Upvotes: 1

Views: 856

Answers (1)

Christos
Christos

Reputation: 53958

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.

Upvotes: 1

Related Questions