Platform SDK: Active Directory, ADSI, and Directory Services

Accessing the Property Cache Directly with the IADsProperty Interfaces

The IADsProperty family of interfaces consists of IADsPropertyList, IADsPropertyEntry and IADsPropertyValue. These interfaces provide methods to directly access and manipulate the properties of an object's cache. A property is known as a property entry and corresponds to an attribute defined in the schema. A property entry can have one or many property values. A set of property entries are organized as a property list.

The IADsPropertyList interface manages the property list of an ADSI object. The IADsPropertyEntry interface does that for a property entry. Similarly, the IADsPropertyValue interface represents one or more property values. Together, they provide a mechanism for users to:

  1. Work directly with the property cache.
  2. Work with directories that do not contain schemas, such as an LDAP version 2 server.

The IADsProperty* family of interfaces operate strictly on the property cache and do not make any attempt to cooperate with the server to retrieve or modify the data in the persistent store. As such, this family of interfaces is only used to examine and manipulate properties in the client's cache. Before using these interfaces, you must call the IADs::GetInfo method or the IADs::GetInfoEx method explicitly to load the object's properties into the cache, if the cache has not been initialized. After calling the methods of these interfaces, you must call IADs::SetInfo to persist the changes to the underlying directory store.

The following code snippets provides examples for how to use this family of interfaces.