How to get AppDomain for an object instance

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
 
C

Colbert Zhou [MSFT]

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
 
M

Marvin Landman

I have no control over the managed object but managed to work around the
issue.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top