Export (0) Print
Expand All

IADsPropertyList interface

The IADsPropertyList interface is used to modify, read, and update a list of property entries in the property cache of an object. It serves to enumerate, modify, and purge the contained property entries. Use the enumeration method of this interface to identify initialized properties. This is different from using the schema to determine all possible attributes that an ADSI object can have and which properties have been set.

Call the methods of the IADsPropertyList interface to examine and manipulate the property list on the client. Before calling the methods of this interface, you must call IADs::GetInfo or IADs::GetInfoEx explicitly to load the assigned property values of the object into the cache. After calling the methods of this interface, you must call IADs::SetInfo to save the changes in the persistent store of the underlying directory.

To obtain the property list of an ADSI object, bind to its IADsPropertyList interface. You must call the GetInfo method before calling other methods of property list object, if the property cache has not been initialized.

Members

The IADsPropertyList interface inherits from the IDispatch interface. IADsPropertyList also has these types of members:

Methods

The IADsPropertyList interface has these methods.

MethodDescription
GetPropertyItem

Gets the value of a named property.

Item

Gets a property that is specified by name or by index.

Next

Gets the next item in the property list.

PurgePropertyList

Deletes all properties from the list and, therefore, releases the property caches as well.

PutPropertyItem

Puts the value of a named property.

Reset

Moves back to the start of the list.

ResetPropertyItem

Resets the value of a named property.

Skip

Skips a specified number of items in the property list.

 

Properties

The IADsPropertyList interface has these properties.

PropertyAccess typeDescription

PropertyCount

Read-only

Gets the number of properties in the property list.

 

Example Code

The following code example shows how to bind to the IADsPropertyList interface and then initialize the property cache.

Dim pList as IADsPropertyList
On Error GoTo Cleanup

Set pList = GetObject("LDAP://dc01/dc=Fabrikam,dc=com")
pList.GetInfo

Cleanup:
    If (Err.Number<>0) Then
        MsgBox("An error has occurred. " & Err.Number)
    End If
    Set pList = Nothing

The following code example shows how to bind to the IADsPropertyList interface and initialize the property cache.


IADsPropertyList* GetPropertyCache(LPWSTR adsPath)
{
    IADsPropertyList *pList;
    IADs *pObj;
    if(!adsPath)
    {
        _tprintf(TEXT("Invalid ADsPath."));
        return NULL;
    }

    HRESULT hr = ADsGetObject(adsPath,
                          IID_IADsPropertyList,
                          (void**)&pList);
    // Initialize the property cache.
    hr = pList->QueryInterface(IID_IADs,(void**)&pObj);
    pObj->GetInfo();
    pObj->Release();

    return pList;
}

Requirements

Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2003 [desktop apps only]

Header

Iads.h

DLL

Activeds.dll

IID

IID_IADsPropertyList is defined as C6F602B6-8F69-11D0-8528-00C04FD8D503

See also

IADs::GetInfo
IADs::GetInfoEx
IADs::SetInfo
IADsPropertyList Property Methods
IDispatch

 

 

Show:
© 2014 Microsoft