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.

138 lines
2.9 KiB

  1. /*++
  2. Copyright (c) 1997 Microsoft Corporation
  3. Module Name:
  4. dssetp.ch
  5. Abstract:
  6. Routines the
  7. Author:
  8. Colin Brace (ColinBr) April 5, 1999
  9. Environment:
  10. User Mode
  11. Revision History:
  12. Mac McLain (MacM) Feb 10, 1997
  13. --*/
  14. #ifndef __THREADMAN_H__
  15. #define __THREADMAN_H__
  16. //
  17. // Arguments for the promote thread
  18. //
  19. typedef struct _DSROLEP_OPERATION_PROMOTE_ARGS {
  20. LPWSTR DnsDomainName;
  21. LPWSTR FlatDomainName;
  22. LPWSTR SiteName;
  23. LPWSTR DsDatabasePath;
  24. LPWSTR DsLogPath;
  25. IFM_SYSTEM_INFO * pIfmSystemInfo;
  26. LPWSTR SysVolRootPath;
  27. UNICODE_STRING Bootkey;
  28. LPWSTR Parent;
  29. LPWSTR Server;
  30. LPWSTR Account;
  31. UNICODE_STRING Password;
  32. UNICODE_STRING DomainAdminPassword;
  33. ULONG Options;
  34. HANDLE ImpersonateToken;
  35. UCHAR Decode;
  36. UNICODE_STRING SafeModePassword;
  37. } DSROLEP_OPERATION_PROMOTE_ARGS, *PDSROLEP_OPERATION_PROMOTE_ARGS;
  38. //
  39. // Argument threads for the demotion thread
  40. //
  41. typedef struct _DSROLEP_OPERATION_DEMOTE_ARGS {
  42. DSROLE_SERVEROP_DEMOTE_ROLE ServerRole;
  43. LPWSTR DomainName;
  44. LPWSTR Account;
  45. UNICODE_STRING Password;
  46. BOOLEAN LastDcInDomain;
  47. ULONG cRemoveNCs;
  48. LPWSTR * pszRemoveNCs;
  49. UNICODE_STRING AdminPassword;
  50. ULONG Options;
  51. HANDLE ImpersonateToken;
  52. UCHAR Decode;
  53. } DSROLEP_OPERATION_DEMOTE_ARGS, *PDSROLEP_OPERATION_DEMOTE_ARGS;
  54. //
  55. // Prototypes for thread functions
  56. //
  57. DWORD
  58. DsRolepThreadPromoteDc(
  59. IN PVOID ArgumentBlock
  60. );
  61. DWORD
  62. DsRolepThreadPromoteReplica(
  63. IN PVOID ArgumentBlock
  64. );
  65. DWORD
  66. DsRolepThreadDemote(
  67. IN PVOID ArgumentBlock
  68. );
  69. DWORD
  70. DsRolepSpinWorkerThread(
  71. IN DSROLEP_OPERATION_TYPE Operation,
  72. IN PVOID ArgumentBlock
  73. );
  74. DWORD
  75. DsRolepBuildPromoteArgumentBlock(
  76. IN LPWSTR DnsDomainName,
  77. IN LPWSTR FlatDomainName,
  78. IN LPWSTR SiteName,
  79. IN LPWSTR DsDatabasePath,
  80. IN LPWSTR DsLogPath,
  81. IN IFM_SYSTEM_INFO * pIfmSystemInfo,
  82. IN LPWSTR SystemVolumeRootPath,
  83. IN PUNICODE_STRING Bootkey,
  84. IN LPWSTR Parent,
  85. IN LPWSTR Server,
  86. IN LPWSTR Account,
  87. IN PUNICODE_STRING Password,
  88. IN PUNICODE_STRING DomainAdminPassword,
  89. IN PUNICODE_STRING SafeModeAdminPassword,
  90. IN ULONG Options,
  91. IN UCHAR PasswordSeed,
  92. IN OUT PDSROLEP_OPERATION_PROMOTE_ARGS *Promote
  93. );
  94. DWORD
  95. DsRolepBuildDemoteArgumentBlock(
  96. IN DSROLE_SERVEROP_DEMOTE_ROLE ServerRole,
  97. IN LPWSTR DnsDomainName,
  98. IN LPWSTR Account,
  99. IN PUNICODE_STRING Password,
  100. IN ULONG Options,
  101. IN BOOL LastDcInDomain,
  102. IN ULONG cRemoveNCs,
  103. IN LPWSTR * pszRemoveNCs,
  104. IN PUNICODE_STRING DomainAdminPassword,
  105. IN UCHAR PasswordSeed,
  106. OUT PDSROLEP_OPERATION_DEMOTE_ARGS *Demote
  107. );
  108. VOID
  109. DsRolepFreeArgumentBlock(
  110. IN PVOID ArgumentBlock,
  111. IN BOOLEAN Promote
  112. );
  113. #endif // __THREADMAN_H__