1 /** 2 * This file has no copyright assigned and is placed in the Public Domain. 3 * This file is part of the mingw-w64 runtime package. 4 * No warranty is given; refer to the file DISCLAIMER.PD within this package. 5 */ 6 #ifndef __DSROLE_H__ 7 #define __DSROLE_H__ 8 9 #ifdef __cplusplus 10 extern "C" { 11 #endif 12 13 typedef enum _DSROLE_MACHINE_ROLE { 14 DsRole_RoleStandaloneWorkstation,DsRole_RoleMemberWorkstation,DsRole_RoleStandaloneServer, 15 DsRole_RoleMemberServer,DsRole_RoleBackupDomainController,DsRole_RolePrimaryDomainController 16 } DSROLE_MACHINE_ROLE; 17 18 typedef enum _DSROLE_SERVER_STATE { 19 DsRoleServerUnknown = 0,DsRoleServerPrimary,DsRoleServerBackup 20 } DSROLE_SERVER_STATE,*PDSROLE_SERVER_STATE; 21 22 typedef enum _DSROLE_PRIMARY_DOMAIN_INFO_LEVEL { 23 DsRolePrimaryDomainInfoBasic = 1,DsRoleUpgradeStatus,DsRoleOperationState 24 } DSROLE_PRIMARY_DOMAIN_INFO_LEVEL; 25 26 #define DSROLE_PRIMARY_DS_RUNNING 0x00000001 27 #define DSROLE_PRIMARY_DS_MIXED_MODE 0x00000002 28 #define DSROLE_UPGRADE_IN_PROGRESS 0x00000004 29 #define DSROLE_PRIMARY_DOMAIN_GUID_PRESENT 0x01000000 30 31 typedef struct _DSROLE_PRIMARY_DOMAIN_INFO_BASIC { 32 DSROLE_MACHINE_ROLE MachineRole; 33 ULONG Flags; 34 LPWSTR DomainNameFlat; 35 LPWSTR DomainNameDns; 36 LPWSTR DomainForestName; 37 GUID DomainGuid; 38 } DSROLE_PRIMARY_DOMAIN_INFO_BASIC,*PDSROLE_PRIMARY_DOMAIN_INFO_BASIC; 39 40 typedef struct _DSROLE_UPGRADE_STATUS_INFO { 41 ULONG OperationState; 42 DSROLE_SERVER_STATE PreviousServerState; 43 } DSROLE_UPGRADE_STATUS_INFO,*PDSROLE_UPGRADE_STATUS_INFO; 44 45 typedef enum _DSROLE_OPERATION_STATE { 46 DsRoleOperationIdle = 0,DsRoleOperationActive,DsRoleOperationNeedReboot 47 } DSROLE_OPERATION_STATE; 48 49 typedef struct _DSROLE_OPERATION_STATE_INFO { 50 DSROLE_OPERATION_STATE OperationState; 51 } DSROLE_OPERATION_STATE_INFO,*PDSROLE_OPERATION_STATE_INFO; 52 53 DWORD WINAPI DsRoleGetPrimaryDomainInformation(LPCWSTR lpServer,DSROLE_PRIMARY_DOMAIN_INFO_LEVEL InfoLevel,PBYTE *Buffer); 54 VOID WINAPI DsRoleFreeMemory(PVOID Buffer); 55 56 #ifdef __cplusplus 57 } 58 #endif 59 #endif 60