Builds an enumerator object for the specified Active Directory container object.
HRESULT ADsBuildEnumerator(
IADsContainer * pADsContainer, //The object to be enumerated
IEnumVARIANT **ppEnumVariant //Enumerator object
);
This method supports the standard return values E_FAIL and E_UNEXPECTED, as well as the following:
The ADsBuildEnumerator helper function encapsulates the code required to create an enumerator object. It calls the IADsContainer::get__NewEnum method to create an enumerator object and then calls the QueryInterface method of IUnknown to get a pointer to the IEnumVARIANT interface for that object. The enumeration object is the Automation mechanism to enumerate over containers. Use ADsFreeEnumerator to release this enumerator object.
Windows NT: Use version 4.0 and later.
Windows CE: Unsupported.
ADsEnumerateNext, ADsFreeEnumerator