jwantdsbcli.pas 39 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182
  1. {******************************************************************************}
  2. { }
  3. { Directory Backup and Restore 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: ntdsbcli.h, released June 2000. The original Pascal }
  9. { code is: NtDsbCli.pas, released December 2000. 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: JwaNtDsbCli.pas,v 1.12 2007/09/05 11:58:51 dezipaitor Exp $
  43. {$IFNDEF JWA_OMIT_SECTIONS}
  44. unit JwaNtDsbCli;
  45. {$WEAKPACKAGEUNIT}
  46. {$ENDIF JWA_OMIT_SECTIONS}
  47. {$HPPEMIT ''}
  48. {$HPPEMIT '#include ":ntdsbcli.h"'}
  49. {$HPPEMIT ''}
  50. {$IFNDEF JWA_OMIT_SECTIONS}
  51. {$I jediapilib.inc}
  52. interface
  53. uses
  54. JwaWinType;
  55. {$ENDIF JWA_OMIT_SECTIONS}
  56. {$IFNDEF JWA_IMPLEMENTATIONSECTION}
  57. const
  58. g_wszBackupAnnotation = 'NTDS Backup Interface';
  59. {$EXTERNALSYM g_wszBackupAnnotation}
  60. g_aszBackupAnnotation = 'NTDS Backup Interface';
  61. {$EXTERNALSYM g_aszBackupAnnotation}
  62. g_wszRestoreAnnotation = 'NTDS Restore Interface';
  63. {$EXTERNALSYM g_wszRestoreAnnotation}
  64. g_aszRestoreAnnotation = 'NTDS Restore Interface';
  65. {$EXTERNALSYM g_aszRestoreAnnotation}
  66. {$IFDEF UNICODE}
  67. g_szBackupAnnotation = g_wszBackupAnnotation;
  68. {$EXTERNALSYM g_szBackupAnnotation}
  69. g_szRestoreAnnotation = g_wszRestoreAnnotation;
  70. {$EXTERNALSYM g_szRestoreAnnotation}
  71. {$ELSE}
  72. g_szBackupAnnotation = g_aszBackupAnnotation;
  73. {$EXTERNALSYM g_szBackupAnnotation}
  74. g_szRestoreAnnotation = g_aszRestoreAnnotation;
  75. {$EXTERNALSYM g_szRestoreAnnotation}
  76. {$ENDIF UNICODE}
  77. // Type of Backup passed to DsBackupPrepare()
  78. // BACKUP_TYPE_FULL: Requesting backup of the complete DS (DIT, Log files, and Patch files)
  79. // BACKUP_TYPE_LOGS_ONLY: Requesting backup of only the log files
  80. // BACKUP_TYPE_INCREMENTAL: Requesting incremental backup i.e. backing up only changes that happened since last backup
  81. BACKUP_TYPE_FULL = $01;
  82. {$EXTERNALSYM BACKUP_TYPE_FULL}
  83. BACKUP_TYPE_LOGS_ONLY = $02;
  84. {$EXTERNALSYM BACKUP_TYPE_LOGS_ONLY}
  85. BACKUP_TYPE_INCREMENTAL = $04; // not supported in product1
  86. {$EXTERNALSYM BACKUP_TYPE_INCREMENTAL}
  87. // Type of Restore passed to DsRestorePrepare()
  88. // RESTORE_TYPE_AUTHORATATIVE: The restored version wins throughout the enterprise
  89. // RESTORE_TYPE_ONLINE: Restoration is done when NTDS is online.
  90. // RESTORE_TYPE_CATCHUP: The restored version is reconciled through the standard reconciliation logic so that the
  91. // restored DIT can catchup with the rest of the enterprise.
  92. RESTORE_TYPE_AUTHORATATIVE = $01;
  93. {$EXTERNALSYM RESTORE_TYPE_AUTHORATATIVE}
  94. RESTORE_TYPE_ONLINE = $02; // not supported in product1
  95. {$EXTERNALSYM RESTORE_TYPE_ONLINE}
  96. RESTORE_TYPE_CATCHUP = $04; // this is the default restore mode
  97. {$EXTERNALSYM RESTORE_TYPE_CATCHUP}
  98. // Setting the current log # to this value would disable incremental/differential backup
  99. BACKUP_DISABLE_INCREMENTAL = DWORD($ffffffff);
  100. {$EXTERNALSYM BACKUP_DISABLE_INCREMENTAL}
  101. // BFT is the bit flag used to represent file types (directory/dit/logfile/etc.)
  102. // We keep them as a character so that we can append/prepend them to the actual file
  103. // path. The code in the Backup API's rely on the fact that values 0-256 in 8 bit ascii
  104. // map to the values 0-256 in unicode.
  105. type
  106. {$IFDEF UNICODE}
  107. BFT = WCHAR;
  108. {$EXTERNALSYM BFT}
  109. {$ELSE}
  110. BFT = Char;
  111. {$EXTERNALSYM BFT}
  112. {$ENDIF UNICODE}
  113. // Bit flags:
  114. // BFT_DIRECTORY - indicates path specified is a directory
  115. // BFT_DATABASE_DIRECTORY - indicates that file goes into database directory
  116. // BFT_LOG_DIRECTORY - indicates that the file goes into log directory
  117. const
  118. BFT_DIRECTORY = $80;
  119. {$EXTERNALSYM BFT_DIRECTORY}
  120. BFT_DATABASE_DIRECTORY = $40;
  121. {$EXTERNALSYM BFT_DATABASE_DIRECTORY}
  122. BFT_LOG_DIRECTORY = $20;
  123. {$EXTERNALSYM BFT_LOG_DIRECTORY}
  124. // Following combinations are defined for easy use of the filetype and the directory into
  125. // into which it goes
  126. BFT_LOG = BFT($01 or BFT_LOG_DIRECTORY);
  127. BFT_LOG_DIR = BFT($02 or BFT_DIRECTORY);
  128. BFT_CHECKPOINT_DIR = BFT($03 or BFT_DIRECTORY);
  129. BFT_NTDS_DATABASE = BFT($04 or BFT_DATABASE_DIRECTORY);
  130. BFT_PATCH_FILE = BFT($05 or BFT_LOG_DIRECTORY);
  131. BFT_UNKNOWN = BFT($0F);
  132. // #include <ntdsbmsg.h>
  133. // Backup Context Handle
  134. type
  135. HBC = Pointer;
  136. {$EXTERNALSYM HBC}
  137. PEDB_RSTMAPA = ^EDB_RSTMAPA;
  138. {$EXTERNALSYM PEDB_RSTMAPA}
  139. tagEDB_RSTMAPA = record
  140. szDatabaseName: PChar;
  141. szNewDtabaseName: PChar;
  142. end;
  143. {$EXTERNALSYM tagEDB_RSTMAPA}
  144. EDB_RSTMAPA = tagEDB_RSTMAPA;
  145. {$EXTERNALSYM EDB_RSTMAPA}
  146. TEdbRstMapA = EDB_RSTMAPA;
  147. PEdbRstMapA = PEDB_RSTMAPA;
  148. // required for NTDS unicode support.
  149. // UNDONE: NYI
  150. PEDB_RSTMAPW = ^EDB_RSTMAPW;
  151. {$EXTERNALSYM PEDB_RSTMAPW}
  152. tagEDB_RSTMAPW = record
  153. wszDatabaseName: PWCHAR;
  154. wszNewDatabaseName: PWCHAR;
  155. end;
  156. {$EXTERNALSYM tagEDB_RSTMAPW}
  157. EDB_RSTMAPW = tagEDB_RSTMAPW;
  158. {$EXTERNALSYM EDB_RSTMAPW}
  159. TEdbRstMapW = EDB_RSTMAPW;
  160. PEdbRstMapW = PEDB_RSTMAPW;
  161. {$IFDEF UNICODE}
  162. EDB_RSTMAP = EDB_RSTMAPW;
  163. {$EXTERNALSYM EDB_RSTMAP}
  164. PEDB_RSTMAP = PEDB_RSTMAPW;
  165. {$EXTERNALSYM PEDB_RSTMAP}
  166. TEdbRstMap = TEdbRstMapW;
  167. PEdbRstMap = PEdbRstMapW;
  168. {$ELSE}
  169. EDB_RSTMAP = EDB_RSTMAPA;
  170. {$EXTERNALSYM EDB_RSTMAP}
  171. PEDB_RSTMAP = PEDB_RSTMAPA;
  172. {$EXTERNALSYM PEDB_RSTMAP}
  173. TEdbRstMap = TEdbRstMapA;
  174. PEdbRstMap = PEdbRstMapA;
  175. {$ENDIF UNICODE}
  176. {*************************************************************************************
  177. Routine Description:
  178. DsIsNTDSOnline
  179. Checks to see if the NTDS is Online on the given server. This call is
  180. guaranteed to return quickly.
  181. Arguments:
  182. [in] szServerName - UNC name of the server to check
  183. [out] pfNTDSOnline - pointer to receive the bool result (TRUE if NTDS is
  184. online; FALSE, otherwise)
  185. Return Value:
  186. ERROR_SUCCESS if the call executed successfully;
  187. Failure code otherwise.
  188. **************************************************************************************}
  189. function DsIsNTDSOnlineA(szServerName: LPCSTR; var pfNTDSOnline: BOOL): HRESULT; stdcall;
  190. {$EXTERNALSYM DsIsNTDSOnlineA}
  191. function DsIsNTDSOnlineW(szServerName: LPCWSTR; var pfNTDSOnline: BOOL): HRESULT; stdcall;
  192. {$EXTERNALSYM DsIsNTDSOnlineW}
  193. function DsIsNTDSOnline(szServerName: LPCTSTR; var pfNTDSOnline: BOOL): HRESULT; stdcall;
  194. {$EXTERNALSYM DsIsNTDSOnline}
  195. {*************************************************************************************
  196. Routine Description:
  197. DsBackupPrepare
  198. Prepares the DS for the online backup and returns a Backup Context Handle
  199. which should be used in the subsequent calls to other backup functions.
  200. Arguments:
  201. [in] szBackupServer - UNC name of the server to be prepared for online backup
  202. [in] grbit - flag to be passed to jet while backing up dbs
  203. [in] btFlag - BACKUP_TYPE_FULL or BACKUP_TYPE_LOGS_ONLY
  204. [out] ppvExpiryToken - pointer that will receive the pointer to the
  205. Expiry Token associated with this backup; Client should save
  206. this token and send it back through DsRestorePrepare() when
  207. attempting a restore; allocated memory should be freed using
  208. DsBackupFree() API by the caller when it is no longer needed.
  209. [out] pcbExpiryTokenSize - pointer to receive the size of the expiry token
  210. returned.
  211. [out] phbc - pointer that will receive the backup context handle
  212. Return Value:
  213. One of the standard HRESULT success codes;
  214. Failure code otherwise.
  215. **************************************************************************************}
  216. function DsBackupPrepareA(szBackupServer: LPCSTR; grbit: ULONG; btFlag: ULONG;
  217. var ppvExpiryToken: PVOID; var pcbExpiryTokenSize: DWORD; var phbc: HBC): HRESULT; stdcall;
  218. {$EXTERNALSYM DsBackupPrepareA}
  219. function DsBackupPrepareW(szBackupServer: LPCWSTR; grbit: ULONG; btFlag: ULONG;
  220. var ppvExpiryToken: PVOID; var pcbExpiryTokenSize: DWORD; var phbc: HBC): HRESULT; stdcall;
  221. {$EXTERNALSYM DsBackupPrepareW}
  222. function DsBackupPrepare(szBackupServer: LPCTSTR; grbit: ULONG; btFlag: ULONG;
  223. var ppvExpiryToken: PVOID; var pcbExpiryTokenSize: DWORD; var phbc: HBC): HRESULT; stdcall;
  224. {$EXTERNALSYM DsBackupPrepare}
  225. {*************************************************************************************
  226. Routine Description:
  227. DsBackupGetDatabaseNames
  228. Gives the list of data bases that need to be backed up for the given
  229. backup context
  230. Arguments:
  231. [in] hbc - backup context handle
  232. [out] pszAttachmentInfo - pointer that will receive the pointer to the attachment
  233. info; allocated memory should be freed using DsBackupFree() API by the
  234. caller when it is no longer needed; Attachment info is an array of
  235. null-terminated filenames and and the list is terminated by two-nulls.
  236. [out] pcbSize - will receive the number of bytes returned
  237. Return Value:
  238. One of the standard HRESULT success codes;
  239. Failure code otherwise.
  240. **************************************************************************************}
  241. function DsBackupGetDatabaseNamesA(hbc: HBC; var pszAttachmentInfo: LPSTR;
  242. var pcbSize: DWORD): HRESULT; stdcall;
  243. {$EXTERNALSYM DsBackupGetDatabaseNamesA}
  244. function DsBackupGetDatabaseNamesW(hbc: HBC; var pszAttachmentInfo: LPWSTR;
  245. var pcbSize: DWORD): HRESULT; stdcall;
  246. {$EXTERNALSYM DsBackupGetDatabaseNamesW}
  247. function DsBackupGetDatabaseNames(hbc: HBC; var pszAttachmentInfo: LPTSTR;
  248. var pcbSize: DWORD): HRESULT; stdcall;
  249. {$EXTERNALSYM DsBackupGetDatabaseNames}
  250. {*************************************************************************************
  251. Routine Description:
  252. DsBackupOpenFile
  253. Opens the given attachment for read.
  254. Arguments:
  255. [in] hbc - backup context handle
  256. [in] szAttachmentName - name of the attachment to be opened for read
  257. [in] cbReadHintSize - suggested size in bytes that might be used during the
  258. subsequent reads on this attachement
  259. [out] pliFileSize - pointer to a large integer that would receive the size in
  260. bytes of the given attachment
  261. Return Value:
  262. One of the standard HRESULT success codes;
  263. Failure code otherwise.
  264. **************************************************************************************}
  265. function DsBackupOpenFileA(hbc: HBC; szAttachmentName: LPCSTR; cbReadHintSize: DWORD;
  266. var pliFileSize: LARGE_INTEGER): HRESULT; stdcall;
  267. {$EXTERNALSYM DsBackupOpenFileA}
  268. function DsBackupOpenFileW(hbc: HBC; szAttachmentName: LPCWSTR; cbReadHintSize: DWORD;
  269. var pliFileSize: LARGE_INTEGER): HRESULT; stdcall;
  270. {$EXTERNALSYM DsBackupOpenFileW}
  271. function DsBackupOpenFile(hbc: HBC; szAttachmentName: LPCTSTR; cbReadHintSize: DWORD;
  272. var pliFileSize: LARGE_INTEGER): HRESULT; stdcall;
  273. {$EXTERNALSYM DsBackupOpenFile}
  274. {*************************************************************************************
  275. Routine Description:
  276. DsBackupRead
  277. Reads the currently open attachment bytes into the given buffer. The client
  278. application is expected to call this function repeatedly until it gets the
  279. entire file (the application would have received the file size through the
  280. DsBackupOpenFile() call before.
  281. Arguments:
  282. [in] hbc - backup context handle
  283. [in] pvBuffer - pointer to the buffer that would receive the read data.
  284. [in] cbBuffer - specifies the size of the above buffer
  285. [out] pcbRead - pointer to receive the actual number of bytes read.
  286. Return Value:
  287. One of the standard HRESULT success codes;
  288. Failure code otherwise.
  289. **************************************************************************************}
  290. function DsBackupRead(hbc: HBC; pvBuffer: PVOID; cbBuffer: DWORD; var pcbRead: DWORD): HRESULT; stdcall;
  291. {$EXTERNALSYM DsBackupRead}
  292. {*************************************************************************************
  293. Routine Description:
  294. DsBackupClose
  295. To be called by the application after it completes reading all the data in
  296. the currently opened attachement.
  297. Arguments:
  298. [in] hbc - backup context handle
  299. Return Value:
  300. One of the standard HRESULT success codes;
  301. Failure code otherwise.
  302. **************************************************************************************}
  303. function DsBackupClose(hbc: HBC): HRESULT; stdcall;
  304. {$EXTERNALSYM DsBackupClose}
  305. {*************************************************************************************
  306. Routine Description:
  307. DsBackupGetBackupLogs
  308. Gives the list of log files that need to be backed up for the given
  309. backup context
  310. Arguments:
  311. [in] hbc - backup context handle
  312. [out] pszBackupLogFiles - pointer that will receive the pointer to the list of
  313. log files; allocated memory should be freed using DsBackupFree() API by the
  314. caller when it is no longer needed; Log files are returned in an array of
  315. null-terminated filenames and and the list is terminated by two-nulls.
  316. [out] pcbSize - will receive the number of bytes returned
  317. Return Value:
  318. One of the standard HRESULT success codes;
  319. Failure code otherwise.
  320. **************************************************************************************}
  321. function DsBackupGetBackupLogsA(hbc: HBC; var pszBackupLogFiles: LPSTR;
  322. var pcbSize: DWORD): HRESULT; stdcall;
  323. {$EXTERNALSYM DsBackupGetBackupLogsA}
  324. function DsBackupGetBackupLogsW(hbc: HBC; var pszBackupLogFiles: LPWSTR;
  325. var pcbSize: DWORD): HRESULT; stdcall;
  326. {$EXTERNALSYM DsBackupGetBackupLogsW}
  327. function DsBackupGetBackupLogs(hbc: HBC; var pszBackupLogFiles: LPTSTR;
  328. var pcbSize: DWORD): HRESULT; stdcall;
  329. {$EXTERNALSYM DsBackupGetBackupLogs}
  330. {*************************************************************************************
  331. Routine Description:
  332. DsBackupTruncateLogs
  333. Called to truncate the already read backup logs.
  334. Arguments:
  335. [in] hbc - backup context handle
  336. Return Value:
  337. One of the standard HRESULT success codes;
  338. Failure code otherwise.
  339. **************************************************************************************}
  340. function DsBackupTruncateLogs(hbc: HBC): HRESULT; stdcall;
  341. {$EXTERNALSYM DsBackupTruncateLogs}
  342. {*************************************************************************************
  343. Routine Description:
  344. DsBackupEnd
  345. Called to end the current backup session.
  346. Arguments:
  347. [in] hbc - backup context handle of the backup session
  348. Return Value:
  349. One of the standard HRESULT success codes;
  350. Failure code otherwise.
  351. **************************************************************************************}
  352. function DsBackupEnd(hbc: HBC): HRESULT; stdcall;
  353. {$EXTERNALSYM DsBackupEnd}
  354. {*************************************************************************************
  355. Routine Description:
  356. DsBackupFree
  357. Should be used by the application to free any buffer allocated by the
  358. NTDSBCLI dll.
  359. Arguments:
  360. [in] pvBuffer - pointer to the buffer that is to be freed.
  361. Return Value:
  362. None.
  363. **************************************************************************************}
  364. procedure DsBackupFree(pvBuffer: PVOID); stdcall;
  365. {$EXTERNALSYM DsBackupFree}
  366. {*************************************************************************************
  367. Routine Description:
  368. DsRestoreGetDatabaseLocations
  369. Called both at backup time as well at restoration time to get the data base
  370. locations for different types of files.
  371. Arguments:
  372. [in] hbc - backup context handle which would have been obtained through
  373. DsBackupPrepare() in the backup case and through DsRestorePrepare()
  374. in the restore case.
  375. [out] pszDatabaseLocationList - pointer that will receive the pointer to the list of
  376. database locations; allocated memory should be freed using DsBackupFree() API by the
  377. caller when it is no longer needed; locations are returned in an array of
  378. null-terminated names and and the list is terminated by two-nulls.
  379. The first character of each name is the BFT character that indicates the type
  380. of the file and the rest of the name tells gives the path into which that
  381. particular type of file should be restored.
  382. [out] pcbSize - will receive the number of bytes returned
  383. Return Value:
  384. One of the standard HRESULT success codes;
  385. Failure code otherwise.
  386. **************************************************************************************}
  387. function DsRestoreGetDatabaseLocationsA(hbc: HBC; var pszDatabaseLocationList: LPSTR;
  388. var pcbSize: DWORD): HRESULT; stdcall;
  389. {$EXTERNALSYM DsRestoreGetDatabaseLocationsA}
  390. function DsRestoreGetDatabaseLocationsW(hbc: HBC; var pszDatabaseLocationList: LPWSTR;
  391. var pcbSize: DWORD): HRESULT; stdcall;
  392. {$EXTERNALSYM DsRestoreGetDatabaseLocationsW}
  393. function DsRestoreGetDatabaseLocations(hbc: HBC; var pszDatabaseLocationList: LPTSTR;
  394. var pcbSize: DWORD): HRESULT; stdcall;
  395. {$EXTERNALSYM DsRestoreGetDatabaseLocations}
  396. {*************************************************************************************
  397. Routine Description:
  398. DsRestorePrepare
  399. Called to indicate beginning of a restore session.
  400. Arguments:
  401. [in] szServerName - UNC name of the server into which the restore operation is
  402. going to be performed.
  403. [in] rtFlag - Or'ed combination of RESTORE_TYPE_* flags; 0 if no special flags
  404. are to be specified
  405. [in] pvExpiryToken - pointer to the expiry token associated with this
  406. backup. The client would have received this when they backed up the DS.
  407. [in] cbExpiryTokenSize - size of the expiry token.
  408. [out] phbc - pointer to receive the backup context handle which is to be passed
  409. to the subsequent restore APIs
  410. Return Value:
  411. One of the standard HRESULT success codes;
  412. Failure code otherwise.
  413. **************************************************************************************}
  414. function DsRestorePrepareA(szServerName: LPCSTR; rtFlag: ULONG; pvExpiryToken: PVOID;
  415. cbExpiryTokenSize: DWORD; var phbc: HBC): HRESULT; stdcall;
  416. {$EXTERNALSYM DsRestorePrepareA}
  417. function DsRestorePrepareW(szServerName: LPCWSTR; rtFlag: ULONG; pvExpiryToken: PVOID;
  418. cbExpiryTokenSize: DWORD; var phbc: HBC): HRESULT; stdcall;
  419. {$EXTERNALSYM DsRestorePrepareW}
  420. function DsRestorePrepare(szServerName: LPCTSTR; rtFlag: ULONG; pvExpiryToken: PVOID;
  421. cbExpiryTokenSize: DWORD; var phbc: HBC): HRESULT; stdcall;
  422. {$EXTERNALSYM DsRestorePrepare}
  423. {*************************************************************************************
  424. Routine Description:
  425. DsRestoreRegister
  426. This will register a restore operation. It will interlock all sbsequent restore
  427. operations, and will prevent the restore target from starting until the call
  428. to DsRestoreRegisterComplete() is made.
  429. Arguments:
  430. [in] hbc - backup context handle for the restore session.
  431. [in] szCheckPointFilePath - path where the check point files are restored
  432. [in] szLogPath - path where the log files are restored
  433. [in] rgrstmap - restore map
  434. [in] crstmap - tells if ther is a new restore map
  435. [in] szBackupLogPath - path where the backup logs are located
  436. [in] genLow - Lowest log# that was restored in this restore session
  437. [in] genHigh - Highest log# that was restored in this restore session
  438. Return Value:
  439. One of the standard HRESULT success codes;
  440. Failure code otherwise.
  441. **************************************************************************************}
  442. function DsRestoreRegisterA(hbc: HBC; szCheckPointFilePath, szLogPath: LPCSTR;
  443. rgrstmap: PEDB_RSTMAPA; crstmap: LONG; szBackupLogPath: LPCSTR; genLow, genHigh: ULONG): HRESULT; stdcall;
  444. {$EXTERNALSYM DsRestoreRegisterA}
  445. function DsRestoreRegisterW(hbc: HBC; szCheckPointFilePath, szLogPath: LPCWSTR;
  446. rgrstmap: PEDB_RSTMAPW; crstmap: LONG; szBackupLogPath: LPCWSTR; genLow, genHigh: ULONG): HRESULT; stdcall;
  447. {$EXTERNALSYM DsRestoreRegisterW}
  448. function DsRestoreRegister(hbc: HBC; szCheckPointFilePath, szLogPath: LPCTSTR;
  449. rgrstmap: PEDB_RSTMAP; crstmap: LONG; szBackupLogPath: LPCTSTR; genLow, genHigh: ULONG): HRESULT; stdcall;
  450. {$EXTERNALSYM DsRestoreRegister}
  451. {*************************************************************************************
  452. Routine Description:
  453. DsRestoreRegisterComplete
  454. Called to indicate that a previously registered restore is complete.
  455. Arguments:
  456. [in] hbc - backup context handle
  457. [in] hrRestoreState - success code if the restore was successful
  458. Return Value:
  459. One of the standard HRESULT success codes;
  460. Failure code otherwise.
  461. **************************************************************************************}
  462. function DsRestoreRegisterComplete(hbc: HBC; hrRestoreState: HRESULT): HRESULT; stdcall;
  463. {$EXTERNALSYM DsRestoreRegisterComplete}
  464. {*************************************************************************************
  465. Routine Description:
  466. DsRestoreEnd
  467. Called to end a restore session
  468. Arguments:
  469. [in] hbc - backup context handle
  470. Return Value:
  471. One of the standard HRESULT success codes;
  472. Failure code otherwise.
  473. **************************************************************************************}
  474. function DsRestoreEnd(hbc: HBC): HRESULT; stdcall;
  475. {$EXTERNALSYM DsRestoreEnd}
  476. {*************************************************************************************
  477. Routine Description:
  478. DsSetCurrentBackupLog
  479. Called to set the current backup log number after a successful restore
  480. Arguments:
  481. [in] szServerName - UNC name of the server for which the current backup log has
  482. to be set
  483. [in] dwCurrentLog - current log number
  484. Return Value:
  485. One of the standard HRESULT success codes;
  486. Failure code otherwise.
  487. **************************************************************************************}
  488. function DsSetCurrentBackupLogA(szServerName: LPCSTR; dwCurrentLog: DWORD): HRESULT; stdcall;
  489. {$EXTERNALSYM DsSetCurrentBackupLogA}
  490. function DsSetCurrentBackupLogW(szServerName: LPCWSTR; dwCurrentLog: DWORD): HRESULT; stdcall;
  491. {$EXTERNALSYM DsSetCurrentBackupLogW}
  492. function DsSetCurrentBackupLog(szServerName: LPCTSTR; dwCurrentLog: DWORD): HRESULT; stdcall;
  493. {$EXTERNALSYM DsSetCurrentBackupLog}
  494. {*************************************************************************************
  495. Routine Description:
  496. DsSetAuthIdentity
  497. Used to set the security context under which the client APIs are to be
  498. called. If this function is not called, security context of the current
  499. process is assumed.
  500. Arguments:
  501. [in] szUserName - name of the user
  502. [in] szDomainName - name of the domain the user belongs to
  503. [in] szPassword - password of the user in the specified domain
  504. Return Value:
  505. One of the standard HRESULT success codes;
  506. Failure code otherwise.
  507. **************************************************************************************}
  508. function DsSetAuthIdentityA(szUserName, szDomainName, szPassword: LPCSTR): HRESULT; stdcall;
  509. {$EXTERNALSYM DsSetAuthIdentityA}
  510. function DsSetAuthIdentityW(szUserName, szDomainName, szPassword: LPCWSTR): HRESULT; stdcall;
  511. {$EXTERNALSYM DsSetAuthIdentityW}
  512. function DsSetAuthIdentity(szUserName, szDomainName, szPassword: LPCTSTR): HRESULT; stdcall;
  513. {$EXTERNALSYM DsSetAuthIdentity}
  514. {$ENDIF JWA_IMPLEMENTATIONSECTION}
  515. {$IFNDEF JWA_OMIT_SECTIONS}
  516. implementation
  517. //uses ...
  518. {$ENDIF JWA_OMIT_SECTIONS}
  519. {$IFNDEF JWA_INTERFACESECTION}
  520. {$IFNDEF JWA_INCLUDEMODE}
  521. const
  522. ntdsbclilib = 'ntdsbclilib.dll';
  523. {$IFDEF UNICODE}
  524. AWSuffix = 'W';
  525. {$ELSE}
  526. AWSuffix = 'A';
  527. {$ENDIF UNICODE}
  528. {$ENDIF JWA_INCLUDEMODE}
  529. {$IFDEF DYNAMIC_LINK}
  530. var
  531. _DsIsNTDSOnlineA: Pointer;
  532. function DsIsNTDSOnlineA;
  533. begin
  534. GetProcedureAddress(_DsIsNTDSOnlineA, ntdsbclilib, 'DsIsNTDSOnlineA');
  535. asm
  536. MOV ESP, EBP
  537. POP EBP
  538. JMP [_DsIsNTDSOnlineA]
  539. end;
  540. end;
  541. var
  542. _DsIsNTDSOnlineW: Pointer;
  543. function DsIsNTDSOnlineW;
  544. begin
  545. GetProcedureAddress(_DsIsNTDSOnlineW, ntdsbclilib, 'DsIsNTDSOnlineW');
  546. asm
  547. MOV ESP, EBP
  548. POP EBP
  549. JMP [_DsIsNTDSOnlineW]
  550. end;
  551. end;
  552. var
  553. _DsIsNTDSOnline: Pointer;
  554. function DsIsNTDSOnline;
  555. begin
  556. GetProcedureAddress(_DsIsNTDSOnline, ntdsbclilib, 'DsIsNTDSOnline' + AWSuffix);
  557. asm
  558. MOV ESP, EBP
  559. POP EBP
  560. JMP [_DsIsNTDSOnline]
  561. end;
  562. end;
  563. var
  564. _DsBackupPrepareA: Pointer;
  565. function DsBackupPrepareA;
  566. begin
  567. GetProcedureAddress(_DsBackupPrepareA, ntdsbclilib, 'DsBackupPrepareA');
  568. asm
  569. MOV ESP, EBP
  570. POP EBP
  571. JMP [_DsBackupPrepareA]
  572. end;
  573. end;
  574. var
  575. _DsBackupPrepareW: Pointer;
  576. function DsBackupPrepareW;
  577. begin
  578. GetProcedureAddress(_DsBackupPrepareW, ntdsbclilib, 'DsBackupPrepareW');
  579. asm
  580. MOV ESP, EBP
  581. POP EBP
  582. JMP [_DsBackupPrepareW]
  583. end;
  584. end;
  585. var
  586. _DsBackupPrepare: Pointer;
  587. function DsBackupPrepare;
  588. begin
  589. GetProcedureAddress(_DsBackupPrepare, ntdsbclilib, 'DsBackupPrepare' + AWSuffix);
  590. asm
  591. MOV ESP, EBP
  592. POP EBP
  593. JMP [_DsBackupPrepare]
  594. end;
  595. end;
  596. var
  597. _DsBackupGetDatabaseNamesA: Pointer;
  598. function DsBackupGetDatabaseNamesA;
  599. begin
  600. GetProcedureAddress(_DsBackupGetDatabaseNamesA, ntdsbclilib, 'DsBackupGetDatabaseNamesA');
  601. asm
  602. MOV ESP, EBP
  603. POP EBP
  604. JMP [_DsBackupGetDatabaseNamesA]
  605. end;
  606. end;
  607. var
  608. _DsBackupGetDatabaseNamesW: Pointer;
  609. function DsBackupGetDatabaseNamesW;
  610. begin
  611. GetProcedureAddress(_DsBackupGetDatabaseNamesW, ntdsbclilib, 'DsBackupGetDatabaseNamesW');
  612. asm
  613. MOV ESP, EBP
  614. POP EBP
  615. JMP [_DsBackupGetDatabaseNamesW]
  616. end;
  617. end;
  618. var
  619. _DsBackupGetDatabaseNames: Pointer;
  620. function DsBackupGetDatabaseNames;
  621. begin
  622. GetProcedureAddress(_DsBackupGetDatabaseNames, ntdsbclilib, 'DsBackupGetDatabaseNames' + AWSuffix);
  623. asm
  624. MOV ESP, EBP
  625. POP EBP
  626. JMP [_DsBackupGetDatabaseNames]
  627. end;
  628. end;
  629. var
  630. _DsBackupOpenFileA: Pointer;
  631. function DsBackupOpenFileA;
  632. begin
  633. GetProcedureAddress(_DsBackupOpenFileA, ntdsbclilib, 'DsBackupOpenFileA');
  634. asm
  635. MOV ESP, EBP
  636. POP EBP
  637. JMP [_DsBackupOpenFileA]
  638. end;
  639. end;
  640. var
  641. _DsBackupOpenFileW: Pointer;
  642. function DsBackupOpenFileW;
  643. begin
  644. GetProcedureAddress(_DsBackupOpenFileW, ntdsbclilib, 'DsBackupOpenFileW');
  645. asm
  646. MOV ESP, EBP
  647. POP EBP
  648. JMP [_DsBackupOpenFileW]
  649. end;
  650. end;
  651. var
  652. _DsBackupOpenFile: Pointer;
  653. function DsBackupOpenFile;
  654. begin
  655. GetProcedureAddress(_DsBackupOpenFile, ntdsbclilib, 'DsBackupOpenFile' + AWSuffix);
  656. asm
  657. MOV ESP, EBP
  658. POP EBP
  659. JMP [_DsBackupOpenFile]
  660. end;
  661. end;
  662. var
  663. _DsBackupRead: Pointer;
  664. function DsBackupRead;
  665. begin
  666. GetProcedureAddress(_DsBackupRead, ntdsbclilib, 'DsBackupRead');
  667. asm
  668. MOV ESP, EBP
  669. POP EBP
  670. JMP [_DsBackupRead]
  671. end;
  672. end;
  673. var
  674. _DsBackupClose: Pointer;
  675. function DsBackupClose;
  676. begin
  677. GetProcedureAddress(_DsBackupClose, ntdsbclilib, 'DsBackupClose');
  678. asm
  679. MOV ESP, EBP
  680. POP EBP
  681. JMP [_DsBackupClose]
  682. end;
  683. end;
  684. var
  685. _DsBackupGetBackupLogsA: Pointer;
  686. function DsBackupGetBackupLogsA;
  687. begin
  688. GetProcedureAddress(_DsBackupGetBackupLogsA, ntdsbclilib, 'DsBackupGetBackupLogsA');
  689. asm
  690. MOV ESP, EBP
  691. POP EBP
  692. JMP [_DsBackupGetBackupLogsA]
  693. end;
  694. end;
  695. var
  696. _DsBackupGetBackupLogsW: Pointer;
  697. function DsBackupGetBackupLogsW;
  698. begin
  699. GetProcedureAddress(_DsBackupGetBackupLogsW, ntdsbclilib, 'DsBackupGetBackupLogsW');
  700. asm
  701. MOV ESP, EBP
  702. POP EBP
  703. JMP [_DsBackupGetBackupLogsW]
  704. end;
  705. end;
  706. var
  707. _DsBackupGetBackupLogs: Pointer;
  708. function DsBackupGetBackupLogs;
  709. begin
  710. GetProcedureAddress(_DsBackupGetBackupLogs, ntdsbclilib, 'DsBackupGetBackupLogs' + AWSuffix);
  711. asm
  712. MOV ESP, EBP
  713. POP EBP
  714. JMP [_DsBackupGetBackupLogs]
  715. end;
  716. end;
  717. var
  718. _DsBackupTruncateLogs: Pointer;
  719. function DsBackupTruncateLogs;
  720. begin
  721. GetProcedureAddress(_DsBackupTruncateLogs, ntdsbclilib, 'DsBackupTruncateLogs');
  722. asm
  723. MOV ESP, EBP
  724. POP EBP
  725. JMP [_DsBackupTruncateLogs]
  726. end;
  727. end;
  728. var
  729. _DsBackupEnd: Pointer;
  730. function DsBackupEnd;
  731. begin
  732. GetProcedureAddress(_DsBackupEnd, ntdsbclilib, 'DsBackupEnd');
  733. asm
  734. MOV ESP, EBP
  735. POP EBP
  736. JMP [_DsBackupEnd]
  737. end;
  738. end;
  739. var
  740. _DsBackupFree: Pointer;
  741. procedure DsBackupFree;
  742. begin
  743. GetProcedureAddress(_DsBackupFree, ntdsbclilib, 'DsBackupFree');
  744. asm
  745. MOV ESP, EBP
  746. POP EBP
  747. JMP [_DsBackupFree]
  748. end;
  749. end;
  750. var
  751. _DsRestoreGetDatabaseLocationsA: Pointer;
  752. function DsRestoreGetDatabaseLocationsA;
  753. begin
  754. GetProcedureAddress(_DsRestoreGetDatabaseLocationsA, ntdsbclilib, 'DsRestoreGetDatabaseLocationsA');
  755. asm
  756. MOV ESP, EBP
  757. POP EBP
  758. JMP [_DsRestoreGetDatabaseLocationsA]
  759. end;
  760. end;
  761. var
  762. _DsRestoreGetDatabaseLocationsW: Pointer;
  763. function DsRestoreGetDatabaseLocationsW;
  764. begin
  765. GetProcedureAddress(_DsRestoreGetDatabaseLocationsW, ntdsbclilib, 'DsRestoreGetDatabaseLocationsW');
  766. asm
  767. MOV ESP, EBP
  768. POP EBP
  769. JMP [_DsRestoreGetDatabaseLocationsW]
  770. end;
  771. end;
  772. var
  773. _DsRestoreGetDatabaseLocations: Pointer;
  774. function DsRestoreGetDatabaseLocations;
  775. begin
  776. GetProcedureAddress(_DsRestoreGetDatabaseLocations, ntdsbclilib, 'DsRestoreGetDatabaseLocations' + AWSuffix);
  777. asm
  778. MOV ESP, EBP
  779. POP EBP
  780. JMP [_DsRestoreGetDatabaseLocations]
  781. end;
  782. end;
  783. var
  784. _DsRestorePrepareA: Pointer;
  785. function DsRestorePrepareA;
  786. begin
  787. GetProcedureAddress(_DsRestorePrepareA, ntdsbclilib, 'DsRestorePrepareA');
  788. asm
  789. MOV ESP, EBP
  790. POP EBP
  791. JMP [_DsRestorePrepareA]
  792. end;
  793. end;
  794. var
  795. _DsRestorePrepareW: Pointer;
  796. function DsRestorePrepareW;
  797. begin
  798. GetProcedureAddress(_DsRestorePrepareW, ntdsbclilib, 'DsRestorePrepareW');
  799. asm
  800. MOV ESP, EBP
  801. POP EBP
  802. JMP [_DsRestorePrepareW]
  803. end;
  804. end;
  805. var
  806. _DsRestorePrepare: Pointer;
  807. function DsRestorePrepare;
  808. begin
  809. GetProcedureAddress(_DsRestorePrepare, ntdsbclilib, 'DsRestorePrepare' + AWSuffix);
  810. asm
  811. MOV ESP, EBP
  812. POP EBP
  813. JMP [_DsRestorePrepare]
  814. end;
  815. end;
  816. var
  817. _DsRestoreRegisterA: Pointer;
  818. function DsRestoreRegisterA;
  819. begin
  820. GetProcedureAddress(_DsRestoreRegisterA, ntdsbclilib, 'DsRestoreRegisterA');
  821. asm
  822. MOV ESP, EBP
  823. POP EBP
  824. JMP [_DsRestoreRegisterA]
  825. end;
  826. end;
  827. var
  828. _DsRestoreRegisterW: Pointer;
  829. function DsRestoreRegisterW;
  830. begin
  831. GetProcedureAddress(_DsRestoreRegisterW, ntdsbclilib, 'DsRestoreRegisterW');
  832. asm
  833. MOV ESP, EBP
  834. POP EBP
  835. JMP [_DsRestoreRegisterW]
  836. end;
  837. end;
  838. var
  839. _DsRestoreRegister: Pointer;
  840. function DsRestoreRegister;
  841. begin
  842. GetProcedureAddress(_DsRestoreRegister, ntdsbclilib, 'DsRestoreRegister' + AWSuffix);
  843. asm
  844. MOV ESP, EBP
  845. POP EBP
  846. JMP [_DsRestoreRegister]
  847. end;
  848. end;
  849. var
  850. _DsRestoreRegisterComplete: Pointer;
  851. function DsRestoreRegisterComplete;
  852. begin
  853. GetProcedureAddress(_DsRestoreRegisterComplete, ntdsbclilib, 'DsRestoreRegisterComplete');
  854. asm
  855. MOV ESP, EBP
  856. POP EBP
  857. JMP [_DsRestoreRegisterComplete]
  858. end;
  859. end;
  860. var
  861. _DsRestoreEnd: Pointer;
  862. function DsRestoreEnd;
  863. begin
  864. GetProcedureAddress(_DsRestoreEnd, ntdsbclilib, 'DsRestoreEnd');
  865. asm
  866. MOV ESP, EBP
  867. POP EBP
  868. JMP [_DsRestoreEnd]
  869. end;
  870. end;
  871. var
  872. _DsSetCurrentBackupLogA: Pointer;
  873. function DsSetCurrentBackupLogA;
  874. begin
  875. GetProcedureAddress(_DsSetCurrentBackupLogA, ntdsbclilib, 'DsSetCurrentBackupLogA');
  876. asm
  877. MOV ESP, EBP
  878. POP EBP
  879. JMP [_DsSetCurrentBackupLogA]
  880. end;
  881. end;
  882. var
  883. _DsSetCurrentBackupLogW: Pointer;
  884. function DsSetCurrentBackupLogW;
  885. begin
  886. GetProcedureAddress(_DsSetCurrentBackupLogW, ntdsbclilib, 'DsSetCurrentBackupLogW');
  887. asm
  888. MOV ESP, EBP
  889. POP EBP
  890. JMP [_DsSetCurrentBackupLogW]
  891. end;
  892. end;
  893. var
  894. _DsSetCurrentBackupLog: Pointer;
  895. function DsSetCurrentBackupLog;
  896. begin
  897. GetProcedureAddress(_DsSetCurrentBackupLog, ntdsbclilib, 'DsSetCurrentBackupLog' + AWSuffix);
  898. asm
  899. MOV ESP, EBP
  900. POP EBP
  901. JMP [_DsSetCurrentBackupLog]
  902. end;
  903. end;
  904. var
  905. _DsSetAuthIdentityA: Pointer;
  906. function DsSetAuthIdentityA;
  907. begin
  908. GetProcedureAddress(_DsSetAuthIdentityA, ntdsbclilib, 'DsSetAuthIdentityA');
  909. asm
  910. MOV ESP, EBP
  911. POP EBP
  912. JMP [_DsSetAuthIdentityA]
  913. end;
  914. end;
  915. var
  916. _DsSetAuthIdentityW: Pointer;
  917. function DsSetAuthIdentityW;
  918. begin
  919. GetProcedureAddress(_DsSetAuthIdentityW, ntdsbclilib, 'DsSetAuthIdentityW');
  920. asm
  921. MOV ESP, EBP
  922. POP EBP
  923. JMP [_DsSetAuthIdentityW]
  924. end;
  925. end;
  926. var
  927. _DsSetAuthIdentity: Pointer;
  928. function DsSetAuthIdentity;
  929. begin
  930. GetProcedureAddress(_DsSetAuthIdentity, ntdsbclilib, 'DsSetAuthIdentity' + AWSuffix);
  931. asm
  932. MOV ESP, EBP
  933. POP EBP
  934. JMP [_DsSetAuthIdentity]
  935. end;
  936. end;
  937. {$ELSE}
  938. function DsIsNTDSOnlineA; external ntdsbclilib name 'DsIsNTDSOnlineA';
  939. function DsIsNTDSOnlineW; external ntdsbclilib name 'DsIsNTDSOnlineW';
  940. function DsIsNTDSOnline; external ntdsbclilib name 'DsIsNTDSOnline' + AWSuffix;
  941. function DsBackupPrepareA; external ntdsbclilib name 'DsBackupPrepareA';
  942. function DsBackupPrepareW; external ntdsbclilib name 'DsBackupPrepareW';
  943. function DsBackupPrepare; external ntdsbclilib name 'DsBackupPrepare' + AWSuffix;
  944. function DsBackupGetDatabaseNamesA; external ntdsbclilib name 'DsBackupGetDatabaseNamesA';
  945. function DsBackupGetDatabaseNamesW; external ntdsbclilib name 'DsBackupGetDatabaseNamesW';
  946. function DsBackupGetDatabaseNames; external ntdsbclilib name 'DsBackupGetDatabaseNames' + AWSuffix;
  947. function DsBackupOpenFileA; external ntdsbclilib name 'DsBackupOpenFileA';
  948. function DsBackupOpenFileW; external ntdsbclilib name 'DsBackupOpenFileW';
  949. function DsBackupOpenFile; external ntdsbclilib name 'DsBackupOpenFile' + AWSuffix;
  950. function DsBackupRead; external ntdsbclilib name 'DsBackupRead';
  951. function DsBackupClose; external ntdsbclilib name 'DsBackupClose';
  952. function DsBackupGetBackupLogsA; external ntdsbclilib name 'DsBackupGetBackupLogsA';
  953. function DsBackupGetBackupLogsW; external ntdsbclilib name 'DsBackupGetBackupLogsW';
  954. function DsBackupGetBackupLogs; external ntdsbclilib name 'DsBackupGetBackupLogs' + AWSuffix;
  955. function DsBackupTruncateLogs; external ntdsbclilib name 'DsBackupTruncateLogs';
  956. function DsBackupEnd; external ntdsbclilib name 'DsBackupEnd';
  957. procedure DsBackupFree; external ntdsbclilib name 'DsBackupFree';
  958. function DsRestoreGetDatabaseLocationsA; external ntdsbclilib name 'DsRestoreGetDatabaseLocationsA';
  959. function DsRestoreGetDatabaseLocationsW; external ntdsbclilib name 'DsRestoreGetDatabaseLocationsW';
  960. function DsRestoreGetDatabaseLocations; external ntdsbclilib name 'DsRestoreGetDatabaseLocations' + AWSuffix;
  961. function DsRestorePrepareA; external ntdsbclilib name 'DsRestorePrepareA';
  962. function DsRestorePrepareW; external ntdsbclilib name 'DsRestorePrepareW';
  963. function DsRestorePrepare; external ntdsbclilib name 'DsRestorePrepare' + AWSuffix;
  964. function DsRestoreRegisterA; external ntdsbclilib name 'DsRestoreRegisterA';
  965. function DsRestoreRegisterW; external ntdsbclilib name 'DsRestoreRegisterW';
  966. function DsRestoreRegister; external ntdsbclilib name 'DsRestoreRegister' + AWSuffix;
  967. function DsRestoreRegisterComplete; external ntdsbclilib name 'DsRestoreRegisterComplete';
  968. function DsRestoreEnd; external ntdsbclilib name 'DsRestoreEnd';
  969. function DsSetCurrentBackupLogA; external ntdsbclilib name 'DsSetCurrentBackupLogA';
  970. function DsSetCurrentBackupLogW; external ntdsbclilib name 'DsSetCurrentBackupLogW';
  971. function DsSetCurrentBackupLog; external ntdsbclilib name 'DsSetCurrentBackupLog' + AWSuffix;
  972. function DsSetAuthIdentityA; external ntdsbclilib name 'DsSetAuthIdentityA';
  973. function DsSetAuthIdentityW; external ntdsbclilib name 'DsSetAuthIdentityW';
  974. function DsSetAuthIdentity; external ntdsbclilib name 'DsSetAuthIdentity' + AWSuffix;
  975. {$ENDIF DYNAMIC_LINK}
  976. {$ENDIF JWA_INTERFACESECTION}
  977. {$IFNDEF JWA_OMIT_SECTIONS}
  978. end.
  979. {$ENDIF JWA_OMIT_SECTIONS}