AppDomains, how to run another app from my current app...

T

Tirumala

Hi Guys,
I have to create a application which loads a external dll and shows a
form from the dll, my requirement is to show the FORM from the dll and close
my application but the Form from the dll should be available for the user.
I thought using AppDomains would solve my problem, but I couldnt find
any proper documentation anywhere. I was able to load and show the form but
when I close the current application everything is closed. So what i
understand from this is when I close my current application the process gets
terminated and as the Appdomain is created under the same process it also
gets terminated. So I will have to load the dll in another process and close
the current process. But I dont know how to do that......

If somebody can give suggestions or point so some links would be very
helpful.

Thanks,
Tirumala
 
E

EP

yes, appdomains are really just a part of the same process, so if you exit
the process anything in the other appdomain will be destroyed.

If you want to load some winform dll in another process, I would recommend
you create a new exe that takes information at the command line about what
dll and class inside it to show. Then you can start this new process using
System.Diagnostics.Process.Start(...) with the proper arguments, then let
your application exit.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top