AppDomain
-
Guys When I run two instances of notepad, while task manager is running, I see that the number of processes increases with each instance of notepad or any exe. It means they are running in their own process and appdomain respectively. How can I make two programs run on different appdomains but the same process.
-
Guys When I run two instances of notepad, while task manager is running, I see that the number of processes increases with each instance of notepad or any exe. It means they are running in their own process and appdomain respectively. How can I make two programs run on different appdomains but the same process.
-
You cant. Two programs can not run on one process else it would be the same program, no?
Life goes very fast. Tomorrow, today is already yesterday.
-
You cant. Two programs can not run on one process else it would be the same program, no?
Life goes very fast. Tomorrow, today is already yesterday.
I still have to come to grip with appdomains. So could you tell me, under what circumstances would we want to have two appdomains in the same process.
-
I still have to come to grip with appdomains. So could you tell me, under what circumstances would we want to have two appdomains in the same process.
Hi, you can dynamically load DLL files into the current or a new app domain, but you can't unload DLL files; you can however unload an app domain. So for add-on software (especially if you don't fully trust it) loading it in another app domain makes a lot of sense. :)
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get. Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
-
Guys When I run two instances of notepad, while task manager is running, I see that the number of processes increases with each instance of notepad or any exe. It means they are running in their own process and appdomain respectively. How can I make two programs run on different appdomains but the same process.
You can load managed executable in memory and run it. You will have one process but when you exit it, the loaded executable will exit too.
Giorgi Dalakishvili #region signature My Articles Asynchronous Registry Notification Using Strongly-typed WMI Classes in .NET [^] My blog #endregion
-
I still have to come to grip with appdomains. So could you tell me, under what circumstances would we want to have two appdomains in the same process.
Here's a real-world example: Unit testing software, such as NUnit, will load your unit test assemblies into a separate AppDomain for safety and security reasons. Using additional AppDomains is also the only way to unload an assembly from a .NET process. Say you have an app that uses plugins. In the unmanaged world you can just use LoadLibrary and FreeLibrary calls to load and unload a plugin dll. In .NET you would have to load the plugin dll into a separate AppDomain, then get rid of that AppDomain to unload the plugin.
-
Guys When I run two instances of notepad, while task manager is running, I see that the number of processes increases with each instance of notepad or any exe. It means they are running in their own process and appdomain respectively. How can I make two programs run on different appdomains but the same process.
Thanx Guys Finally I know what appdomain is all about.