Platform SDK: Active Directory, ADSI, and Directory Services

GetInfo Method

Call the IADs::GetInfo method to refresh all of an ADSI object's cached properties from the underlying directory service. To refresh specific properties, use the IADs::GetInfoEx method.

ADSI invokes an implicit GetInfo if a Get is performed on a specific property in the property cache and no value is found. Once GetInfo has been called, an implicit call will not be repeated. If a value already exists in the property cache, however, calling Get without first calling GetInfo will retrieve the cached value rather than the most current value from the underlying directory. To obtain the most recent values for an object, always call GetInfo. Any changes you have made in the property cache will be replaced with the current values from the server. If you need to preserve your changes on the server you call the IADs::SetInfo method to save your changes before you call GetInfo.