[Mono-dev] Getting the list of all AppDomains in a process
lionel_email at aulofee.com
Fri Feb 12 03:44:44 EST 2010
I need to get a list of all loaded AppDomains in the running process
(without asking developer to explicitely register them in a static hashtable
for instance). In .NET on Windows, I can use COM Interop (see code below).
But this is of course unlikely to run in Mono/Linux. Does anybody know how
Zoltan, I've read in http://www.mono-project.com/Todo that there would be a
"appdomain ID-indexed tables " => can it be used for this? Where is it?
thks in advance for your ideas
Code to do this with COM Interop on Windows (coming from
// Add the following as a COM reference...
public class AppDomainUtils
public static IList ListAppDomains()
CorRuntimeHostClass host = new CorRuntimeHostClass();
ArrayList list = new ArrayList();
host.NextDomain(enumHandle, out domain);
if(domain == null) break;
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Mono-devel-list