How to get AppDomain for an object instance

  • Thread starter Thread starter Marvin Landman
  • Start date Start date
M

Marvin Landman

Hi,

I am working on a native COM application that is facing managed object
instances from different AppDomains; usually in the form of an
IObjectHandle. I have no control over the input object but I have to
create my own object managed object in the AppDomain of the input object.

I was able to enumerate AppDomains but was unable do determine the
AppDomain (ID or reference) of the input object.

Please help me resolving my problem.

Thank you.

Regards,
Marvin
 
Hello Marvin,

Since the managed object are exposed as COM component, they have no
differences with other native COM objects. By default, there is no
AppDomain identifier related information exposed. If you really need that,
the suggestion is we have to add a property to the managed COM object,
which returns the AppDomain ID. In that case, we must access to the managed
COM component's source codes.


Best regards,
Ji Zhou
Microsoft Online Community Support
 
Back
Top