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.

134 lines
2.6 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. LPWSTR RestorePath;
  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. UNICODE_STRING AdminPassword;
  48. ULONG Options;
  49. HANDLE ImpersonateToken;
  50. UCHAR Decode;
  51. } DSROLEP_OPERATION_DEMOTE_ARGS, *PDSROLEP_OPERATION_DEMOTE_ARGS;
  52. //
  53. // Prototypes for thread functions
  54. //
  55. DWORD
  56. DsRolepThreadPromoteDc(
  57. IN PVOID ArgumentBlock
  58. );
  59. DWORD
  60. DsRolepThreadPromoteReplica(
  61. IN PVOID ArgumentBlock
  62. );
  63. DWORD
  64. DsRolepThreadDemote(
  65. IN PVOID ArgumentBlock
  66. );
  67. DWORD
  68. DsRolepSpinWorkerThread(
  69. IN DSROLEP_OPERATION_TYPE Operation,
  70. IN PVOID ArgumentBlock
  71. );
  72. DWORD
  73. DsRolepBuildPromoteArgumentBlock(
  74. IN LPWSTR DnsDomainName,
  75. IN LPWSTR FlatDomainName,
  76. IN LPWSTR SiteName,
  77. IN LPWSTR DsDatabasePath,
  78. IN LPWSTR DsLogPath,
  79. IN LPWSTR RestorePath,
  80. IN LPWSTR SystemVolumeRootPath,
  81. IN PUNICODE_STRING Bootkey,
  82. IN LPWSTR Parent,
  83. IN LPWSTR Server,
  84. IN LPWSTR Account,
  85. IN PUNICODE_STRING Password,
  86. IN PUNICODE_STRING DomainAdminPassword,
  87. IN PUNICODE_STRING SafeModeAdminPassword,
  88. IN ULONG Options,
  89. IN UCHAR PasswordSeed,
  90. IN OUT PDSROLEP_OPERATION_PROMOTE_ARGS *Promote
  91. );
  92. DWORD
  93. DsRolepBuildDemoteArgumentBlock(
  94. IN DSROLE_SERVEROP_DEMOTE_ROLE ServerRole,
  95. IN LPWSTR DnsDomainName,
  96. IN LPWSTR Account,
  97. IN PUNICODE_STRING Password,
  98. IN ULONG Options,
  99. IN BOOL LastDcInDomain,
  100. IN PUNICODE_STRING DomainAdminPassword,
  101. IN UCHAR PasswordSeed,
  102. OUT PDSROLEP_OPERATION_DEMOTE_ARGS *Demote
  103. );
  104. VOID
  105. DsRolepFreeArgumentBlock(
  106. IN PVOID ArgumentBlock,
  107. IN BOOLEAN Promote
  108. );
  109. #endif // __THREADMAN_H__