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

  • Thread starter Thread starter Tirumala
  • Start date Start date
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
 
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.
 
Back
Top