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.

318 lines
7.5 KiB

  1. ////////////////////////////////////////////////////////////////////////////////
  2. //
  3. // W A R N I N G ! ! ! D A N G E R ! ! ! W A R N I N G ! ! !
  4. //
  5. //
  6. // THIS FILE EXISTS ONLY TO ALLOW THE 16-BIT ADMIN APPS TO BUILD.
  7. // THESE API (NetReplXxx) DO NOT YET EXIST UNDER WIN16. THIS IS
  8. // A VERY UGLY HACK, THUS THIS FILE EXISTS IN THE COMMON\HACK\DOS
  9. // DIRECTORY.
  10. //
  11. //
  12. // FILE HISTORY:
  13. //
  14. // KeithMo 28-Feb-1992 Copied here from PUBLIC\SDK\INC,
  15. // added conditional #defines for
  16. // IN, OUT, and OPTIONAL.
  17. //
  18. //
  19. // W A R N I N G ! ! ! D A N G E R ! ! ! W A R N I N G ! ! !
  20. //
  21. ////////////////////////////////////////////////////////////////////////////////
  22. #ifndef IN
  23. #define IN
  24. #endif
  25. #ifndef OUT
  26. #define OUT
  27. #endif
  28. #ifndef OPTIONAL
  29. #define OPTIONAL
  30. #endif
  31. /*++ BUILD Version: 0004 // Increment this if a change has global effects
  32. Copyright (c) 1991-92 Microsoft Corporation
  33. Module Name:
  34. LmRepl.h
  35. Abstract:
  36. This file contains structures, function prototypes, and definitions
  37. for the replicator APIs.
  38. Author:
  39. John Rogers (JohnRo) 17-Dec-1991
  40. Environment:
  41. User Mode - Win32
  42. Portable to any flat, 32-bit environment. (Uses Win32 typedefs.)
  43. Requires ANSI C extensions: slash-slash comments, long external names.
  44. Notes:
  45. You must include LmCons.h before this file.
  46. Revision History:
  47. 17-Dec-1991 JohnRo
  48. Created from RitaW's replicator API spec.
  49. 26-Dec-1991 JohnRo
  50. Added REPL_EDIR_INFO_2 and subsetted REPL_EDIR_INFO_1.
  51. Added INFOLEVEL equates.
  52. Changed values of REPL_EXTENT_FILE and REPL_EXTENT_TREE.
  53. 07-Jan-1992 JohnRo
  54. Corrected typedef name (LPREPL_INFO_100 s.b. LPREPL_INFO_0).
  55. 24-Jan-1992 JohnRo
  56. Changed to use LPTSTR etc.
  57. 27-Feb-1992 JohnRo
  58. Changed state not started to state never replicated.
  59. --*/
  60. #ifndef _LMREPL_
  61. #define _LMREPL_
  62. //
  63. // Replicator Configuration APIs
  64. //
  65. #define REPL_ROLE_EXPORT 1
  66. #define REPL_ROLE_IMPORT 2
  67. #define REPL_ROLE_BOTH 3
  68. #define REPL_INTERVAL_INFOLEVEL (PARMNUM_BASE_INFOLEVEL + 0)
  69. #define REPL_PULSE_INFOLEVEL (PARMNUM_BASE_INFOLEVEL + 1)
  70. #define REPL_GUARDTIME_INFOLEVEL (PARMNUM_BASE_INFOLEVEL + 2)
  71. #define REPL_RANDOM_INFOLEVEL (PARMNUM_BASE_INFOLEVEL + 3)
  72. typedef struct _REPL_INFO_0 {
  73. DWORD rp0_role;
  74. LPTSTR rp0_exportpath;
  75. LPTSTR rp0_exportlist;
  76. LPTSTR rp0_importpath;
  77. LPTSTR rp0_importlist;
  78. LPTSTR rp0_logonusername;
  79. DWORD rp0_interval;
  80. DWORD rp0_pulse;
  81. DWORD rp0_guardtime;
  82. DWORD rp0_random;
  83. } REPL_INFO_0, *PREPL_INFO_0, *LPREPL_INFO_0;
  84. typedef struct _REPL_INFO_1000 {
  85. DWORD rp1000_interval;
  86. } REPL_INFO_1000, *PREPL_INFO_1000, *LPREPL_INFO_1000;
  87. typedef struct _REPL_INFO_1001 {
  88. DWORD rp1001_pulse;
  89. } REPL_INFO_1001, *PREPL_INFO_1001, *LPREPL_INFO_1001;
  90. typedef struct _REPL_INFO_1002 {
  91. DWORD rp1002_guardtime;
  92. } REPL_INFO_1002, *PREPL_INFO_1002, *LPREPL_INFO_1002;
  93. typedef struct _REPL_INFO_1003 {
  94. DWORD rp1003_random;
  95. } REPL_INFO_1003, *PREPL_INFO_1003, *LPREPL_INFO_1003;
  96. NET_API_STATUS NET_API_FUNCTION
  97. NetReplGetInfo (
  98. IN LPTSTR servername OPTIONAL,
  99. IN DWORD level,
  100. OUT LPBYTE * bufptr
  101. );
  102. NET_API_STATUS NET_API_FUNCTION
  103. NetReplSetInfo (
  104. IN LPTSTR servername OPTIONAL,
  105. IN DWORD level,
  106. IN LPBYTE buf,
  107. OUT LPDWORD parm_err OPTIONAL
  108. );
  109. //
  110. // Replicator Export Directory APIs
  111. //
  112. #define REPL_INTEGRITY_FILE 1
  113. #define REPL_INTEGRITY_TREE 2
  114. #define REPL_EXTENT_FILE 1
  115. #define REPL_EXTENT_TREE 2
  116. #define REPL_EXPORT_INTEGRITY_INFOLEVEL (PARMNUM_BASE_INFOLEVEL + 0)
  117. #define REPL_EXPORT_EXTENT_INFOLEVEL (PARMNUM_BASE_INFOLEVEL + 1)
  118. typedef struct _REPL_EDIR_INFO_0 {
  119. LPTSTR rped0_dirname;
  120. } REPL_EDIR_INFO_0, *PREPL_EDIR_INFO_0, *LPREPL_EDIR_INFO_0;
  121. typedef struct _REPL_EDIR_INFO_1 {
  122. LPTSTR rped1_dirname;
  123. DWORD rped1_integrity;
  124. DWORD rped1_extent;
  125. } REPL_EDIR_INFO_1, *PREPL_EDIR_INFO_1, *LPREPL_EDIR_INFO_1;
  126. typedef struct _REPL_EDIR_INFO_2 {
  127. LPTSTR rped2_dirname;
  128. DWORD rped2_integrity;
  129. DWORD rped2_extent;
  130. DWORD rped2_lockcount;
  131. DWORD rped2_locktime;
  132. } REPL_EDIR_INFO_2, *PREPL_EDIR_INFO_2, *LPREPL_EDIR_INFO_2;
  133. typedef struct _REPL_EDIR_INFO_1000 {
  134. DWORD rped1000_integrity;
  135. } REPL_EDIR_INFO_1000, *PREPL_EDIR_INFO_1000, *LPREPL_EDIR_INFO_1000;
  136. typedef struct _REPL_EDIR_INFO_1001 {
  137. DWORD rped1001_extent;
  138. } REPL_EDIR_INFO_1001, *PREPL_EDIR_INFO_1001, *LPREPL_EDIR_INFO_1001;
  139. NET_API_STATUS NET_API_FUNCTION
  140. NetReplExportDirAdd (
  141. IN LPTSTR servername OPTIONAL,
  142. IN DWORD level,
  143. IN LPBYTE buf,
  144. OUT LPDWORD parm_err OPTIONAL
  145. );
  146. NET_API_STATUS NET_API_FUNCTION
  147. NetReplExportDirDel (
  148. IN LPTSTR servername OPTIONAL,
  149. IN LPTSTR dirname
  150. );
  151. NET_API_STATUS NET_API_FUNCTION
  152. NetReplExportDirEnum (
  153. IN LPTSTR servername OPTIONAL,
  154. IN DWORD level,
  155. OUT LPBYTE * bufptr,
  156. IN DWORD prefmaxlen,
  157. OUT LPDWORD entriesread,
  158. OUT LPDWORD totalentries,
  159. IN OUT LPDWORD resumehandle OPTIONAL
  160. );
  161. NET_API_STATUS NET_API_FUNCTION
  162. NetReplExportDirGetInfo (
  163. IN LPTSTR servername OPTIONAL,
  164. IN LPTSTR dirname,
  165. IN DWORD level,
  166. OUT LPBYTE * bufptr
  167. );
  168. NET_API_STATUS NET_API_FUNCTION
  169. NetReplExportDirSetInfo (
  170. IN LPTSTR servername OPTIONAL,
  171. IN LPTSTR dirname,
  172. IN DWORD level,
  173. IN LPBYTE buf,
  174. OUT LPDWORD parm_err OPTIONAL
  175. );
  176. NET_API_STATUS NET_API_FUNCTION
  177. NetReplExportDirLock (
  178. IN LPTSTR servername OPTIONAL,
  179. IN LPTSTR dirname
  180. );
  181. NET_API_STATUS NET_API_FUNCTION
  182. NetReplExportDirUnlock (
  183. IN LPTSTR servername OPTIONAL,
  184. IN LPTSTR dirname,
  185. IN DWORD unlockforce
  186. );
  187. #define REPL_UNLOCK_NOFORCE 0
  188. #define REPL_UNLOCK_FORCE 1
  189. //
  190. // Replicator Import Directory APIs
  191. //
  192. typedef struct _REPL_IDIR_INFO_0 {
  193. LPTSTR rpid0_dirname;
  194. } REPL_IDIR_INFO_0, *PREPL_IDIR_INFO_0, *LPREPL_IDIR_INFO_0;
  195. typedef struct _REPL_IDIR_INFO_1 {
  196. LPTSTR rpid1_dirname;
  197. DWORD rpid1_state;
  198. LPTSTR rpid1_mastername;
  199. DWORD rpid1_last_update_time;
  200. DWORD rpid1_lockcount;
  201. DWORD rpid1_locktime;
  202. } REPL_IDIR_INFO_1, *PREPL_IDIR_INFO_1, *LPREPL_IDIR_INFO_1;
  203. NET_API_STATUS NET_API_FUNCTION
  204. NetReplImportDirAdd (
  205. IN LPTSTR servername OPTIONAL,
  206. IN DWORD level,
  207. IN LPBYTE buf,
  208. OUT LPDWORD parm_err OPTIONAL
  209. );
  210. NET_API_STATUS NET_API_FUNCTION
  211. NetReplImportDirDel (
  212. IN LPTSTR servername OPTIONAL,
  213. IN LPTSTR dirname
  214. );
  215. NET_API_STATUS NET_API_FUNCTION
  216. NetReplImportDirEnum (
  217. IN LPTSTR servername OPTIONAL,
  218. IN DWORD level,
  219. OUT LPBYTE * bufptr,
  220. IN DWORD prefmaxlen,
  221. OUT LPDWORD entriesread,
  222. OUT LPDWORD totalentries,
  223. IN OUT LPDWORD resumehandle OPTIONAL
  224. );
  225. NET_API_STATUS NET_API_FUNCTION
  226. NetReplImportDirGetInfo (
  227. IN LPTSTR servername OPTIONAL,
  228. IN LPTSTR dirname,
  229. IN DWORD level,
  230. OUT LPBYTE * bufptr
  231. );
  232. NET_API_STATUS NET_API_FUNCTION
  233. NetReplImportDirLock (
  234. IN LPTSTR servername OPTIONAL,
  235. IN LPTSTR dirname
  236. );
  237. NET_API_STATUS NET_API_FUNCTION
  238. NetReplImportDirUnlock (
  239. IN LPTSTR servername OPTIONAL,
  240. IN LPTSTR dirname,
  241. IN DWORD unlockforce
  242. );
  243. #define REPL_STATE_OK 0
  244. #define REPL_STATE_NO_MASTER 1
  245. #define REPL_STATE_NO_SYNC 2
  246. #define REPL_STATE_NEVER_REPLICATED 3
  247. #endif //_LMREPL_
  248.