Directory Services |
The DsListInfoForServer function lists miscellaneous data for a server.
DWORD DsListInfoForServer( HANDLE hDs, LPTSTR server, PDS_NAME_RESULT* ppInfo );
The indexes 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 data.
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 fails, the return value can be one of the following error codes.
Return Code | Description |
---|---|
ERROR_INVALID_PARAMETER | A parameter is incorrect. |
ERROR_NOT_ENOUGH_MEMORY | There is insufficient memory available. |
Individual name conversion errors are reported in the returned DS_NAME_RESULT structure.
Client: Included in Windows XP and
Windows 2000 Professional.
Server: Included in Windows Server 2003 and
Windows 2000 Server.
Redistributable: Requires Active Directory Client Extension
on Windows NT 4.0 SP6a and Windows 95/98/Me.
Unicode: Implemented as Unicode and ANSI versions on Windows
NT/2000/XP.
Header: Declared in Ntdsapi.h.
Library: Use Ntdsapi.lib.
DsFreeNameResult, DS_NAME_RESULT, Domain Controller and Replication Management Functions