This topic has not yet been rated - Rate this topic

DsListSites function

The DsListSites function lists all the sites in the enterprise forest.

Syntax


DWORD DsListSites(
  _In_   HANDLE hDs,
  _Out_  PDS_NAME_RESULT *ppSites
);

Parameters

hDs [in]

Contains a directory service handle obtained from either the DSBind or DSBindWithCred function.

ppSites [out]

Pointer to a pointer to a DS_NAME_RESULT structure that receives the list of sites in the enterprise. The site name is returned in the distinguished name (DN) format. The returned structure must be freed using the DsFreeNameResult function.

Return value

If the function returns a list of sites, the return value is NO_ERROR. If the function fails, the return value can be one of the following error codes.

Return codeDescription
ERROR_INVALID_PARAMETER

A parameter is invalid.

ERROR_NOT_ENOUGH_MEMORY

There is insufficient memory available.

 

Remarks

Individual name conversion errors are reported in the returned DS_NAME_RESULT structure.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Redistributable

Active Directory Client Extension on Windows NT 4.0 and Windows Me/98/95

Header

Ntdsapi.h

Library

Ntdsapi.lib

DLL

Ntdsapi.dll

Unicode and ANSI names

DsListSitesW (Unicode) and DsListSitesA (ANSI)

See also

Domain Controller and Replication Management Functions
DS_NAME_RESULT
DsFreeNameResult

 

 

Send comments about this topic to Microsoft

Build date: 10/26/2012

Did you find this helpful?
(1500 characters remaining)

Community Additions

ADD
© 2013 Microsoft. All rights reserved.