Platform SDK: Active Directory, ADSI, and Directory Services

DOMAIN_CONTROLLER_INFO

The DOMAIN_CONTROLLER_INFO structure contains information that affects properties of the domain controller (DC).

typedef struct _DOMAIN_CONTROLLER_INFO 
{
  LPTSTR DomainControllerName;
  LPTSTR DomainControllerAddress;
  ULONG  DomainControllerAddressType;
  GUID   DomainGuid;
  LPTSTR DomainName;
  LPTSTR DnsForestName;
  ULONG  Flags;
  LPTSTR DcSiteName;
  LPTSTR ClientSiteName;
} DOMAIN_CONTROLLER_INFO, *PDOMAIN_CONTROLLER_INFO;

Members

DomainControllerName
Pointer to a null-terminated Unicode string specifying the computer name of the discovered domain controller. The returned computer name is prefixed with \\. The DNS-style name (for example, \\phoenix.microsoft.com) will be returned if available. If a DNS-style name is returned, it will be terminated with a period, indicating that the returned name is an absolute (non-relative) DNS name. If the DNS-style name is not available, the flat-style name (for example, \\phoenix) will be returned. This example would apply if the domain is a Windows NT® 4.0 domain or if the domain does not support the IP family of protocols.
DomainControllerAddress
Pointer to a zero-terminated Unicode string specifying the address of the discovered domain controller. The address is prefixed with \\ to aid in passing it as the ComputerName parameter in the directory service (DS) functions to various subsequent functions. This string will be one of the types defined by DomainControllerAddressType.
DomainControllerAddressType
Indicates the type of address specified in DomainControllerAddress. The following valid values are presented in order, in case multiple forms are known.
Value Meaning
DS_INET_ADDRESS Address is a string IP address (for example, \\157.55.94.74) of the domain controller.
DS_NETBIOS_ADDRESS The NetBIOS name (for example, \\phoenix) of the domain controller.

DomainGuid
The GUID of the domain. This member will be zero if the domain controller does not have a Domain GUID (for example, the domain controller is not a Windows® 2000 domain controller).
DomainName
Pointer to a zero-terminated Unicode string specifying the name of the domain. The DNS-style name (for example, microsoft.com) will be returned if available. Otherwise, the flat-style name (for example, Microsoft) will be returned. This name may be different than the requested domain name if the domain has been renamed. If a DNS-style name is returned, it will be terminated by a period, indicating that the returned name is an absolute (non-relative) DNS name.
DnsForestName
Pointer to a zero-terminated Unicode string specifying the name of the domain at the root of the DS tree. The DNS-style name (for example, microsoft.com) will be returned if available. Otherwise, the flat-style name (for example, Microsoft) will be returned. If a DNS-style name is returned, it will be terminated be a period indicating that the returned name is an absolute (non-relative) DNS name.
Flags
The following flags describe the domain controller.
Value Meaning
DS_DNS_CONTROLLER_FLAG DomainControllerName is in DNS format.
DS_DNS_DOMAIN_FLAG DomainName is in DNS format.
DS_DNS_FOREST_FLAG DnsForestName is in DNS format.
DS_DS_FLAG Domain controller is a directory service server for the domain.
DS_GC_FLAG Domain controller is a global catalog server for DnsForestName.
DS_KDC_FLAG Domain controller is a Kerberos Key Distribution Center for the domain.
DS_PDC_FLAG Domain controller is the PDC of the domain.
DS_TIMESERV_FLAG Domain controller is running the Windows Time Service for the domain.
DS_WRITABLE_FLAG Domain controller hosts a writeable directory service (or SAM).

DcSiteName
The name of the site where the domain controller is located. This value may be NULL if the domain controller is not in a site (for example, the domain controller is a Windows NT® 4.0 domain controller).
ClientSiteName
The name of the site where the domain controller is configured to be in. This value may be NULL if the site that the computer named by ComputerName cannot be found (for example, if the DS administrator has not associated the subnet that the computer is in with a valid site).

Requirements

  Windows NT/2000: Requires Windows 2000.
  Header: Declared in Dsgetdc.h.
  Unicode: Declared as Unicode and ANSI structures.

See Also

Directory Service Structures, DsGetDcName