简体   繁体   中英

Can you create a 32-bit AppDomain from a 64-bit process?

Is it possible to create an AppDomain to host/run some 32-bit code from a 64-bit process, and then be able to pass/marshal data from the newly created AppDomain to host AppDomain?

I could do this as an out-of-process executable, but I am trying to avoid having a large binary foot-print for the 32-bit process (which happens to be a stand-alone .NET 6.0 console executable).

You can't half on the same process to run as 64 bit and the other as 32 bit. So even if .Net 6 would support creating AppDomains ( which it does not ) creating 32bit AppDomain in 64bit process would not work.

You need to create separate processes for that which may share most of the code /binaries - you only need bootstraping app to be explicitly 32 or 64 bits, the rest of your assemblies can be "Any".

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM