ADsSetLastError

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
);
 

Parameters

dwErr
[in] The error code that occurred. If this is a Windows-defined error, pszError is ignored. If this is ERROR_EXTENDED_ERROR, it indicates the provider has a network-specific error to report.
pszError
[in] String describing the network-specific error.
pszProviderName
[in] String naming the Active Directory provider raising the error.

Return Values

None.

Remarks

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.

QuickInfo

  Windows NT: Use version 4.0 and later.
  Windows CE: Unsupported.

See Also

ADsBuildEnumerator, ADsFreeEnumerator