I am interesting in: can i load 32bit x86 dll as a second AppDomain into 64 bit application environment?
For more details:
1) Main exe is 64 bit C# pure .net 4 app;
2) Module is third party .net 2.0 wrapper of some unmanaged x86 dll;
So can i create second 32bit AppDomain in 64bit .net 4 process and load 32bit module into new created 32bit AppDomain? And then marshal between default 64bit AppDomain and second 32bit AppDomain?
Thank you for any advice!
In short, any process running a managed application will have at least one app domain in it. Since AppDomain is a .NET concept, any process running unmanaged code will not have any application domain. Figure 2 will help you understand the concept better. Figure 2
AppDomain can be considered as a light-weight process. Application domain is a .NET concept whereas process is an operating system concept. Both have many characteristics in common. A process can contain multiple app domains and each one provides a unit of isolation within that process.
Since AppDomain is a .NET concept, any process running unmanaged code will not have any application domain. Figure 2 will help you understand the concept better. Figure 2 Process A runs managed code with one application domain while Process B runs managed code has three application domains.
In this article, I am going to discuss App Domain in .NET Framework and in what scenarios we need them with examples. Please read our previous article where we discussed Assembly, DLL, and EXE in detail. The App Domain (Application Domain) in the .NET Framework is a logically isolated container inside which the .NET Code runs.
That's not possible, bitness is a process property, not an appdomain property. To make this work, you'll need to load that DLL in a separate process. Use the standard .NET IPC mechanisms to talk to it. Named pipes, sockets, remoting, WCF. Or force the Platform target setting to x86.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With