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.DsGetDomainControllerInfoW |
DsGetDomainControllerInfoW function (ntdsapi.h) |
Retrieves data about the domain controllers in a domain. (Unicode) |
|
ad\dsgetdomaincontrollerinfo.htm |
ad |
52db3b25-e6b0-4a0d-831b-89a203580cf1 |
12/05/2018 |
1, 2, 3, DsGetDomainControllerInfo, DsGetDomainControllerInfo function [Active Directory], DsGetDomainControllerInfoA, DsGetDomainControllerInfoW, _glines_dsgetdomaincontrollerinfo, ad.dsgetdomaincontrollerinfo, ntdsapi/DsGetDomainControllerInfo, ntdsapi/DsGetDomainControllerInfoA, ntdsapi/DsGetDomainControllerInfoW |
ntdsapi.h |
Windows |
Windows Vista |
Windows Server 2008 |
DsGetDomainControllerInfoW (Unicode) and DsGetDomainControllerInfoA (ANSI) |
Ntdsapi.lib |
Ntdsapi.dll |
Windows |
19H1 |
|
|
|
|
|
|
The DsGetDomainControllerInfo function retrieves data about the domain controllers in a domain.
Contains a directory service handle obtained from either the DSBind or DSBindWithCred function.
Pointer to a null-terminated string that specifies the domain name.
Contains a value that indicates the version of the DS_DOMAIN_CONTROLLER_INFO structure to return. This can be one of the following values.
The function provides the domain data in the DS_DOMAIN_CONTROLLER_INFO_1 structure format.
The function provides the domain data in the DS_DOMAIN_CONTROLLER_INFO_2 structure format.
The function provides the domain data in the DS_DOMAIN_CONTROLLER_INFO_3 structure format.
Pointer to a DWORD variable that receives the number of items returned in ppInfo array.
Pointer to a pointer variable that receives an array of DS_DOMAIN_CONTROLLER_INFO_* structures. The type of structures in this array is defined by the InfoLevel parameter. The caller must free this array, when it is no longer required, by using the DsFreeDomainControllerInfo function.
The function provides the domain data in the DS_DOMAIN_CONTROLLER_INFO_1 structure format.
The function provides the domain data in the DS_DOMAIN_CONTROLLER_INFO_2 structure format.
The function provides the domain data in the DS_DOMAIN_CONTROLLER_INFO_3 structure format.
If the function returns domain controller data, the return value is ERROR_SUCCESS. If the caller does not have the privileges to access the server objects, the return value is ERROR_SUCCESS, but the DS_DOMAIN_CONTROLLER_INFO structures could be empty.
If the function fails, the return value can be one of the following error codes.
Domain Controller and Replication Management Functions
Note
The ntdsapi.h header defines DsGetDomainControllerInfo 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.