ADsEnumerateNext function (adshlp.h)
The ADsEnumerateNext function enumerates through a specified number of elements from the current cursor position of the enumerator. When the operation succeeds, the function returns the enumerated set of elements in a variant array. The number of returned elements can be smaller than the specified number.
Syntax
HRESULT ADsEnumerateNext(
[in] IEnumVARIANT *pEnumVariant,
[in] ULONG cElements,
[out] VARIANT *pvar,
[out] ULONG *pcElementsFetched
);
Parameters
[in] pEnumVariant
Type: IEnumVARIANT*
Pointer to the IEnumVARIANT interface on the enumerator object.
[in] cElements
Type: ULONG
Number of elements requested.
[out] pvar
Type: VARIANT*
Pointer to the array of elements retrieved.
[out] pcElementsFetched
Type: ULONG*
Actual number of elements retrieved, which can be smaller than the number of elements requested.
Return value
Type: HRESULT
This method supports the standard return values.
For more information about other return values, see ADSI Error Codes.
Remarks
The general process to enumerate objects in a container involves the following:
First, create an enumerator object on that container.
Second, retrieve the IEnumVARIANT interface pointer.
Third, call the ADsEnumerateNext function to return an enumerated set of elements from the enumerator object.
Fourth, call the ADSFreeEnumerator function to free the enumerator object.
For more information and a code example, see the ADsBuildEnumerator topic.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows Vista |
Minimum supported server | Windows Server 2008 |
Target Platform | Windows |
Header | adshlp.h |
Library | Activeds.lib |
DLL | Activeds.dll |