5. Dependent Objects

Dependent objects are simply COM objects that are obtained by method calls on a "host" object. They are logically and semantically related to the host such that their usefulness depends entirely on how they interact with the host. Dependent objects do not exist separately within the Active Directory namespace. They can be obtained only from the host object. Once obtained, dependent objects have separate lifetimes and reference counts from the host object and must be treated, in that sense, as full, independent COM objects.

It is technically possible to release all references to a given host object while retaining references to its dependent objects. This is standard COM behavior: an interface pointer returned to a caller remains available to the caller until explicitly released (for example by calling the Release method until the reference count is reduced to zero). In the case of Active Directory, this means that a caller can find him or herself in the position of being able to get and set properties in a Security Manipulationobject (see below), but be unable to call GetInfo or SetInfo to refresh or persist those properties, since those methods are provided by the host object.

Figure 2 shows dependent objects in relationship to Active Directory objects. Methods on the interfaces of the Active Directory object are used to return interface pointers on the dependent objects. Dependent objects can also have methods that return dependent objects.

Figure 4 - Dependent objects