jwalmrepl.pas 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585
  1. {******************************************************************************}
  2. { }
  3. { Lan Manager Replicator API interface Unit for Object Pascal }
  4. { }
  5. { Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
  6. { Corporation. All Rights Reserved. }
  7. { }
  8. { The original file is: lmrepl.h, released November 2001. The original Pascal }
  9. { code is: LmRepl.pas, released Februari 2002. The initial developer of the }
  10. { Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
  11. { }
  12. { Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
  13. { Marcel van Brakel. All Rights Reserved. }
  14. { }
  15. { Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
  16. { }
  17. { You may retrieve the latest version of this file at the Project JEDI }
  18. { APILIB home page, located at http://jedi-apilib.sourceforge.net }
  19. { }
  20. { The contents of this file are used with permission, subject to the Mozilla }
  21. { Public License Version 1.1 (the "License"); you may not use this file except }
  22. { in compliance with the License. You may obtain a copy of the License at }
  23. { http://www.mozilla.org/MPL/MPL-1.1.html }
  24. { }
  25. { Software distributed under the License is distributed on an "AS IS" basis, }
  26. { WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
  27. { the specific language governing rights and limitations under the License. }
  28. { }
  29. { Alternatively, the contents of this file may be used under the terms of the }
  30. { GNU Lesser General Public License (the "LGPL License"), in which case the }
  31. { provisions of the LGPL License are applicable instead of those above. }
  32. { If you wish to allow use of your version of this file only under the terms }
  33. { of the LGPL License and not to allow others to use your version of this file }
  34. { under the MPL, indicate your decision by deleting the provisions above and }
  35. { replace them with the notice and other provisions required by the LGPL }
  36. { License. If you do not delete the provisions above, a recipient may use }
  37. { your version of this file under either the MPL or the LGPL License. }
  38. { }
  39. { For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
  40. { }
  41. {******************************************************************************}
  42. // $Id: JwaLmRepl.pas,v 1.10 2005/09/07 09:54:54 marquardt Exp $
  43. {$IFNDEF JWA_INCLUDEMODE}
  44. unit JwaLmRepl;
  45. {$WEAKPACKAGEUNIT}
  46. {$I jediapilib.inc}
  47. interface
  48. uses
  49. JwaWindows, JwaLmCons;
  50. {$ENDIF !JWA_INCLUDEMODE}
  51. {$IFDEF JWA_INTERFACESECTION}
  52. {$HPPEMIT ''}
  53. {$HPPEMIT '#include "lmrepl.h"'}
  54. {$HPPEMIT ''}
  55. //
  56. // Replicator Configuration APIs
  57. //
  58. const
  59. REPL_ROLE_EXPORT = 1;
  60. {$EXTERNALSYM REPL_ROLE_EXPORT}
  61. REPL_ROLE_IMPORT = 2;
  62. {$EXTERNALSYM REPL_ROLE_IMPORT}
  63. REPL_ROLE_BOTH = 3;
  64. {$EXTERNALSYM REPL_ROLE_BOTH}
  65. REPL_INTERVAL_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + 0;
  66. {$EXTERNALSYM REPL_INTERVAL_INFOLEVEL}
  67. REPL_PULSE_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + 1;
  68. {$EXTERNALSYM REPL_PULSE_INFOLEVEL}
  69. REPL_GUARDTIME_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + 2;
  70. {$EXTERNALSYM REPL_GUARDTIME_INFOLEVEL}
  71. REPL_RANDOM_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + 3;
  72. {$EXTERNALSYM REPL_RANDOM_INFOLEVEL}
  73. type
  74. _REPL_INFO_0 = record
  75. rp0_role: DWORD;
  76. rp0_exportpath: LPWSTR;
  77. rp0_exportlist: LPWSTR;
  78. rp0_importpath: LPWSTR;
  79. rp0_importlist: LPWSTR;
  80. rp0_logonusername: LPWSTR;
  81. rp0_interval: DWORD;
  82. rp0_pulse: DWORD;
  83. rp0_guardtime: DWORD;
  84. rp0_random: DWORD;
  85. end;
  86. {$EXTERNALSYM _REPL_INFO_0}
  87. REPL_INFO_0 = _REPL_INFO_0;
  88. {$EXTERNALSYM REPL_INFO_0}
  89. LPREPL_INFO_0 = ^REPL_INFO_0;
  90. {$EXTERNALSYM LPREPL_INFO_0}
  91. PREPL_INFO_0 = ^REPL_INFO_0;
  92. {$EXTERNALSYM PREPL_INFO_0}
  93. TReplInfo0 = REPL_INFO_0;
  94. PReplInfo0 = PREPL_INFO_0;
  95. _REPL_INFO_1000 = record
  96. rp1000_interval: DWORD;
  97. end;
  98. {$EXTERNALSYM _REPL_INFO_1000}
  99. REPL_INFO_1000 = _REPL_INFO_1000;
  100. {$EXTERNALSYM REPL_INFO_1000}
  101. LPREPL_INFO_1000 = ^REPL_INFO_1000;
  102. {$EXTERNALSYM LPREPL_INFO_1000}
  103. PREPL_INFO_1000 = ^REPL_INFO_1000;
  104. {$EXTERNALSYM PREPL_INFO_1000}
  105. TReplInfo1000 = REPL_INFO_1000;
  106. PReplInfo1000 = PREPL_INFO_1000;
  107. _REPL_INFO_1001 = record
  108. rp1001_pulse: DWORD;
  109. end;
  110. {$EXTERNALSYM _REPL_INFO_1001}
  111. REPL_INFO_1001 = _REPL_INFO_1001;
  112. {$EXTERNALSYM REPL_INFO_1001}
  113. LPREPL_INFO_1001 = ^REPL_INFO_1001;
  114. {$EXTERNALSYM LPREPL_INFO_1001}
  115. PREPL_INFO_1001 = ^REPL_INFO_1001;
  116. {$EXTERNALSYM PREPL_INFO_1001}
  117. TReplInfo1001 = REPL_INFO_1001;
  118. PReplInfo1001 = PREPL_INFO_1001;
  119. _REPL_INFO_1002 = record
  120. rp1002_guardtime: DWORD;
  121. end;
  122. {$EXTERNALSYM _REPL_INFO_1002}
  123. REPL_INFO_1002 = _REPL_INFO_1002;
  124. {$EXTERNALSYM REPL_INFO_1002}
  125. LPREPL_INFO_1002 = ^REPL_INFO_1002;
  126. {$EXTERNALSYM LPREPL_INFO_1002}
  127. PREPL_INFO_1002 = ^REPL_INFO_1002;
  128. {$EXTERNALSYM PREPL_INFO_1002}
  129. TReplInfo1002 = REPL_INFO_1002;
  130. PReplInfo1002 = PREPL_INFO_1002;
  131. _REPL_INFO_1003 = record
  132. rp1003_random: DWORD;
  133. end;
  134. {$EXTERNALSYM _REPL_INFO_1003}
  135. REPL_INFO_1003 = _REPL_INFO_1003;
  136. {$EXTERNALSYM REPL_INFO_1003}
  137. LPREPL_INFO_1003 = ^REPL_INFO_1003;
  138. {$EXTERNALSYM LPREPL_INFO_1003}
  139. PREPL_INFO_1003 = ^REPL_INFO_1003;
  140. {$EXTERNALSYM PREPL_INFO_1003}
  141. TReplInfo1003 = REPL_INFO_1003;
  142. PReplInfo1003 = PREPL_INFO_1003;
  143. function NetReplGetInfo(servername: LPCWSTR; level: DWORD; var bufptr: LPBYTE): NET_API_STATUS; stdcall;
  144. {$EXTERNALSYM NetReplGetInfo}
  145. function NetReplSetInfo(servername: LPCWSTR; level: DWORD; buf: LPBYTE ; parm_err: LPDWORD): NET_API_STATUS; stdcall;
  146. {$EXTERNALSYM NetReplSetInfo}
  147. //
  148. // Replicator Export Directory APIs
  149. //
  150. const
  151. REPL_INTEGRITY_FILE = 1;
  152. {$EXTERNALSYM REPL_INTEGRITY_FILE}
  153. REPL_INTEGRITY_TREE = 2;
  154. {$EXTERNALSYM REPL_INTEGRITY_TREE}
  155. REPL_EXTENT_FILE = 1;
  156. {$EXTERNALSYM REPL_EXTENT_FILE}
  157. REPL_EXTENT_TREE = 2;
  158. {$EXTERNALSYM REPL_EXTENT_TREE}
  159. REPL_EXPORT_INTEGRITY_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + 0;
  160. {$EXTERNALSYM REPL_EXPORT_INTEGRITY_INFOLEVEL}
  161. REPL_EXPORT_EXTENT_INFOLEVEL = PARMNUM_BASE_INFOLEVEL + 1;
  162. {$EXTERNALSYM REPL_EXPORT_EXTENT_INFOLEVEL}
  163. type
  164. _REPL_EDIR_INFO_0 = record
  165. rped0_dirname: LPWSTR;
  166. end;
  167. {$EXTERNALSYM _REPL_EDIR_INFO_0}
  168. REPL_EDIR_INFO_0 = _REPL_EDIR_INFO_0;
  169. {$EXTERNALSYM REPL_EDIR_INFO_0}
  170. LPREPL_EDIR_INFO_0 = ^REPL_EDIR_INFO_0;
  171. {$EXTERNALSYM LPREPL_EDIR_INFO_0}
  172. PREPL_EDIR_INFO_0 = ^REPL_EDIR_INFO_0;
  173. {$EXTERNALSYM PREPL_EDIR_INFO_0}
  174. TReplEdirInfo0 = REPL_EDIR_INFO_0;
  175. PReplEdirInfo0 = PREPL_EDIR_INFO_0;
  176. _REPL_EDIR_INFO_1 = record
  177. rped1_dirname: LPWSTR;
  178. rped1_integrity: DWORD;
  179. rped1_extent: DWORD;
  180. end;
  181. {$EXTERNALSYM _REPL_EDIR_INFO_1}
  182. REPL_EDIR_INFO_1 = _REPL_EDIR_INFO_1;
  183. {$EXTERNALSYM REPL_EDIR_INFO_1}
  184. LPREPL_EDIR_INFO_1 = ^REPL_EDIR_INFO_1;
  185. {$EXTERNALSYM LPREPL_EDIR_INFO_1}
  186. PREPL_EDIR_INFO_1 = ^REPL_EDIR_INFO_1;
  187. {$EXTERNALSYM PREPL_EDIR_INFO_1}
  188. TReplEdirInfo1 = REPL_EDIR_INFO_1;
  189. PReplEdirInfo1 = PREPL_EDIR_INFO_1;
  190. _REPL_EDIR_INFO_2 = record
  191. rped2_dirname: LPWSTR;
  192. rped2_integrity: DWORD;
  193. rped2_extent: DWORD;
  194. rped2_lockcount: DWORD;
  195. rped2_locktime: DWORD;
  196. end;
  197. {$EXTERNALSYM _REPL_EDIR_INFO_2}
  198. REPL_EDIR_INFO_2 = _REPL_EDIR_INFO_2;
  199. {$EXTERNALSYM REPL_EDIR_INFO_2}
  200. LPREPL_EDIR_INFO_2 = ^REPL_EDIR_INFO_2;
  201. {$EXTERNALSYM LPREPL_EDIR_INFO_2}
  202. PREPL_EDIR_INFO_2 = ^REPL_EDIR_INFO_2;
  203. {$EXTERNALSYM PREPL_EDIR_INFO_2}
  204. TReplEdirInfo2 = REPL_EDIR_INFO_2;
  205. PReplEdirInfo2 = PREPL_EDIR_INFO_2;
  206. _REPL_EDIR_INFO_1000 = record
  207. rped1000_integrity: DWORD;
  208. end;
  209. {$EXTERNALSYM _REPL_EDIR_INFO_1000}
  210. REPL_EDIR_INFO_1000 = _REPL_EDIR_INFO_1000;
  211. {$EXTERNALSYM REPL_EDIR_INFO_1000}
  212. LPREPL_EDIR_INFO_1000 = ^REPL_EDIR_INFO_1000;
  213. {$EXTERNALSYM LPREPL_EDIR_INFO_1000}
  214. PREPL_EDIR_INFO_1000 = ^REPL_EDIR_INFO_1000;
  215. {$EXTERNALSYM PREPL_EDIR_INFO_1000}
  216. TReplEdirInfo1000 = REPL_EDIR_INFO_1000;
  217. PReplEdirInfo1000 = PREPL_EDIR_INFO_1000;
  218. _REPL_EDIR_INFO_1001 = record
  219. rped1001_extent: DWORD;
  220. end;
  221. {$EXTERNALSYM _REPL_EDIR_INFO_1001}
  222. REPL_EDIR_INFO_1001 = _REPL_EDIR_INFO_1001;
  223. {$EXTERNALSYM REPL_EDIR_INFO_1001}
  224. LPREPL_EDIR_INFO_1001 = ^REPL_EDIR_INFO_1001;
  225. {$EXTERNALSYM LPREPL_EDIR_INFO_1001}
  226. PREPL_EDIR_INFO_1001 = ^REPL_EDIR_INFO_1001;
  227. {$EXTERNALSYM PREPL_EDIR_INFO_1001}
  228. TReplEdirInfo1001 = REPL_EDIR_INFO_1001;
  229. PReplEdirInfo1001 = PREPL_EDIR_INFO_1001;
  230. function NetReplExportDirAdd(servername: LPCWSTR; level: DWORD; buf: LPBYTE ; parm_err: LPDWORD): NET_API_STATUS; stdcall;
  231. {$EXTERNALSYM NetReplExportDirAdd}
  232. function NetReplExportDirDel(servername: LPCWSTR; dirname: LPCWSTR): NET_API_STATUS; stdcall;
  233. {$EXTERNALSYM NetReplExportDirDel}
  234. function NetReplExportDirEnum(servername: LPCWSTR; level: DWORD; var bufptr: LPBYTE; prefmaxlen: DWORD; entriesread, totalentries, resumehandle: LPDWORD): NET_API_STATUS; stdcall;
  235. {$EXTERNALSYM NetReplExportDirEnum}
  236. function NetReplExportDirGetInfo(servername, dirname: LPCWSTR; level: DWORD; var bufptr: LPBYTE): NET_API_STATUS; stdcall;
  237. {$EXTERNALSYM NetReplExportDirGetInfo}
  238. function NetReplExportDirSetInfo(servername, dirname: LPCWSTR; level: DWORD; buf: LPBYTE; parm_err: LPDWORD): NET_API_STATUS; stdcall;
  239. {$EXTERNALSYM NetReplExportDirSetInfo}
  240. function NetReplExportDirLock(servername: LPCWSTR; dirname: LPCWSTR): NET_API_STATUS; stdcall;
  241. {$EXTERNALSYM NetReplExportDirLock}
  242. function NetReplExportDirUnlock(servername: LPCWSTR; dirname: LPCWSTR; unlockforce: DWORD): NET_API_STATUS; stdcall;
  243. {$EXTERNALSYM NetReplExportDirUnlock}
  244. const
  245. REPL_UNLOCK_NOFORCE = 0;
  246. {$EXTERNALSYM REPL_UNLOCK_NOFORCE}
  247. REPL_UNLOCK_FORCE = 1;
  248. {$EXTERNALSYM REPL_UNLOCK_FORCE}
  249. //
  250. // Replicator Import Directory APIs
  251. //
  252. type
  253. _REPL_IDIR_INFO_0 = record
  254. rpid0_dirname: LPWSTR;
  255. end;
  256. {$EXTERNALSYM _REPL_IDIR_INFO_0}
  257. REPL_IDIR_INFO_0 = _REPL_IDIR_INFO_0;
  258. {$EXTERNALSYM REPL_IDIR_INFO_0}
  259. LPREPL_IDIR_INFO_0 = ^REPL_IDIR_INFO_0;
  260. {$EXTERNALSYM LPREPL_IDIR_INFO_0}
  261. PREPL_IDIR_INFO_0 = ^REPL_IDIR_INFO_0;
  262. {$EXTERNALSYM PREPL_IDIR_INFO_0}
  263. TReplIdirInfo0 = REPL_IDIR_INFO_0;
  264. PReplIdirInfo0 = PREPL_IDIR_INFO_0;
  265. _REPL_IDIR_INFO_1 = record
  266. rpid1_dirname: LPWSTR;
  267. rpid1_state: DWORD;
  268. rpid1_mastername: LPWSTR;
  269. rpid1_last_update_time: DWORD;
  270. rpid1_lockcount: DWORD;
  271. rpid1_locktime: DWORD;
  272. end;
  273. {$EXTERNALSYM _REPL_IDIR_INFO_1}
  274. REPL_IDIR_INFO_1 = _REPL_IDIR_INFO_1;
  275. {$EXTERNALSYM REPL_IDIR_INFO_1}
  276. LPREPL_IDIR_INFO_1 = ^REPL_IDIR_INFO_1;
  277. {$EXTERNALSYM LPREPL_IDIR_INFO_1}
  278. PREPL_IDIR_INFO_1 = ^REPL_IDIR_INFO_1;
  279. {$EXTERNALSYM PREPL_IDIR_INFO_1}
  280. TReplIdirInfo1 = REPL_IDIR_INFO_1;
  281. PReplIdirInfo1 = PREPL_IDIR_INFO_1;
  282. function NetReplImportDirAdd(servername: LPCWSTR; level: DWORD; buf: LPBYTE; parm_err: LPDWORD): NET_API_STATUS; stdcall;
  283. {$EXTERNALSYM NetReplImportDirAdd}
  284. function NetReplImportDirDel(servername: LPCWSTR; dirname: LPCWSTR): NET_API_STATUS; stdcall;
  285. {$EXTERNALSYM NetReplImportDirDel}
  286. function NetReplImportDirEnum(servername: LPCWSTR; level: DWORD; var bufptr: LPBYTE; prefmaxlen: DWORD; entriesread, totalentries, resumehandle: LPDWORD): NET_API_STATUS; stdcall;
  287. {$EXTERNALSYM NetReplImportDirEnum}
  288. function NetReplImportDirGetInfo(servername, dirname: LPCWSTR; level: DWORD; var bufptr: LPBYTE): NET_API_STATUS; stdcall;
  289. {$EXTERNALSYM NetReplImportDirGetInfo}
  290. function NetReplImportDirLock(servername: LPCWSTR; dirname: LPCWSTR): NET_API_STATUS; stdcall;
  291. {$EXTERNALSYM NetReplImportDirLock}
  292. function NetReplImportDirUnlock(servername: LPCWSTR; dirname: LPCWSTR; unlockforce: DWORD): NET_API_STATUS; stdcall;
  293. {$EXTERNALSYM NetReplImportDirUnlock}
  294. const
  295. REPL_STATE_OK = 0;
  296. {$EXTERNALSYM REPL_STATE_OK}
  297. REPL_STATE_NO_MASTER = 1;
  298. {$EXTERNALSYM REPL_STATE_NO_MASTER}
  299. REPL_STATE_NO_SYNC = 2;
  300. {$EXTERNALSYM REPL_STATE_NO_SYNC}
  301. REPL_STATE_NEVER_REPLICATED = 3;
  302. {$EXTERNALSYM REPL_STATE_NEVER_REPLICATED}
  303. {$ENDIF JWA_INTERFACESECTION}
  304. {$IFNDEF JWA_INCLUDEMODE}
  305. implementation
  306. uses
  307. JwaWinDLLNames;
  308. {$ENDIF !JWA_INCLUDEMODE}
  309. {$IFDEF JWA_IMPLEMENTATIONSECTION}
  310. {$IFDEF DYNAMIC_LINK}
  311. var
  312. _NetReplGetInfo: Pointer;
  313. function NetReplGetInfo;
  314. begin
  315. GetProcedureAddress(_NetReplGetInfo, netapi32, 'NetReplGetInfo');
  316. asm
  317. MOV ESP, EBP
  318. POP EBP
  319. JMP [_NetReplGetInfo]
  320. end;
  321. end;
  322. var
  323. _NetReplSetInfo: Pointer;
  324. function NetReplSetInfo;
  325. begin
  326. GetProcedureAddress(_NetReplSetInfo, netapi32, 'NetReplSetInfo');
  327. asm
  328. MOV ESP, EBP
  329. POP EBP
  330. JMP [_NetReplSetInfo]
  331. end;
  332. end;
  333. var
  334. _NetReplExportDirAdd: Pointer;
  335. function NetReplExportDirAdd;
  336. begin
  337. GetProcedureAddress(_NetReplExportDirAdd, netapi32, 'NetReplExportDirAdd');
  338. asm
  339. MOV ESP, EBP
  340. POP EBP
  341. JMP [_NetReplExportDirAdd]
  342. end;
  343. end;
  344. var
  345. _NetReplExportDirDel: Pointer;
  346. function NetReplExportDirDel;
  347. begin
  348. GetProcedureAddress(_NetReplExportDirDel, netapi32, 'NetReplExportDirDel');
  349. asm
  350. MOV ESP, EBP
  351. POP EBP
  352. JMP [_NetReplExportDirDel]
  353. end;
  354. end;
  355. var
  356. _NetReplExportDirEnum: Pointer;
  357. function NetReplExportDirEnum;
  358. begin
  359. GetProcedureAddress(_NetReplExportDirEnum, netapi32, 'NetReplExportDirEnum');
  360. asm
  361. MOV ESP, EBP
  362. POP EBP
  363. JMP [_NetReplExportDirEnum]
  364. end;
  365. end;
  366. var
  367. _NetReplExportDirGetInfo: Pointer;
  368. function NetReplExportDirGetInfo;
  369. begin
  370. GetProcedureAddress(_NetReplExportDirGetInfo, netapi32, 'NetReplExportDirGetInfo');
  371. asm
  372. MOV ESP, EBP
  373. POP EBP
  374. JMP [_NetReplExportDirGetInfo]
  375. end;
  376. end;
  377. var
  378. _NetReplExportDirSetInfo: Pointer;
  379. function NetReplExportDirSetInfo;
  380. begin
  381. GetProcedureAddress(_NetReplExportDirSetInfo, netapi32, 'NetReplExportDirSetInfo');
  382. asm
  383. MOV ESP, EBP
  384. POP EBP
  385. JMP [_NetReplExportDirSetInfo]
  386. end;
  387. end;
  388. var
  389. _NetReplExportDirLock: Pointer;
  390. function NetReplExportDirLock;
  391. begin
  392. GetProcedureAddress(_NetReplExportDirLock, netapi32, 'NetReplExportDirLock');
  393. asm
  394. MOV ESP, EBP
  395. POP EBP
  396. JMP [_NetReplExportDirLock]
  397. end;
  398. end;
  399. var
  400. _NetReplExportDirUnlock: Pointer;
  401. function NetReplExportDirUnlock;
  402. begin
  403. GetProcedureAddress(_NetReplExportDirUnlock, netapi32, 'NetReplExportDirUnlock');
  404. asm
  405. MOV ESP, EBP
  406. POP EBP
  407. JMP [_NetReplExportDirUnlock]
  408. end;
  409. end;
  410. var
  411. _NetReplImportDirAdd: Pointer;
  412. function NetReplImportDirAdd;
  413. begin
  414. GetProcedureAddress(_NetReplImportDirAdd, netapi32, 'NetReplImportDirAdd');
  415. asm
  416. MOV ESP, EBP
  417. POP EBP
  418. JMP [_NetReplImportDirAdd]
  419. end;
  420. end;
  421. var
  422. _NetReplImportDirDel: Pointer;
  423. function NetReplImportDirDel;
  424. begin
  425. GetProcedureAddress(_NetReplImportDirDel, netapi32, 'NetReplImportDirDel');
  426. asm
  427. MOV ESP, EBP
  428. POP EBP
  429. JMP [_NetReplImportDirDel]
  430. end;
  431. end;
  432. var
  433. _NetReplImportDirEnum: Pointer;
  434. function NetReplImportDirEnum;
  435. begin
  436. GetProcedureAddress(_NetReplImportDirEnum, netapi32, 'NetReplImportDirEnum');
  437. asm
  438. MOV ESP, EBP
  439. POP EBP
  440. JMP [_NetReplImportDirEnum]
  441. end;
  442. end;
  443. var
  444. _NetReplImportDirGetInfo: Pointer;
  445. function NetReplImportDirGetInfo;
  446. begin
  447. GetProcedureAddress(_NetReplImportDirGetInfo, netapi32, 'NetReplImportDirGetInfo');
  448. asm
  449. MOV ESP, EBP
  450. POP EBP
  451. JMP [_NetReplImportDirGetInfo]
  452. end;
  453. end;
  454. var
  455. _NetReplImportDirLock: Pointer;
  456. function NetReplImportDirLock;
  457. begin
  458. GetProcedureAddress(_NetReplImportDirLock, netapi32, 'NetReplImportDirLock');
  459. asm
  460. MOV ESP, EBP
  461. POP EBP
  462. JMP [_NetReplImportDirLock]
  463. end;
  464. end;
  465. var
  466. _NetReplImportDirUnlock: Pointer;
  467. function NetReplImportDirUnlock;
  468. begin
  469. GetProcedureAddress(_NetReplImportDirUnlock, netapi32, 'NetReplImportDirUnlock');
  470. asm
  471. MOV ESP, EBP
  472. POP EBP
  473. JMP [_NetReplImportDirUnlock]
  474. end;
  475. end;
  476. {$ELSE}
  477. function NetReplGetInfo; external netapi32 name 'NetReplGetInfo';
  478. function NetReplSetInfo; external netapi32 name 'NetReplSetInfo';
  479. function NetReplExportDirAdd; external netapi32 name 'NetReplExportDirAdd';
  480. function NetReplExportDirDel; external netapi32 name 'NetReplExportDirDel';
  481. function NetReplExportDirEnum; external netapi32 name 'NetReplExportDirEnum';
  482. function NetReplExportDirGetInfo; external netapi32 name 'NetReplExportDirGetInfo';
  483. function NetReplExportDirSetInfo; external netapi32 name 'NetReplExportDirSetInfo';
  484. function NetReplExportDirLock; external netapi32 name 'NetReplExportDirLock';
  485. function NetReplExportDirUnlock; external netapi32 name 'NetReplExportDirUnlock';
  486. function NetReplImportDirAdd; external netapi32 name 'NetReplImportDirAdd';
  487. function NetReplImportDirDel; external netapi32 name 'NetReplImportDirDel';
  488. function NetReplImportDirEnum; external netapi32 name 'NetReplImportDirEnum';
  489. function NetReplImportDirGetInfo; external netapi32 name 'NetReplImportDirGetInfo';
  490. function NetReplImportDirLock; external netapi32 name 'NetReplImportDirLock';
  491. function NetReplImportDirUnlock; external netapi32 name 'NetReplImportDirUnlock';
  492. {$ENDIF DYNAMIC_LINK}
  493. {$ENDIF JWA_IMPLEMENTATIONSECTION}
  494. {$IFNDEF JWA_INCLUDEMODE}
  495. end.
  496. {$ENDIF !JWA_INCLUDEMODE}