[Mono-dev] Getting the list of all AppDomains in a process

Lionel Cuir lionel_email at aulofee.com
Fri Feb 12 07:10:36 EST 2010


Thank for the quick answer. Alas, the AppDomainManager is not a solution for
us, as the assembly is not supposed to be in the GAC. 

-----Message d'origine-----
De : mono-devel-list-bounces at lists.ximian.com
[mailto:mono-devel-list-bounces at lists.ximian.com] De la part de Robert
Jordan
Envoyé : vendredi 12 février 2010 11:20
À : mono-devel-list at lists.ximian.com
Objet : Re: [Mono-dev] Getting the list of all AppDomains in a process

On 12.02.2010 09:44, Lionel Cuir wrote:
> Hi All,
>
> 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 to do?

There is no way to enum AppDomains in Mono. Even the embedding API (which is
the counterpart of MS.NET's coree COM API) does not provide a complete API
for AppDomain enumerations [1].

But once AppDomainManager[2] is implemented in Mono, you'll have a portable
solution for domain enumerations. I don't know if this is in the work.

Robert

[1] since there is no
     MonoAppDomain* mono_appdomain_from_domain (MonoDomain *dom)
     accessor in the embedding API, mono_domain_foreach can't
     be used to enum MonoAppDomains.

[2] see MSDN

_______________________________________________
Mono-devel-list mailing list
Mono-devel-list at lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list



More information about the Mono-devel-list mailing list