Leaked source code of windows server 2003
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.

272 lines
7.7 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 [context_handle] PVOID DSROLER_IFM_HANDLE;
  25. typedef DSROLER_HANDLE *PDSROLER_HANDLE;
  26. typedef struct _DSROLER_PRIMARY_DOMAIN_INFO_BASIC {
  27. DSROLE_MACHINE_ROLE MachineRole;
  28. ULONG Flags;
  29. [ unique, string ] LPWSTR DomainNameFlat;
  30. [ unique, string ] LPWSTR DomainNameDns;
  31. [ unique, string ] LPWSTR DomainForestName;
  32. GUID DomainGuid;
  33. } DSROLER_PRIMARY_DOMAIN_INFO_BASIC, *PDSROLER_PRIMARY_DOMAIN_INFO_BASIC;
  34. typedef [switch_type(DSROLE_PRIMARY_DOMAIN_INFO_LEVEL)] union
  35. _DSROLER_PRIMARY_DOMAIN_INFORMATION {
  36. [case(DsRolePrimaryDomainInfoBasic)] DSROLER_PRIMARY_DOMAIN_INFO_BASIC DomainInfoBasic;
  37. [case(DsRoleUpgradeStatus)] DSROLE_UPGRADE_STATUS_INFO UpgradStatusInfo;
  38. [case(DsRoleOperationState)] DSROLE_OPERATION_STATE_INFO OperationStateInfo;
  39. } DSROLER_PRIMARY_DOMAIN_INFORMATION, *PDSROLER_PRIMARY_DOMAIN_INFORMATION;
  40. DWORD
  41. DsRolerGetPrimaryDomainInformation(
  42. [in] handle_t hBinding,
  43. [in] DSROLE_PRIMARY_DOMAIN_INFO_LEVEL InfoLevel,
  44. [out, switch_is( InfoLevel )] PDSROLER_PRIMARY_DOMAIN_INFORMATION *DomainInfo );
  45. }
  46. /***********************************************************
  47. * *
  48. * DsRole Interface for promoting and demoting machines. *
  49. * *
  50. ***********************************************************/
  51. [
  52. uuid(1cbcad78-df0b-4934-b558-87839ea501c9),
  53. version(0.0),
  54. pointer_default(unique),
  55. endpoint("ncalrpc:[dsrole]")
  56. ]
  57. interface dsrole
  58. {
  59. typedef struct _DSROLER_SERVEROP_STATUS {
  60. [ unique, string ] LPWSTR CurrentOperationDisplayString;
  61. ULONG OperationStatus;
  62. ULONG CurrentOperationDisplayStringIndex;
  63. } DSROLER_SERVEROP_STATUS, *PDSROLER_SERVEROP_STATUS;
  64. typedef struct _DSROLER_SERVEROP_RESULTS {
  65. ULONG OperationStatus;
  66. [ unique, string ] LPWSTR OperationStatusDisplayString;
  67. [ unique, string ] LPWSTR ServerInstalledSite;
  68. ULONG OperationResultsFlags;
  69. } DSROLER_SERVEROP_RESULTS, *PDSROLER_SERVEROP_RESULTS;
  70. //
  71. // Structure to pass an encrypted password over the wire. The Length is the
  72. // length of the password, which should be placed at the end of the buffer.
  73. //
  74. typedef struct _DSROLEPR_USER_PASSWORD {
  75. UCHAR Obfuscator[DSROLE_OBFUSCATOR_LENGTH];
  76. WCHAR Buffer[DSROLE_MAX_PASSWORD_LENGTH];
  77. ULONG Length;
  78. } DSROLEPR_USER_PASSWORD, *PDSROLEPR_USER_PASSWORD;
  79. //
  80. // Buffer - contains random fill with the password filling up the end
  81. // of the buffer (the last Length bytes).
  82. // Length - Length, in bytes, of the password.
  83. //
  84. //
  85. // This is the encrypted version of the above structure, and is passed
  86. // on the wire.
  87. //
  88. typedef struct _DSROLEPR_ENCRYPTED_USER_PASSWORD {
  89. UCHAR Buffer[ DSROLE_OBFUSCATOR_LENGTH + (DSROLE_MAX_PASSWORD_LENGTH * sizeof(WCHAR)) + sizeof(ULONG) ];
  90. } DSROLEPR_ENCRYPTED_USER_PASSWORD, *PDSROLEPR_ENCRYPTED_USER_PASSWORD;
  91. //
  92. //Structure that contains the Encrypted Hash of the BootKey
  93. //
  94. typedef struct _DSROLEPR_ENCRYPTED_HASH {
  95. UNICODE_STRING EncryptedHash;
  96. BYTE Salt[ DSROLE_SALT_LENGTH ];
  97. } DSROLEPR_ENCRYPTED_HASH, *PDSROLEPR_ENCRYPTED_HASH;
  98. DWORD
  99. DsRolerDnsNameToFlatName(
  100. [in] handle_t hBinding,
  101. [in, string] LPWSTR lpDnsName,
  102. [out, string] LPWSTR *lpFlatName,
  103. [out] PDWORD lpStatusFlag
  104. );
  105. DWORD
  106. DsRolerDcAsDc(
  107. [in] handle_t hBinding,
  108. [in, string] LPWSTR lpDnsDomainName,
  109. [in, string] LPWSTR lpFlatDomainName,
  110. [in, unique] PDSROLEPR_ENCRYPTED_USER_PASSWORD DomainAdminPassword,
  111. [in, unique, string] LPWSTR lpSiteName,
  112. [in, string] LPWSTR lpDsDatabasePath,
  113. [in, string] LPWSTR lpDsLogPath,
  114. [in, string] LPWSTR lpSystemVolumeRootPath,
  115. [in, unique, string] LPWSTR lpParentDnsDomainName,
  116. [in, unique, string] LPWSTR lpParentServer,
  117. [in, unique, string] LPWSTR lpAccount,
  118. [in, unique] PDSROLEPR_ENCRYPTED_USER_PASSWORD Password,
  119. [in, unique] PDSROLEPR_ENCRYPTED_USER_PASSWORD DsRepairPassword,
  120. [in] ULONG Options,
  121. [out] PDSROLER_HANDLE DsOperationHandle
  122. );
  123. DWORD
  124. DsRolerDcAsReplica(
  125. [in] handle_t hBinding,
  126. [in, string] LPWSTR lpDnsDomainName,
  127. [in, unique, string] LPWSTR lpReplicaServer,
  128. [in, unique, string] LPWSTR lpSiteName,
  129. [in, string] LPWSTR lpDsDatabasePath,
  130. [in, string] LPWSTR lpDsLogPath,
  131. [in, unique, string] LPWSTR lpRestorePath,
  132. [in, string] LPWSTR lpSystemVolumeRootPath,
  133. [in, unique] PDSROLEPR_ENCRYPTED_HASH lpBootkey,
  134. [in, unique, string] LPWSTR lpAccount,
  135. [in, unique] PDSROLEPR_ENCRYPTED_USER_PASSWORD Password,
  136. [in, unique] PDSROLEPR_ENCRYPTED_USER_PASSWORD DsRepairPassword,
  137. [in] ULONG Options,
  138. [out] PDSROLER_HANDLE DsOperationHandle
  139. );
  140. DWORD
  141. DsRolerDemoteDc(
  142. [in] handle_t hBinding,
  143. [in, unique, string] LPWSTR lpDnsDomainName,
  144. [in] DSROLE_SERVEROP_DEMOTE_ROLE ServerRole,
  145. [in, unique, string] LPWSTR lpAccount,
  146. [in, unique] PDSROLEPR_ENCRYPTED_USER_PASSWORD Password,
  147. [in] ULONG Options,
  148. [in] BOOL fLastDcInDomain,
  149. [in, range(0,200) ] ULONG cRemoveNCs,
  150. [in, unique, size_is(cRemoveNCs)] [string] LPCWSTR * pszRemoveNCs,
  151. [in, unique] PDSROLEPR_ENCRYPTED_USER_PASSWORD AdminPassword,
  152. [out] PDSROLER_HANDLE DsOperationHandle
  153. );
  154. DWORD
  155. DsRolerGetDcOperationProgress(
  156. [in] handle_t hBinding,
  157. [in] PDSROLER_HANDLE DsOperationHandle,
  158. [out] PDSROLER_SERVEROP_STATUS *ServerOperationStatus
  159. );
  160. DWORD
  161. DsRolerGetDcOperationResults(
  162. [in] handle_t hBinding,
  163. [in] PDSROLER_HANDLE DsOperationHandle,
  164. [out] PDSROLER_SERVEROP_RESULTS *ServerOperationResults
  165. );
  166. DWORD
  167. DsRolerCancel(
  168. [in] handle_t hBinding,
  169. [in] PDSROLER_HANDLE DsOperationHandle
  170. );
  171. DWORD
  172. DsRolerIfmHandleFree(
  173. [in] handle_t hBinding,
  174. [in] DSROLER_IFM_HANDLE * pIfmHandle
  175. );
  176. DWORD
  177. DsRolerServerSaveStateForUpgrade(
  178. [in] handle_t hBinding,
  179. [in, unique, string] LPWSTR AnswerFile
  180. );
  181. DWORD
  182. DsRolerUpgradeDownlevelServer(
  183. [in] handle_t hBinding,
  184. [in, string] LPWSTR lpDnsDomainName,
  185. [in, unique, string] LPWSTR lpSiteName,
  186. [in, string] LPWSTR lpDsDatabasePath,
  187. [in, string] LPWSTR lpDsLogPath,
  188. [in, string] LPWSTR lpSystemVolumeRootPath,
  189. [in, unique, string] LPWSTR lpParentDnsDomainName,
  190. [in, unique, string] LPWSTR lpParentServer,
  191. [in, unique, string] LPWSTR lpAccount,
  192. [in, unique] PDSROLEPR_ENCRYPTED_USER_PASSWORD Password,
  193. [in, unique] PDSROLEPR_ENCRYPTED_USER_PASSWORD DsRepairPassword,
  194. [in] ULONG Options,
  195. [out] PDSROLER_HANDLE DsOperationHandle
  196. );
  197. DWORD
  198. DsRolerAbortDownlevelServerUpgrade(
  199. [in] handle_t hBinding,
  200. [in, unique, string] LPWSTR lpAccount,
  201. [in, unique] PDSROLEPR_ENCRYPTED_USER_PASSWORD Password,
  202. [in, unique] PDSROLEPR_ENCRYPTED_USER_PASSWORD AdminPassword,
  203. [in] ULONG Options
  204. );
  205. DWORD
  206. DsRolerGetDatabaseFacts(
  207. [in] handle_t hBinding,
  208. [in, string] LPWSTR RestorePath,
  209. [out, string] LPWSTR *ppDNSDomainName,
  210. [out] PULONG State,
  211. [out] DSROLER_IFM_HANDLE * pIfmHandle
  212. );
  213. }