Basically, from what I understood about what I managed to find on the Internet, streams can go between AppDomains. Now I have written the following code:
const string ChildAppDomain = "BlahBlah"; static void Main() { if (AppDomain.CurrentDomain.FriendlyName != ChildAppDomain) { bool done = false; while (!done) { AppDomain mainApp = AppDomain.CreateDomain(ChildAppDomain, null, AppDomain.CurrentDomain.SetupInformation); try { mainApp.ExecuteAssembly(Path.GetFileName(Application.ExecutablePath)); } catch (Exception ex) {
This works great, and everything is clicked into place ... The main thread goes to the new version of my program and starts working through the main application body. My question is: how do I get it to return to the parent AppDomain ? Is it possible? What I'm trying to achieve is the exchange of a class instance between two domains.
source share