Platform SDK: Active Directory, ADSI, and Directory Services |
The DsListInfoForServer function lists miscellaneous information for a server.
DWORD DsListInfoForServer( HANDLE hDs, LPTSTR server, PDS_NAME_RESULTW *ppInfo );
The indices of the array in the DS_NAME_RESULT structure indicate what data are contained by each array element. The following constants may be used to specify the desired index for a particular piece of information.
Value | Meaning |
---|---|
DS_LIST_ACCOUNT_OBJECT_FOR_SERVER | Name of the account object for the domain controller (DC). |
DS_LIST_DNS_HOST_NAME_FOR_SERVER | DNS host name of the DC. |
DS_LIST_DSA_OBJECT_FOR_SERVER | GUID of the directory service agent (DSA) for the domain controller (DC). |
If the function returns server information, the return value is NO_ERROR.
If the function fails, the return value can be one of the following error codes.
Individual name conversion errors are reported in the returned DS_NAME_RESULT structure.
Windows NT/2000: Requires Windows 2000.
Header: Declared in Ntdsapi.h.
Library: Included as a resource in Ntdsapi.dll.
Unicode: Implemented as Unicode and ANSI versions on Windows 2000.
DC and Replication Management Functions, DsFreeNameResult, DS_NAME_RESULT