ADsFreeEnumerator function (adshlp.h)

The ADsFreeEnumerator function frees an enumerator object created with the ADsBuildEnumerator function.

Syntax

HRESULT ADsFreeEnumerator(
  [in] IEnumVARIANT *pEnumVariant
);

Parameters

[in] pEnumVariant

Type: IEnumVARIANT*

Pointer to the IEnumVARIANT interface on the enumerator object to be freed.

Return value

Type: HRESULT

This method supports standard return values, as well as the following.

Remarks

The general process for enumerating objects in a container is as follows.

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 ADsBuildEnumerator.

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

See also

ADSI Error Codes

ADSI Functions

ADsBuildEnumerator

ADsEnumerateNext

IEnumVARIANT