my development sketch book my personal blog
choongseng wrote:This post might give you some clue:http://www.msfn.org/board/lofiversion/index.php/t8712.html
Yes, it's one of those question that I have at the moment also.
I also came across using the following:
AppDomain newDomain = AppDomain.CreateDomain("newDomain");
newDomain.ExecuteAssembly("C:\windows\notepad.exe");
I have not tried this, and wonder how this differs from Process.Start(). Maybe if time allows, I will dig deeper.
Cyrus Crypt wrote: AppDomain newDomain = AppDomain.CreateDomain("newDomain"); newDomain.ExecuteAssembly("C:\windows\notepad.exe"); I have not tried this, and wonder how this differs from Process.Start(). Maybe if time allows, I will dig deeper.
Process.Start() creates a new process to host the application by default. Before .Net was introduced, Win32 must run any application into its own process in isolation so that when one process is stopped or crashed, other processes can continue to operate. I believe one of the primary reason that the Process component was carried forward is for backward compatibility.
.Net introduces the AppDomain which is a lightweight unit for apllication isolation, fault tolerance and security. A process can now host multiple application domains. The CLR can guarantee that one application domain can run indepently of another application domain in the same process. This is a much better usage of resources comparing with the Win32 Process.