2.2.1 DSROLER_PRIMARY_DOMAIN_INFO_BASIC
The DSROLER_PRIMARY_DOMAIN_INFO_BASIC structure contains basic information, including the role of the computer, domain name, and GUID of the domain.
-
typedef struct _DSROLER_PRIMARY_DOMAIN_INFO_BASIC { DSROLE_MACHINE_ROLE MachineRole; unsigned __int32 Flags; [unique, string] wchar_t* DomainNameFlat; [unique, string] wchar_t* DomainNameDns; [unique, string] wchar_t* DomainForestName; GUID DomainGuid; } DSROLER_PRIMARY_DOMAIN_INFO_BASIC, *PDSROLER_PRIMARY_DOMAIN_INFO_BASIC;
MachineRole: The current role of the computer, expressed as a DSROLE_MACHINE_ROLE data type.
Flags: The value that indicates the state of the directory service and validity of the information contained in the DomainGuid member. The value of this parameter MUST be zero or a combination of one or more individual flags in the following table. The combination is the result of a bitwise OR of the flags that apply to the computer for which information is being retrieved. All undefined bits MUST be 0.
-
Value
Meaning
DSROLE_PRIMARY_DS_RUNNING
0x00000001
The directory service is running on this computer. If this flag is not set, the directory service is not running on this computer.
DSROLE_PRIMARY_DS_MIXED_MODE
0x00000002
The directory service is running in mixed mode. This flag is valid only if the DSROLE_PRIMARY_DS_RUNNING flag is set and the DSROLE_PRIMARY_DS_READONLY flag is not set.
DSROLE_PRIMARY_DS_READONLY
0x00000008
The computer holds a read-only copy of the directory. This flag is valid only if the DSROLE_PRIMARY_DS_RUNNING flag is set and the DSROLE_PRIMARY_DS_MIXED_MODE flag is not set.
DSROLE_PRIMARY_DOMAIN_GUID_PRESENT
0x01000000
The DomainGuid member contains a valid domain GUID. If this bit is not set, the value in DomainGuid member is undefined.
DomainNameFlat: The NetBIOS name of the domain or non-domain workgroup to which the computer belongs.
DomainNameDns: The domain name of the computer. This member MUST be NULL if the MachineRole member is DsRole_RoleStandaloneWorkstation or DsRole_RoleStandaloneServer and MUST NOT be NULL otherwise.
DomainForestName: The name of the forest to which the computer belongs. This member MUST be NULL, if the computer is a stand-alone workstation or server.
DomainGuid: The UUID of the domain to which the computer belongs. The value of this member is valid only if the DSROLE_PRIMARY_DOMAIN_GUID_PRESENT flag is set.