Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

234 lines
6.5 KiB

  1. /*++
  2. Copyright (c) 1991 Microsoft Corporation
  3. Module Name:
  4. dssetup.idl
  5. Abstract:
  6. Author:
  7. Mac McLain (MacM) 09-April-1997
  8. Environment:
  9. User Mode
  10. Revision History:
  11. --*/
  12. [
  13. uuid(3919286a-b10c-11d0-9ba8-00c04fd92ef5),
  14. version(0.0),
  15. pointer_default(unique)
  16. ]
  17. interface dssetup
  18. {
  19. import "dssetimp.idl" ;
  20. #include <lmcons.h>
  21. #include <dssetcon.h>
  22. typedef [handle] LPWSTR PDSROLE_SERVER_NAME, *PPDSROLE_SERVER_NAME;
  23. typedef [context_handle] PVOID DSROLER_HANDLE;
  24. typedef DSROLER_HANDLE *PDSROLER_HANDLE;
  25. typedef struct _DSROLER_PRIMARY_DOMAIN_INFO_BASIC {
  26. DSROLE_MACHINE_ROLE MachineRole;
  27. ULONG Flags;
  28. [ unique, string ] LPWSTR DomainNameFlat;
  29. [ unique, string ] LPWSTR DomainNameDns;
  30. [ unique, string ] LPWSTR DomainForestName;
  31. GUID DomainGuid;
  32. } DSROLER_PRIMARY_DOMAIN_INFO_BASIC, *PDSROLER_PRIMARY_DOMAIN_INFO_BASIC;
  33. typedef [switch_type(DSROLE_PRIMARY_DOMAIN_INFO_LEVEL)] union
  34. _DSROLER_PRIMARY_DOMAIN_INFORMATION {
  35. [case(DsRolePrimaryDomainInfoBasic)] DSROLER_PRIMARY_DOMAIN_INFO_BASIC DomainInfoBasic;
  36. [case(DsRoleUpgradeStatus)] DSROLE_UPGRADE_STATUS_INFO UpgradStatusInfo;
  37. [case(DsRoleOperationState)] DSROLE_OPERATION_STATE_INFO OperationStateInfo;
  38. } DSROLER_PRIMARY_DOMAIN_INFORMATION, *PDSROLER_PRIMARY_DOMAIN_INFORMATION;
  39. typedef struct _DSROLER_SERVEROP_STATUS {
  40. [ unique, string ] LPWSTR CurrentOperationDisplayString;
  41. ULONG OperationStatus;
  42. ULONG CurrentOperationDisplayStringIndex;
  43. } DSROLER_SERVEROP_STATUS, *PDSROLER_SERVEROP_STATUS;
  44. typedef struct _DSROLER_SERVEROP_RESULTS {
  45. ULONG OperationStatus;
  46. [ unique, string ] LPWSTR OperationStatusDisplayString;
  47. [ unique, string ] LPWSTR ServerInstalledSite;
  48. ULONG OperationResultsFlags;
  49. } DSROLER_SERVEROP_RESULTS, *PDSROLER_SERVEROP_RESULTS;
  50. //
  51. // Structure to pass an encrypted password over the wire. The Length is the
  52. // length of the password, which should be placed at the end of the buffer.
  53. //
  54. typedef struct _DSROLEPR_USER_PASSWORD {
  55. UCHAR Obfuscator[DSROLE_OBFUSCATOR_LENGTH];
  56. WCHAR Buffer[DSROLE_MAX_PASSWORD_LENGTH];
  57. ULONG Length;
  58. } DSROLEPR_USER_PASSWORD, *PDSROLEPR_USER_PASSWORD;
  59. //
  60. // Buffer - contains random fill with the password filling up the end
  61. // of the buffer (the last Length bytes).
  62. // Length - Length, in bytes, of the password.
  63. //
  64. //
  65. // This is the encrypted version of the above structure, and is passed
  66. // on the wire.
  67. //
  68. typedef struct _DSROLEPR_ENCRYPTED_USER_PASSWORD {
  69. UCHAR Buffer[ DSROLE_OBFUSCATOR_LENGTH + (DSROLE_MAX_PASSWORD_LENGTH * sizeof(WCHAR)) + sizeof(ULONG) ];
  70. } DSROLEPR_ENCRYPTED_USER_PASSWORD, *PDSROLEPR_ENCRYPTED_USER_PASSWORD;
  71. DWORD
  72. DsRolerGetPrimaryDomainInformation(
  73. [in] handle_t hBinding,
  74. [in] DSROLE_PRIMARY_DOMAIN_INFO_LEVEL InfoLevel,
  75. [out, switch_is( InfoLevel )] PDSROLER_PRIMARY_DOMAIN_INFORMATION *DomainInfo );
  76. DWORD
  77. DsRolerDnsNameToFlatName(
  78. [in] handle_t hBinding,
  79. [in, string] LPWSTR lpDnsName,
  80. [out, string] LPWSTR *lpFlatName,
  81. [out] PDWORD lpStatusFlag
  82. );
  83. DWORD
  84. DsRolerDcAsDc(
  85. [in] handle_t hBinding,
  86. [in, string] LPWSTR lpDnsDomainName,
  87. [in, string] LPWSTR lpFlatDomainName,
  88. [in, unique] PDSROLEPR_ENCRYPTED_USER_PASSWORD DomainAdminPassword,
  89. [in, unique, string] LPWSTR lpSiteName,
  90. [in, string] LPWSTR lpDsDatabasePath,
  91. [in, string] LPWSTR lpDsLogPath,
  92. [in, string] LPWSTR lpSystemVolumeRootPath,
  93. [in, unique, string] LPWSTR lpParentDnsDomainName,
  94. [in, unique, string] LPWSTR lpParentServer,
  95. [in, unique, string] LPWSTR lpAccount,
  96. [in, unique] PDSROLEPR_ENCRYPTED_USER_PASSWORD Password,
  97. [in, unique] PDSROLEPR_ENCRYPTED_USER_PASSWORD DsRepairPassword,
  98. [in] ULONG Options,
  99. [out] PDSROLER_HANDLE DsOperationHandle
  100. );
  101. DWORD
  102. DsRolerDcAsReplica(
  103. [in] handle_t hBinding,
  104. [in, string] LPWSTR lpDnsDomainName,
  105. [in, unique, string] LPWSTR lpReplicaServer,
  106. [in, unique, string] LPWSTR lpSiteName,
  107. [in, string] LPWSTR lpDsDatabasePath,
  108. [in, string] LPWSTR lpDsLogPath,
  109. [in, unique, string] LPWSTR lpRestorePath,
  110. [in, string] LPWSTR lpSystemVolumeRootPath,
  111. [in, unique] PUNICODE_STRING lpBootkey,
  112. [in, unique, string] LPWSTR lpAccount,
  113. [in, unique] PDSROLEPR_ENCRYPTED_USER_PASSWORD Password,
  114. [in, unique] PDSROLEPR_ENCRYPTED_USER_PASSWORD DsRepairPassword,
  115. [in] ULONG Options,
  116. [out] PDSROLER_HANDLE DsOperationHandle
  117. );
  118. DWORD
  119. DsRolerDemoteDc(
  120. [in] handle_t hBinding,
  121. [in, unique, string] LPWSTR lpDnsDomainName,
  122. [in] DSROLE_SERVEROP_DEMOTE_ROLE ServerRole,
  123. [in, unique, string] LPWSTR lpAccount,
  124. [in, unique] PDSROLEPR_ENCRYPTED_USER_PASSWORD Password,
  125. [in] ULONG Options,
  126. [in] BOOL fLastDcInDomain,
  127. [in, unique] PDSROLEPR_ENCRYPTED_USER_PASSWORD AdminPassword,
  128. [out] PDSROLER_HANDLE DsOperationHandle
  129. );
  130. DWORD
  131. DsRolerGetDcOperationProgress(
  132. [in] handle_t hBinding,
  133. [in] PDSROLER_HANDLE DsOperationHandle,
  134. [out] PDSROLER_SERVEROP_STATUS *ServerOperationStatus
  135. );
  136. DWORD
  137. DsRolerGetDcOperationResults(
  138. [in] handle_t hBinding,
  139. [in] PDSROLER_HANDLE DsOperationHandle,
  140. [out] PDSROLER_SERVEROP_RESULTS *ServerOperationResults
  141. );
  142. DWORD
  143. DsRolerCancel(
  144. [in] handle_t hBinding,
  145. [in] PDSROLER_HANDLE DsOperationHandle
  146. );
  147. DWORD
  148. DsRolerServerSaveStateForUpgrade(
  149. [in] handle_t hBinding,
  150. [in, unique, string] LPWSTR AnswerFile
  151. );
  152. DWORD
  153. DsRolerUpgradeDownlevelServer(
  154. [in] handle_t hBinding,
  155. [in, string] LPWSTR lpDnsDomainName,
  156. [in, unique, string] LPWSTR lpSiteName,
  157. [in, string] LPWSTR lpDsDatabasePath,
  158. [in, string] LPWSTR lpDsLogPath,
  159. [in, string] LPWSTR lpSystemVolumeRootPath,
  160. [in, unique, string] LPWSTR lpParentDnsDomainName,
  161. [in, unique, string] LPWSTR lpParentServer,
  162. [in, unique, string] LPWSTR lpAccount,
  163. [in, unique] PDSROLEPR_ENCRYPTED_USER_PASSWORD Password,
  164. [in, unique] PDSROLEPR_ENCRYPTED_USER_PASSWORD DsRepairPassword,
  165. [in] ULONG Options,
  166. [out] PDSROLER_HANDLE DsOperationHandle
  167. );
  168. DWORD
  169. DsRolerAbortDownlevelServerUpgrade(
  170. [in] handle_t hBinding,
  171. [in, unique, string] LPWSTR lpAccount,
  172. [in, unique] PDSROLEPR_ENCRYPTED_USER_PASSWORD Password,
  173. [in, unique] PDSROLEPR_ENCRYPTED_USER_PASSWORD AdminPassword,
  174. [in] ULONG Options
  175. );
  176. DWORD
  177. DsRolerGetDatabaseFacts(
  178. [in] handle_t hBinding,
  179. [in, string] LPWSTR RestorePath,
  180. [out, string] LPWSTR *ppDNSDomainName,
  181. [out] PULONG State
  182. );
  183. }