Composite objects COM notes for beginners

The typical usage of the composite objects will not require deep COM knowledge. However some advanced solutions based on it may cause problems if you are not aware of its internal structure and the way it works.

When you need to know these details? We cannot predict all the possible situations when the details will be important, but we will try to point at least the clues:

  • Callbacks and recursions. For example code in one of the exposed members of the composite calls another exposed method - directly or indirectly (calls a method of another object that calls the composite in turn).
  • Direct access to the objects/scripts in the composite from other code than the code intended to create/initialize the composite. For example you have part of your application that creates the composite dynamically and some of the other parts which usually will only call the exposed methods of the composite has interface pointers to the inner composite's objects and makes some calls to them directly.
  • Using free-threaded objects in the composite.

to be continued ...

newObjects Copyright 2001-2006 newObjects [ ]