0

I need to enumerate AppDomains, loaded into CLR. But I need to do that from unmanaged code (in C++). I think, I should use ICorRuntimeHost. It contains methods for AppDomains enumeration. ICorRuntimeHost::NextDomain returns IUnknown* for current AppDomain. Which interface I need to use to access this AppDomain without enabling CLR support in my code?

Viacheslav Kovalev
  • 1,745
  • 12
  • 17
  • Very unclear since it does not state how the CLR got loaded in the first place. In general, this kind of teleportation doesn't exist. Hosting the CLR yourself is the simple way. – Hans Passant Feb 24 '13 at 19:42
  • Well, I have got managed application (written in C#). It uses dotNet Framework 4. Also I have some unmanaged dll (*compiled without /clr key*). This dll exports functions that should be called from dotNet application via pinvoke. I am looking for way to enumerate domains and assemblies loaded into main (managed) application. – Viacheslav Kovalev Feb 24 '13 at 21:48

1 Answers1

0

Solved. I was only needed to #import <mscorlib.tlb>.

Viacheslav Kovalev
  • 1,745
  • 12
  • 17