Platform SDK: Active Directory, ADSI, and Directory Services

DSROLE_PRIMARY_DOMAIN_INFO_BASIC

The DSROLE_PRIMARY_DOMAIN_INFO_BASIC structure represents domain status information.

typedef struct _DSROLE_PRIMARY_DOMAIN_INFO_BASIC 
{
  DSROLE_MACHINE_ROLE MachineRole;
  ULONG Flags;
  LPWSTR DomainNameFlat;
  LPWSTR DomainNameDns;
  LPWSTR DomainTreeName;
  GUID DomainGuid;
} DSROLE_PRIMARY_DOMAIN_INFO_BASIC, *PDSROLE_PRIMARY_DOMAIN_INFO_BASIC;

Members

MachineRole
Specifies the role of the computer. This member can be one of the following values.

DsRole_RoleStandaloneWorkstation
DsRole_RoleMemberWorkstation
DsRole_RoleStandaloneServer
DsRole_RoleMemberServer
DsRole_RoleMemberServer
DsRole_RoleBackupDomainController
DsRole_RolePrimaryDomainController

Flags
Indicates which information has been returned. This member can be one of the following values.
Value Meaning
DSROLE_PRIMARY_DOMAIN_GUID_PRESENT The DomainGuid member contains a valid domain GUID.
DSROLE_PRIMARY_DS_MIXED_MODE The directory service is running in mixed mode. This flag is valid only if the DSROLE_PRIMARY_DS_RUNNING flag is set.
DSROLE_PRIMARY_DS_RUNNING The directory service is running on this computer.
DSROLE_UPGRADE_IN_PROGRESS The computer is being upgraded from a previous version of Windows NT®/Windows® 2000.

DomainNameFlat
Specifies the NetBIOS domain name.
DomainNameDns
Specifies the DNS domain name. This member is optional.
DomainTreeName
Specifies the name of the forest. This member is optional.
DomainGuid
Specifies the domain GUID. This member is valid only if the DSROLE_PRIMARY_DOMAIN_GUID_PRESENT flag is used in the Flags member.

Requirements

  Windows NT/2000: Requires Windows 2000.
  Header: Declared in Dsrole.h.

See Also

Directory Service Structures, DsRoleGetPrimaryDomainInformation