Different platform AppDomains in one .Net process?
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 creat开发者_高级运维ed 32bit AppDomain? And then marshal between default 64bit AppDomain and second 32bit AppDomain?
Thank you for any advice!
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.
精彩评论