Click here to Skip to main content
15,868,016 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hello Everyone,

To be able to use getobject from vb6 to access a com object managed on a com exe server in c#, I can use the RegisterActiveObject method to give access to this object.

The only problem is when I need to close the com exe server?

In case, the vb6 application is using createobject, I can in the IClassFactory::CreateInstance() call, increase my object reference counter. This will tell me how many references are currently active on this object.

When the vb6 application is invoking: set myobject = nothing,
is there a way in c# to implement the standard IUnknown interface or how to catch the IUnknown::release function of my object to decrease the refence counter ?

Thank you very in advance for your inputs.

Best regards.
Posted
Comments
Sergey Alexandrovich Kryukov 7-Nov-11 16:55pm    
Why?!!
--SA

1 solution

You never need to do it in C#. We could discuss further detail if you explain what do you want to achieve.

—SA
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900