Windows Dev Center

ADsFreeEnumerator function

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

Syntax


HRESULT ADsFreeEnumerator(
  _In_ IEnumVARIANT *pEnumVariant
);

Parameters

pEnumVariant [in]

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.

Return codeDescription
S_OK

The enumerator object was freed successfully.

E_ADS_BAD_PARAMETER

The specified enumerator is invalid.

 

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

Minimum supported client

Windows Vista

Minimum supported server

Windows Server 2003

Header

Adshlp.h

Library

Activeds.lib

DLL

Activeds.dll

See also

ADSI Error Codes
ADSI Functions
ADsBuildEnumerator
ADsEnumerateNext
IEnumVARIANT

 

 

Show:
© 2015 Microsoft