Summary

In this chapter, you learned some of the advanced aspects of using a managed object from an unmanaged client. You learned alternate ways of instantiating a managed object besides the standard COM CoCreateInstance function. Using these techniques, you can instantiate a managed object without having to register the object first or instantiate a managed object that has a parameterized constructor. You also learned how garbage collection complicates object life-cycle management and how to solve some of these problems. You also learned how to call overloaded methods and how to control the class interface that the CCW will expose. I also covered using COM apartments, rich-error information, and Windows Forms controls as ActiveX controls. In addition, I explained how to catch managed events in an unmanaged client. You are now ready to tackle most “real-word” problems associated with using a managed object from an unmanaged client.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.17.5.68