Skip to content

Latest commit

 

History

History
95 lines (69 loc) · 3.07 KB

nf-ntdsapi-dslistsitesa.md

File metadata and controls

95 lines (69 loc) · 3.07 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist ms.custom f1_keywords dev_langs topic_type api_type api_location api_name
NF:ntdsapi.DsListSitesA
DsListSitesA function (ntdsapi.h)
Lists all the sites in the enterprise forest. (ANSI)
DsListSitesA
ntdsapi/DsListSitesA
ad\dslistsites.htm
ad
d424e750-6700-42b8-9d4f-e430cd0a7e4e
12/05/2018
DsListSites, DsListSites function [Active Directory], DsListSitesA, DsListSitesW, _glines_dslistsites, ad.dslistsites, ntdsapi/DsListSites, ntdsapi/DsListSitesA, ntdsapi/DsListSitesW
ntdsapi.h
Windows
Windows Vista
Windows Server 2008
DsListSitesW (Unicode) and DsListSitesA (ANSI)
Ntdsapi.lib
Ntdsapi.dll
Windows
19H1
DsListSitesA
ntdsapi/DsListSitesA
c++
APIRef
kbSyntax
DllExport
Ntdsapi.dll
DsListSites
DsListSitesA
DsListSitesW

DsListSitesA function

-description

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

-parameters

-param hDs [in]

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

-param 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.

-returns

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.

-remarks

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

Note

The ntdsapi.h header defines DsListSites as an alias which automatically selects the ANSI or Unicode version of this function based on the definition of the UNICODE preprocessor constant. Mixing usage of the encoding-neutral alias with code that not encoding-neutral can lead to mismatches that result in compilation or runtime errors. For more information, see Conventions for Function Prototypes.

-see-also

DS_NAME_RESULT

Domain Controller and Replication Management Functions

DsFreeNameResult