Platform SDK: Active Directory, ADSI, and Directory Services

IADsPropertyList Property Methods

The property methods of the IADsPropertyList interface read the properties described in the following table. For more information, see Interface Property Methods.

Properties in Vtable Order

Property Description
PropertyCount

[Visual Basic]
Access: Read
Data Type: LONG

[C++]
HRESULT get_PropertyCount
([out] LONG *plCount);

The number of items in the property list.

Example Code [Visual Basic]

The following Visual Basic code snippet shows how to determine number of items in a property list.

Dim propList As IADsPropertyList
Dim count As Long
 
Set propList = GetObject("LDAP://dc01/DC=Microsoft,DC=com")
 
propList.GetInfo
count = propList.PropertyCount
Debug.Print "Number of Properties Found: " & count

Example Code [C++]

The following C++ code snippet shows how to determine number of items in a property list. The listing of the GetPropertyCache(LPWSTR) function is given in IADsPropertyList.

IADsPropertyList* GetPropertyCache(LPWSTR);
 
LPWSTR adsPath = L"LDAP://dc01/DC=Microsoft,DC=com";
IADsPropertyList *pList=GetPropertyCache(adsPath);
 
long count;
hr = pList->get_PropertyCount(&count);
printf(" Number of properties = %d\n", count);

See Also

IADsPropertyList, Interface Property Methods