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.

197 lines
3.6 KiB

  1. /*++
  2. Copyright (c) 1998 Microsoft Corporation
  3. Module Name:
  4. imirror.h
  5. Abstract:
  6. This is the include file for the IntelliMirror conversion DLL
  7. Author:
  8. Sean Selitrennikoff - 4/5/98
  9. Revision History:
  10. --*/
  11. //
  12. // These are the action codes for the file error report callback
  13. //
  14. #define COPY_ERROR_ACTION_CREATE_FILE 1
  15. #define COPY_ERROR_ACTION_OPEN_DIR 2
  16. #define COPY_ERROR_ACTION_CREATE_DIR 3
  17. #define COPY_ERROR_ACTION_SETATTR 4
  18. #define COPY_ERROR_ACTION_GETATTR 5
  19. #define COPY_ERROR_ACTION_GETACL 6
  20. #define COPY_ERROR_ACTION_SETACL 7
  21. #define COPY_ERROR_ACTION_DELETE 8
  22. #define COPY_ERROR_ACTION_ENUMERATE 9
  23. #define COPY_ERROR_ACTION_MALLOC 10
  24. #define COPY_ERROR_ACTION_SETTIME 11
  25. #define COPY_ERROR_ACTION_GETSFN 12
  26. #define COPY_ERROR_ACTION_SETSFN 13
  27. //
  28. // Basic To Do items
  29. //
  30. typedef enum _IMIRROR_TODO {
  31. IMirrorNone,
  32. IMirrorInitialize,
  33. VerifySystemIsNt5,
  34. CheckPartitions,
  35. CopyPartitions,
  36. CopyFiles,
  37. CopyRegistry,
  38. PatchDSEntries,
  39. RebootSystem
  40. } IMIRROR_TODO, *PIMIRROR_TODO;
  41. //
  42. // Client call back function definitions
  43. //
  44. typedef
  45. NTSTATUS
  46. (*IMIRROR_ERROR_CALLBACK)(
  47. IN PVOID Context,
  48. IN NTSTATUS Status,
  49. IN IMIRROR_TODO IMirrorFunctionId
  50. );
  51. typedef
  52. NTSTATUS
  53. (*IMIRROR_NOWDOING_CALLBACK)(
  54. IN PVOID Context,
  55. IN IMIRROR_TODO Function,
  56. IN PWSTR String
  57. );
  58. typedef
  59. NTSTATUS
  60. (*IMIRROR_GETMIRRORDIR_CALLBACK)(
  61. IN PVOID Context,
  62. OUT PWSTR Server,
  63. IN OUT PULONG Length
  64. );
  65. typedef
  66. NTSTATUS
  67. (*IMIRROR_GETSETUP_CALLBACK)(
  68. IN PVOID Context,
  69. IN PWSTR Server,
  70. OUT PWSTR SetupPath,
  71. IN OUT PULONG Length
  72. );
  73. typedef
  74. NTSTATUS
  75. (*IMIRROR_SETSYSTEM_CALLBACK)(
  76. IN PVOID Context,
  77. IN PWSTR SystemPath,
  78. IN ULONG Length
  79. );
  80. typedef
  81. NTSTATUS
  82. (*IMIRROR_FILECREATE_CALLBACK)(
  83. IN PVOID Context,
  84. IN PWSTR FileName,
  85. IN ULONG FileAction,
  86. IN ULONG Status
  87. );
  88. typedef
  89. NTSTATUS
  90. (*IMIRROR_REGSAVE_CALLBACK)(
  91. IN PVOID Context,
  92. IN PWSTR Name,
  93. IN ULONG Status
  94. );
  95. typedef
  96. NTSTATUS
  97. (*IMIRROR_REINIT_CALLBACK)(
  98. IN PVOID Context
  99. );
  100. typedef
  101. NTSTATUS
  102. (*IMIRROR_ADDTODO_CALLBACK)(
  103. IN PVOID Context,
  104. IN IMIRROR_TODO Function,
  105. IN PWSTR String,
  106. IN ULONG Length
  107. );
  108. typedef
  109. NTSTATUS
  110. (*IMIRROR_REBOOT_CALLBACK)(
  111. IN PVOID Context
  112. );
  113. typedef
  114. NTSTATUS
  115. (*IMIRROR_REMOVETODO_CALLBACK)(
  116. IN PVOID Context,
  117. IN IMIRROR_TODO Function,
  118. IN PWSTR String,
  119. IN ULONG Length
  120. );
  121. typedef struct _IMIRROR_CALLBACK {
  122. PVOID Context;
  123. IMIRROR_ERROR_CALLBACK ErrorFn;
  124. IMIRROR_NOWDOING_CALLBACK NowDoingFn;
  125. IMIRROR_GETSETUP_CALLBACK GetSetupFn;
  126. IMIRROR_FILECREATE_CALLBACK FileCreateFn;
  127. IMIRROR_REGSAVE_CALLBACK RegSaveErrorFn;
  128. IMIRROR_REINIT_CALLBACK ReinitFn;
  129. IMIRROR_GETMIRRORDIR_CALLBACK GetMirrorDirFn;
  130. IMIRROR_SETSYSTEM_CALLBACK SetSystemDirFn;
  131. IMIRROR_ADDTODO_CALLBACK AddToDoFn;
  132. IMIRROR_REMOVETODO_CALLBACK RemoveToDoFn;
  133. IMIRROR_REBOOT_CALLBACK RebootFn;
  134. } IMIRROR_CALLBACK, *PIMIRROR_CALLBACK;
  135. extern IMIRROR_CALLBACK Callbacks;
  136. //
  137. // Dll entry point
  138. //
  139. DWORD
  140. IMirrorInitDll(
  141. IN HINSTANCE hInst,
  142. IN DWORD Reason,
  143. IN PVOID Context
  144. );
  145. VOID
  146. IMirrorInitCallback(
  147. IN PIMIRROR_CALLBACK Callbacks
  148. );
  149. NTSTATUS
  150. ProcessToDoItems(
  151. VOID
  152. );
  153. NTSTATUS
  154. InitToDo(
  155. VOID
  156. );
  157. VOID
  158. ClearAllToDoItems(
  159. IN BOOLEAN MemoryOnly
  160. );
  161. NTSTATUS
  162. SaveAllToDoItems(
  163. VOID
  164. );