Platform SDK: Active Directory, ADSI, and Directory Services |
The DsRoleGetPrimaryDomainInformation function retrieves state information of the computer. This information includes the state of the directory service installation and domain information.
DWORD DsRoleGetPrimaryDomainInformation( LPCWSTR lpServer, DSROLE_PRIMARY_DOMAIN_INFO_LEVEL InfoLevel, PBYTE *Buffer );
If this parameter refers to a Windows NTŪ 4.0 computer, you can retrieve valid information only if the InfoLevel parameter is DsRolePrimaryDomainInfoBasic.
Value | Meaning |
---|---|
DsRolePrimaryDomainInfoBasic | The Buffer parameter is a pointer to a DSROLE_PRIMARY_DOMAIN_INFO_BASIC structure. |
DsRoleUpgradeStatus | The Buffer parameter is a pointer to a DSROLE_UPGRADE_STATUS_INFO structure. |
If the function succeeds, the return value is ERROR_SUCCESS.
If the function fails, the return value can be one of the following error codes.
Windows NT/2000: Requires Windows 2000.
Header: Declared in Dsrole.h.
Library: Included as a resource in Netapi32.dll.
Directory Service Functions, DsRoleFreeMemory, DSROLE_PRIMARY_DOMAIN_INFO_BASIC, DSROLE_UPGRADE_STATUS_INFO