| Platform SDK: Active Directory, ADSI, and Directory Services |
The property methods of the IADsPropertyList interface read the properties described in the following table. For more information, see Interface Property Methods.
| Property | Description |
|---|---|
| PropertyCount
[Visual Basic] [C++] |
The number of items in the property list. |
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
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);