Sets the calling thread's last-error code value. This function can be used by Active Directory providers to set extended errors. It saves away the error infomation in a "per thread" data structure. This function acts in the same manner as the Win32 function SetLastError.
VOID ADsSetLastError(
  DWORD dwErr,      //Error code
  LPWSTR pszError,  //Pointer to error string
  LPWSTR            //Pointer to provider name
);
 None.
The ADsEnumerateNext helper function populates a VARIANT array with elements fetched from an enumerator object. The number of elements retrieved can be smaller than the number requested.
  Windows NT:  Use version 4.0 and later. 
  Windows CE:  Unsupported.
ADsBuildEnumerator, ADsFreeEnumerator