1
{******************************************************************************}
3
{ Directory Backup and Restore API interface Unit for Object Pascal }
5
{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
6
{ Corporation. All Rights Reserved. }
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). }
12
{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
13
{ Marcel van Brakel. All Rights Reserved. }
15
{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
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 }
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 }
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. }
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. }
39
{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
41
{******************************************************************************}
43
// $Id: jwantdsbcli.pas,v 1.1 2005/04/04 07:56:10 marco Exp $
50
{$HPPEMIT '#include ":ntdsbcli.h"'}
61
g_wszBackupAnnotation = 'NTDS Backup Interface';
62
{$EXTERNALSYM g_wszBackupAnnotation}
63
g_aszBackupAnnotation = 'NTDS Backup Interface';
64
{$EXTERNALSYM g_aszBackupAnnotation}
66
g_wszRestoreAnnotation = 'NTDS Restore Interface';
67
{$EXTERNALSYM g_wszRestoreAnnotation}
68
g_aszRestoreAnnotation = 'NTDS Restore Interface';
69
{$EXTERNALSYM g_aszRestoreAnnotation}
72
g_szBackupAnnotation = g_wszBackupAnnotation;
73
{$EXTERNALSYM g_szBackupAnnotation}
74
g_szRestoreAnnotation = g_wszRestoreAnnotation;
75
{$EXTERNALSYM g_szRestoreAnnotation}
77
g_szBackupAnnotation = g_aszBackupAnnotation;
78
{$EXTERNALSYM g_szBackupAnnotation}
79
g_szRestoreAnnotation = g_aszRestoreAnnotation;
80
{$EXTERNALSYM g_szRestoreAnnotation}
83
// Type of Backup passed to DsBackupPrepare()
84
// BACKUP_TYPE_FULL: Requesting backup of the complete DS (DIT, Log files, and Patch files)
85
// BACKUP_TYPE_LOGS_ONLY: Requesting backup of only the log files
86
// BACKUP_TYPE_INCREMENTAL: Requesting incremental backup i.e. backing up only changes that happened since last backup
88
BACKUP_TYPE_FULL = $01;
89
{$EXTERNALSYM BACKUP_TYPE_FULL}
90
BACKUP_TYPE_LOGS_ONLY = $02;
91
{$EXTERNALSYM BACKUP_TYPE_LOGS_ONLY}
92
BACKUP_TYPE_INCREMENTAL = $04; // not supported in product1
93
{$EXTERNALSYM BACKUP_TYPE_INCREMENTAL}
95
// Type of Restore passed to DsRestorePrepare()
96
// RESTORE_TYPE_AUTHORATATIVE: The restored version wins throughout the enterprise
97
// RESTORE_TYPE_ONLINE: Restoration is done when NTDS is online.
98
// RESTORE_TYPE_CATCHUP: The restored version is reconciled through the standard reconciliation logic so that the
99
// restored DIT can catchup with the rest of the enterprise.
101
RESTORE_TYPE_AUTHORATATIVE = $01;
102
{$EXTERNALSYM RESTORE_TYPE_AUTHORATATIVE}
103
RESTORE_TYPE_ONLINE = $02; // not supported in product1
104
{$EXTERNALSYM RESTORE_TYPE_ONLINE}
105
RESTORE_TYPE_CATCHUP = $04; // this is the default restore mode
106
{$EXTERNALSYM RESTORE_TYPE_CATCHUP}
108
// Setting the current log # to this value would disable incremental/differential backup
110
BACKUP_DISABLE_INCREMENTAL = DWORD($ffffffff);
111
{$EXTERNALSYM BACKUP_DISABLE_INCREMENTAL}
113
// BFT is the bit flag used to represent file types (directory/dit/logfile/etc.)
114
// We keep them as a character so that we can append/prepend them to the actual file
115
// path. The code in the Backup API's rely on the fact that values 0-256 in 8 bit ascii
116
// map to the values 0-256 in unicode.
128
// BFT_DIRECTORY - indicates path specified is a directory
129
// BFT_DATABASE_DIRECTORY - indicates that file goes into database directory
130
// BFT_LOG_DIRECTORY - indicates that the file goes into log directory
134
{$EXTERNALSYM BFT_DIRECTORY}
135
BFT_DATABASE_DIRECTORY = $40;
136
{$EXTERNALSYM BFT_DATABASE_DIRECTORY}
137
BFT_LOG_DIRECTORY = $20;
138
{$EXTERNALSYM BFT_LOG_DIRECTORY}
140
// Following combinations are defined for easy use of the filetype and the directory into
141
// into which it goes
143
BFT_LOG = BFT($01 or BFT_LOG_DIRECTORY);
144
BFT_LOG_DIR = BFT($02 or BFT_DIRECTORY);
145
BFT_CHECKPOINT_DIR = BFT($03 or BFT_DIRECTORY);
146
BFT_NTDS_DATABASE = BFT($04 or BFT_DATABASE_DIRECTORY);
147
BFT_PATCH_FILE = BFT($05 or BFT_LOG_DIRECTORY);
148
BFT_UNKNOWN = BFT($0F);
150
// #include <ntdsbmsg.h>
152
// Backup Context Handle
158
PEDB_RSTMAPA = ^EDB_RSTMAPA;
159
{$EXTERNALSYM PEDB_RSTMAPA}
160
tagEDB_RSTMAPA = record
161
szDatabaseName: PChar;
162
szNewDtabaseName: PChar;
164
{$EXTERNALSYM tagEDB_RSTMAPA}
165
EDB_RSTMAPA = tagEDB_RSTMAPA;
166
{$EXTERNALSYM EDB_RSTMAPA}
167
TEdbRstMapA = EDB_RSTMAPA;
168
PEdbRstMapA = PEDB_RSTMAPA;
170
// required for NTDS unicode support.
173
PEDB_RSTMAPW = ^EDB_RSTMAPW;
174
{$EXTERNALSYM PEDB_RSTMAPW}
175
tagEDB_RSTMAPW = record
176
wszDatabaseName: PWCHAR;
177
wszNewDatabaseName: PWCHAR;
179
{$EXTERNALSYM tagEDB_RSTMAPW}
180
EDB_RSTMAPW = tagEDB_RSTMAPW;
181
{$EXTERNALSYM EDB_RSTMAPW}
182
TEdbRstMapW = EDB_RSTMAPW;
183
PEdbRstMapW = PEDB_RSTMAPW;
186
EDB_RSTMAP = EDB_RSTMAPW;
187
{$EXTERNALSYM EDB_RSTMAP}
188
PEDB_RSTMAP = PEDB_RSTMAPW;
189
{$EXTERNALSYM PEDB_RSTMAP}
190
TEdbRstMap = TEdbRstMapW;
191
PEdbRstMap = PEdbRstMapW;
193
EDB_RSTMAP = EDB_RSTMAPA;
194
{$EXTERNALSYM EDB_RSTMAP}
195
PEDB_RSTMAP = PEDB_RSTMAPA;
196
{$EXTERNALSYM PEDB_RSTMAP}
197
TEdbRstMap = TEdbRstMapA;
198
PEdbRstMap = PEdbRstMapA;
201
{*************************************************************************************
205
Checks to see if the NTDS is Online on the given server. This call is
206
guaranteed to return quickly.
209
[in] szServerName - UNC name of the server to check
210
[out] pfNTDSOnline - pointer to receive the bool result (TRUE if NTDS is
211
online; FALSE, otherwise)
215
ERROR_SUCCESS if the call executed successfully;
216
Failure code otherwise.
217
**************************************************************************************}
219
function DsIsNTDSOnlineA(szServerName: LPCSTR; var pfNTDSOnline: BOOL): HRESULT; stdcall;
220
{$EXTERNALSYM DsIsNTDSOnlineA}
221
function DsIsNTDSOnlineW(szServerName: LPCWSTR; var pfNTDSOnline: BOOL): HRESULT; stdcall;
222
{$EXTERNALSYM DsIsNTDSOnlineW}
223
function DsIsNTDSOnline(szServerName: LPCTSTR; var pfNTDSOnline: BOOL): HRESULT; stdcall;
224
{$EXTERNALSYM DsIsNTDSOnline}
226
{*************************************************************************************
230
Prepares the DS for the online backup and returns a Backup Context Handle
231
which should be used in the subsequent calls to other backup functions.
234
[in] szBackupServer - UNC name of the server to be prepared for online backup
235
[in] grbit - flag to be passed to jet while backing up dbs
236
[in] btFlag - BACKUP_TYPE_FULL or BACKUP_TYPE_LOGS_ONLY
237
[out] ppvExpiryToken - pointer that will receive the pointer to the
238
Expiry Token associated with this backup; Client should save
239
this token and send it back through DsRestorePrepare() when
240
attempting a restore; allocated memory should be freed using
241
DsBackupFree() API by the caller when it is no longer needed.
242
[out] pcbExpiryTokenSize - pointer to receive the size of the expiry token
244
[out] phbc - pointer that will receive the backup context handle
248
One of the standard HRESULT success codes;
249
Failure code otherwise.
250
**************************************************************************************}
252
function DsBackupPrepareA(szBackupServer: LPCSTR; grbit: ULONG; btFlag: ULONG;
253
var ppvExpiryToken: PVOID; var pcbExpiryTokenSize: DWORD; var phbc: HBC): HRESULT; stdcall;
254
{$EXTERNALSYM DsBackupPrepareA}
255
function DsBackupPrepareW(szBackupServer: LPCWSTR; grbit: ULONG; btFlag: ULONG;
256
var ppvExpiryToken: PVOID; var pcbExpiryTokenSize: DWORD; var phbc: HBC): HRESULT; stdcall;
257
{$EXTERNALSYM DsBackupPrepareW}
258
function DsBackupPrepare(szBackupServer: LPCTSTR; grbit: ULONG; btFlag: ULONG;
259
var ppvExpiryToken: PVOID; var pcbExpiryTokenSize: DWORD; var phbc: HBC): HRESULT; stdcall;
260
{$EXTERNALSYM DsBackupPrepare}
262
{*************************************************************************************
265
DsBackupGetDatabaseNames
266
Gives the list of data bases that need to be backed up for the given
270
[in] hbc - backup context handle
271
[out] pszAttachmentInfo - pointer that will receive the pointer to the attachment
272
info; allocated memory should be freed using DsBackupFree() API by the
273
caller when it is no longer needed; Attachment info is an array of
274
null-terminated filenames and and the list is terminated by two-nulls.
275
[out] pcbSize - will receive the number of bytes returned
278
One of the standard HRESULT success codes;
279
Failure code otherwise.
280
**************************************************************************************}
282
function DsBackupGetDatabaseNamesA(hbc: HBC; var pszAttachmentInfo: LPSTR;
283
var pcbSize: DWORD): HRESULT; stdcall;
284
{$EXTERNALSYM DsBackupGetDatabaseNamesA}
285
function DsBackupGetDatabaseNamesW(hbc: HBC; var pszAttachmentInfo: LPWSTR;
286
var pcbSize: DWORD): HRESULT; stdcall;
287
{$EXTERNALSYM DsBackupGetDatabaseNamesW}
288
function DsBackupGetDatabaseNames(hbc: HBC; var pszAttachmentInfo: LPTSTR;
289
var pcbSize: DWORD): HRESULT; stdcall;
290
{$EXTERNALSYM DsBackupGetDatabaseNames}
292
{*************************************************************************************
296
Opens the given attachment for read.
299
[in] hbc - backup context handle
300
[in] szAttachmentName - name of the attachment to be opened for read
301
[in] cbReadHintSize - suggested size in bytes that might be used during the
302
subsequent reads on this attachement
303
[out] pliFileSize - pointer to a large integer that would receive the size in
304
bytes of the given attachment
307
One of the standard HRESULT success codes;
308
Failure code otherwise.
309
**************************************************************************************}
311
function DsBackupOpenFileA(hbc: HBC; szAttachmentName: LPCSTR; cbReadHintSize: DWORD;
312
var pliFileSize: LARGE_INTEGER): HRESULT; stdcall;
313
{$EXTERNALSYM DsBackupOpenFileA}
314
function DsBackupOpenFileW(hbc: HBC; szAttachmentName: LPCWSTR; cbReadHintSize: DWORD;
315
var pliFileSize: LARGE_INTEGER): HRESULT; stdcall;
316
{$EXTERNALSYM DsBackupOpenFileW}
317
function DsBackupOpenFile(hbc: HBC; szAttachmentName: LPCTSTR; cbReadHintSize: DWORD;
318
var pliFileSize: LARGE_INTEGER): HRESULT; stdcall;
319
{$EXTERNALSYM DsBackupOpenFile}
321
{*************************************************************************************
325
Reads the currently open attachment bytes into the given buffer. The client
326
application is expected to call this function repeatedly until it gets the
327
entire file (the application would have received the file size through the
328
DsBackupOpenFile() call before.
331
[in] hbc - backup context handle
332
[in] pvBuffer - pointer to the buffer that would receive the read data.
333
[in] cbBuffer - specifies the size of the above buffer
334
[out] pcbRead - pointer to receive the actual number of bytes read.
337
One of the standard HRESULT success codes;
338
Failure code otherwise.
339
**************************************************************************************}
341
function DsBackupRead(hbc: HBC; pvBuffer: PVOID; cbBuffer: DWORD; var pcbRead: DWORD): HRESULT; stdcall;
342
{$EXTERNALSYM DsBackupRead}
344
{*************************************************************************************
348
To be called by the application after it completes reading all the data in
349
the currently opened attachement.
352
[in] hbc - backup context handle
355
One of the standard HRESULT success codes;
356
Failure code otherwise.
357
**************************************************************************************}
359
function DsBackupClose(hbc: HBC): HRESULT; stdcall;
360
{$EXTERNALSYM DsBackupClose}
362
{*************************************************************************************
365
DsBackupGetBackupLogs
366
Gives the list of log files that need to be backed up for the given
370
[in] hbc - backup context handle
371
[out] pszBackupLogFiles - pointer that will receive the pointer to the list of
372
log files; allocated memory should be freed using DsBackupFree() API by the
373
caller when it is no longer needed; Log files are returned in an array of
374
null-terminated filenames and and the list is terminated by two-nulls.
375
[out] pcbSize - will receive the number of bytes returned
378
One of the standard HRESULT success codes;
379
Failure code otherwise.
380
**************************************************************************************}
382
function DsBackupGetBackupLogsA(hbc: HBC; var pszBackupLogFiles: LPSTR;
383
var pcbSize: DWORD): HRESULT; stdcall;
384
{$EXTERNALSYM DsBackupGetBackupLogsA}
385
function DsBackupGetBackupLogsW(hbc: HBC; var pszBackupLogFiles: LPWSTR;
386
var pcbSize: DWORD): HRESULT; stdcall;
387
{$EXTERNALSYM DsBackupGetBackupLogsW}
388
function DsBackupGetBackupLogs(hbc: HBC; var pszBackupLogFiles: LPTSTR;
389
var pcbSize: DWORD): HRESULT; stdcall;
390
{$EXTERNALSYM DsBackupGetBackupLogs}
392
{*************************************************************************************
396
Called to truncate the already read backup logs.
399
[in] hbc - backup context handle
402
One of the standard HRESULT success codes;
403
Failure code otherwise.
404
**************************************************************************************}
406
function DsBackupTruncateLogs(hbc: HBC): HRESULT; stdcall;
407
{$EXTERNALSYM DsBackupTruncateLogs}
409
{*************************************************************************************
413
Called to end the current backup session.
416
[in] hbc - backup context handle of the backup session
419
One of the standard HRESULT success codes;
420
Failure code otherwise.
421
**************************************************************************************}
423
function DsBackupEnd(hbc: HBC): HRESULT; stdcall;
424
{$EXTERNALSYM DsBackupEnd}
426
{*************************************************************************************
430
Should be used by the application to free any buffer allocated by the
434
[in] pvBuffer - pointer to the buffer that is to be freed.
438
**************************************************************************************}
440
procedure DsBackupFree(pvBuffer: PVOID); stdcall;
441
{$EXTERNALSYM DsBackupFree}
443
{*************************************************************************************
446
DsRestoreGetDatabaseLocations
447
Called both at backup time as well at restoration time to get the data base
448
locations for different types of files.
451
[in] hbc - backup context handle which would have been obtained through
452
DsBackupPrepare() in the backup case and through DsRestorePrepare()
454
[out] pszDatabaseLocationList - pointer that will receive the pointer to the list of
455
database locations; allocated memory should be freed using DsBackupFree() API by the
456
caller when it is no longer needed; locations are returned in an array of
457
null-terminated names and and the list is terminated by two-nulls.
458
The first character of each name is the BFT character that indicates the type
459
of the file and the rest of the name tells gives the path into which that
460
particular type of file should be restored.
461
[out] pcbSize - will receive the number of bytes returned
464
One of the standard HRESULT success codes;
465
Failure code otherwise.
466
**************************************************************************************}
468
function DsRestoreGetDatabaseLocationsA(hbc: HBC; var pszDatabaseLocationList: LPSTR;
469
var pcbSize: DWORD): HRESULT; stdcall;
470
{$EXTERNALSYM DsRestoreGetDatabaseLocationsA}
471
function DsRestoreGetDatabaseLocationsW(hbc: HBC; var pszDatabaseLocationList: LPWSTR;
472
var pcbSize: DWORD): HRESULT; stdcall;
473
{$EXTERNALSYM DsRestoreGetDatabaseLocationsW}
474
function DsRestoreGetDatabaseLocations(hbc: HBC; var pszDatabaseLocationList: LPTSTR;
475
var pcbSize: DWORD): HRESULT; stdcall;
476
{$EXTERNALSYM DsRestoreGetDatabaseLocations}
478
{*************************************************************************************
482
Called to indicate beginning of a restore session.
485
[in] szServerName - UNC name of the server into which the restore operation is
486
going to be performed.
487
[in] rtFlag - Or'ed combination of RESTORE_TYPE_* flags; 0 if no special flags
489
[in] pvExpiryToken - pointer to the expiry token associated with this
490
backup. The client would have received this when they backed up the DS.
491
[in] cbExpiryTokenSize - size of the expiry token.
492
[out] phbc - pointer to receive the backup context handle which is to be passed
493
to the subsequent restore APIs
497
One of the standard HRESULT success codes;
498
Failure code otherwise.
499
**************************************************************************************}
501
function DsRestorePrepareA(szServerName: LPCSTR; rtFlag: ULONG; pvExpiryToken: PVOID;
502
cbExpiryTokenSize: DWORD; var phbc: HBC): HRESULT; stdcall;
503
{$EXTERNALSYM DsRestorePrepareA}
504
function DsRestorePrepareW(szServerName: LPCWSTR; rtFlag: ULONG; pvExpiryToken: PVOID;
505
cbExpiryTokenSize: DWORD; var phbc: HBC): HRESULT; stdcall;
506
{$EXTERNALSYM DsRestorePrepareW}
507
function DsRestorePrepare(szServerName: LPCTSTR; rtFlag: ULONG; pvExpiryToken: PVOID;
508
cbExpiryTokenSize: DWORD; var phbc: HBC): HRESULT; stdcall;
509
{$EXTERNALSYM DsRestorePrepare}
511
{*************************************************************************************
515
This will register a restore operation. It will interlock all sbsequent restore
516
operations, and will prevent the restore target from starting until the call
517
to DsRestoreRegisterComplete() is made.
520
[in] hbc - backup context handle for the restore session.
521
[in] szCheckPointFilePath - path where the check point files are restored
522
[in] szLogPath - path where the log files are restored
523
[in] rgrstmap - restore map
524
[in] crstmap - tells if ther is a new restore map
525
[in] szBackupLogPath - path where the backup logs are located
526
[in] genLow - Lowest log# that was restored in this restore session
527
[in] genHigh - Highest log# that was restored in this restore session
531
One of the standard HRESULT success codes;
532
Failure code otherwise.
533
**************************************************************************************}
535
function DsRestoreRegisterA(hbc: HBC; szCheckPointFilePath, szLogPath: LPCSTR;
536
rgrstmap: PEDB_RSTMAPA; crstmap: LONG; szBackupLogPath: LPCSTR; genLow, genHigh: ULONG): HRESULT; stdcall;
537
{$EXTERNALSYM DsRestoreRegisterA}
538
function DsRestoreRegisterW(hbc: HBC; szCheckPointFilePath, szLogPath: LPCWSTR;
539
rgrstmap: PEDB_RSTMAPW; crstmap: LONG; szBackupLogPath: LPCWSTR; genLow, genHigh: ULONG): HRESULT; stdcall;
540
{$EXTERNALSYM DsRestoreRegisterW}
541
function DsRestoreRegister(hbc: HBC; szCheckPointFilePath, szLogPath: LPCTSTR;
542
rgrstmap: PEDB_RSTMAP; crstmap: LONG; szBackupLogPath: LPCTSTR; genLow, genHigh: ULONG): HRESULT; stdcall;
543
{$EXTERNALSYM DsRestoreRegister}
545
{*************************************************************************************
548
DsRestoreRegisterComplete
549
Called to indicate that a previously registered restore is complete.
552
[in] hbc - backup context handle
553
[in] hrRestoreState - success code if the restore was successful
556
One of the standard HRESULT success codes;
557
Failure code otherwise.
558
**************************************************************************************}
560
function DsRestoreRegisterComplete(hbc: HBC; hrRestoreState: HRESULT): HRESULT; stdcall;
561
{$EXTERNALSYM DsRestoreRegisterComplete}
563
{*************************************************************************************
567
Called to end a restore session
570
[in] hbc - backup context handle
573
One of the standard HRESULT success codes;
574
Failure code otherwise.
575
**************************************************************************************}
577
function DsRestoreEnd(hbc: HBC): HRESULT; stdcall;
578
{$EXTERNALSYM DsRestoreEnd}
580
{*************************************************************************************
583
DsSetCurrentBackupLog
584
Called to set the current backup log number after a successful restore
587
[in] szServerName - UNC name of the server for which the current backup log has
589
[in] dwCurrentLog - current log number
592
One of the standard HRESULT success codes;
593
Failure code otherwise.
594
**************************************************************************************}
596
function DsSetCurrentBackupLogA(szServerName: LPCSTR; dwCurrentLog: DWORD): HRESULT; stdcall;
597
{$EXTERNALSYM DsSetCurrentBackupLogA}
598
function DsSetCurrentBackupLogW(szServerName: LPCWSTR; dwCurrentLog: DWORD): HRESULT; stdcall;
599
{$EXTERNALSYM DsSetCurrentBackupLogW}
600
function DsSetCurrentBackupLog(szServerName: LPCTSTR; dwCurrentLog: DWORD): HRESULT; stdcall;
601
{$EXTERNALSYM DsSetCurrentBackupLog}
603
{*************************************************************************************
607
Used to set the security context under which the client APIs are to be
608
called. If this function is not called, security context of the current
612
[in] szUserName - name of the user
613
[in] szDomainName - name of the domain the user belongs to
614
[in] szPassword - password of the user in the specified domain
618
One of the standard HRESULT success codes;
619
Failure code otherwise.
620
**************************************************************************************}
622
function DsSetAuthIdentityA(szUserName, szDomainName, szPassword: LPCSTR): HRESULT; stdcall;
623
{$EXTERNALSYM DsSetAuthIdentityA}
624
function DsSetAuthIdentityW(szUserName, szDomainName, szPassword: LPCWSTR): HRESULT; stdcall;
625
{$EXTERNALSYM DsSetAuthIdentityW}
626
function DsSetAuthIdentity(szUserName, szDomainName, szPassword: LPCTSTR): HRESULT; stdcall;
627
{$EXTERNALSYM DsSetAuthIdentity}
632
ntdsbclilib = 'ntdsbclilib.dll';
639
{$IFDEF DYNAMIC_LINK}
642
_DsIsNTDSOnlineA: Pointer;
644
function DsIsNTDSOnlineA;
646
GetProcedureAddress(_DsIsNTDSOnlineA, ntdsbclilib, 'DsIsNTDSOnlineA');
650
JMP [_DsIsNTDSOnlineA]
655
_DsIsNTDSOnlineW: Pointer;
657
function DsIsNTDSOnlineW;
659
GetProcedureAddress(_DsIsNTDSOnlineW, ntdsbclilib, 'DsIsNTDSOnlineW');
663
JMP [_DsIsNTDSOnlineW]
668
_DsIsNTDSOnline: Pointer;
670
function DsIsNTDSOnline;
672
GetProcedureAddress(_DsIsNTDSOnline, ntdsbclilib, 'DsIsNTDSOnline' + AWSuffix);
676
JMP [_DsIsNTDSOnline]
681
_DsBackupPrepareA: Pointer;
683
function DsBackupPrepareA;
685
GetProcedureAddress(_DsBackupPrepareA, ntdsbclilib, 'DsBackupPrepareA');
689
JMP [_DsBackupPrepareA]
694
_DsBackupPrepareW: Pointer;
696
function DsBackupPrepareW;
698
GetProcedureAddress(_DsBackupPrepareW, ntdsbclilib, 'DsBackupPrepareW');
702
JMP [_DsBackupPrepareW]
707
_DsBackupPrepare: Pointer;
709
function DsBackupPrepare;
711
GetProcedureAddress(_DsBackupPrepare, ntdsbclilib, 'DsBackupPrepare' + AWSuffix);
715
JMP [_DsBackupPrepare]
720
_DsBackupGetDatabaseNamesA: Pointer;
722
function DsBackupGetDatabaseNamesA;
724
GetProcedureAddress(_DsBackupGetDatabaseNamesA, ntdsbclilib, 'DsBackupGetDatabaseNamesA');
728
JMP [_DsBackupGetDatabaseNamesA]
733
_DsBackupGetDatabaseNamesW: Pointer;
735
function DsBackupGetDatabaseNamesW;
737
GetProcedureAddress(_DsBackupGetDatabaseNamesW, ntdsbclilib, 'DsBackupGetDatabaseNamesW');
741
JMP [_DsBackupGetDatabaseNamesW]
746
_DsBackupGetDatabaseNames: Pointer;
748
function DsBackupGetDatabaseNames;
750
GetProcedureAddress(_DsBackupGetDatabaseNames, ntdsbclilib, 'DsBackupGetDatabaseNames' + AWSuffix);
754
JMP [_DsBackupGetDatabaseNames]
759
_DsBackupOpenFileA: Pointer;
761
function DsBackupOpenFileA;
763
GetProcedureAddress(_DsBackupOpenFileA, ntdsbclilib, 'DsBackupOpenFileA');
767
JMP [_DsBackupOpenFileA]
772
_DsBackupOpenFileW: Pointer;
774
function DsBackupOpenFileW;
776
GetProcedureAddress(_DsBackupOpenFileW, ntdsbclilib, 'DsBackupOpenFileW');
780
JMP [_DsBackupOpenFileW]
785
_DsBackupOpenFile: Pointer;
787
function DsBackupOpenFile;
789
GetProcedureAddress(_DsBackupOpenFile, ntdsbclilib, 'DsBackupOpenFile' + AWSuffix);
793
JMP [_DsBackupOpenFile]
798
_DsBackupRead: Pointer;
800
function DsBackupRead;
802
GetProcedureAddress(_DsBackupRead, ntdsbclilib, 'DsBackupRead');
811
_DsBackupClose: Pointer;
813
function DsBackupClose;
815
GetProcedureAddress(_DsBackupClose, ntdsbclilib, 'DsBackupClose');
824
_DsBackupGetBackupLogsA: Pointer;
826
function DsBackupGetBackupLogsA;
828
GetProcedureAddress(_DsBackupGetBackupLogsA, ntdsbclilib, 'DsBackupGetBackupLogsA');
832
JMP [_DsBackupGetBackupLogsA]
837
_DsBackupGetBackupLogsW: Pointer;
839
function DsBackupGetBackupLogsW;
841
GetProcedureAddress(_DsBackupGetBackupLogsW, ntdsbclilib, 'DsBackupGetBackupLogsW');
845
JMP [_DsBackupGetBackupLogsW]
850
_DsBackupGetBackupLogs: Pointer;
852
function DsBackupGetBackupLogs;
854
GetProcedureAddress(_DsBackupGetBackupLogs, ntdsbclilib, 'DsBackupGetBackupLogs' + AWSuffix);
858
JMP [_DsBackupGetBackupLogs]
863
_DsBackupTruncateLogs: Pointer;
865
function DsBackupTruncateLogs;
867
GetProcedureAddress(_DsBackupTruncateLogs, ntdsbclilib, 'DsBackupTruncateLogs');
871
JMP [_DsBackupTruncateLogs]
876
_DsBackupEnd: Pointer;
878
function DsBackupEnd;
880
GetProcedureAddress(_DsBackupEnd, ntdsbclilib, 'DsBackupEnd');
889
_DsBackupFree: Pointer;
891
procedure DsBackupFree;
893
GetProcedureAddress(_DsBackupFree, ntdsbclilib, 'DsBackupFree');
902
_DsRestoreGetDatabaseLocationsA: Pointer;
904
function DsRestoreGetDatabaseLocationsA;
906
GetProcedureAddress(_DsRestoreGetDatabaseLocationsA, ntdsbclilib, 'DsRestoreGetDatabaseLocationsA');
910
JMP [_DsRestoreGetDatabaseLocationsA]
915
_DsRestoreGetDatabaseLocationsW: Pointer;
917
function DsRestoreGetDatabaseLocationsW;
919
GetProcedureAddress(_DsRestoreGetDatabaseLocationsW, ntdsbclilib, 'DsRestoreGetDatabaseLocationsW');
923
JMP [_DsRestoreGetDatabaseLocationsW]
928
_DsRestoreGetDatabaseLocations: Pointer;
930
function DsRestoreGetDatabaseLocations;
932
GetProcedureAddress(_DsRestoreGetDatabaseLocations, ntdsbclilib, 'DsRestoreGetDatabaseLocations' + AWSuffix);
936
JMP [_DsRestoreGetDatabaseLocations]
941
_DsRestorePrepareA: Pointer;
943
function DsRestorePrepareA;
945
GetProcedureAddress(_DsRestorePrepareA, ntdsbclilib, 'DsRestorePrepareA');
949
JMP [_DsRestorePrepareA]
954
_DsRestorePrepareW: Pointer;
956
function DsRestorePrepareW;
958
GetProcedureAddress(_DsRestorePrepareW, ntdsbclilib, 'DsRestorePrepareW');
962
JMP [_DsRestorePrepareW]
967
_DsRestorePrepare: Pointer;
969
function DsRestorePrepare;
971
GetProcedureAddress(_DsRestorePrepare, ntdsbclilib, 'DsRestorePrepare' + AWSuffix);
975
JMP [_DsRestorePrepare]
980
_DsRestoreRegisterA: Pointer;
982
function DsRestoreRegisterA;
984
GetProcedureAddress(_DsRestoreRegisterA, ntdsbclilib, 'DsRestoreRegisterA');
988
JMP [_DsRestoreRegisterA]
993
_DsRestoreRegisterW: Pointer;
995
function DsRestoreRegisterW;
997
GetProcedureAddress(_DsRestoreRegisterW, ntdsbclilib, 'DsRestoreRegisterW');
1001
JMP [_DsRestoreRegisterW]
1006
_DsRestoreRegister: Pointer;
1008
function DsRestoreRegister;
1010
GetProcedureAddress(_DsRestoreRegister, ntdsbclilib, 'DsRestoreRegister' + AWSuffix);
1014
JMP [_DsRestoreRegister]
1019
_DsRestoreRegisterComplete: Pointer;
1021
function DsRestoreRegisterComplete;
1023
GetProcedureAddress(_DsRestoreRegisterComplete, ntdsbclilib, 'DsRestoreRegisterComplete');
1027
JMP [_DsRestoreRegisterComplete]
1032
_DsRestoreEnd: Pointer;
1034
function DsRestoreEnd;
1036
GetProcedureAddress(_DsRestoreEnd, ntdsbclilib, 'DsRestoreEnd');
1045
_DsSetCurrentBackupLogA: Pointer;
1047
function DsSetCurrentBackupLogA;
1049
GetProcedureAddress(_DsSetCurrentBackupLogA, ntdsbclilib, 'DsSetCurrentBackupLogA');
1053
JMP [_DsSetCurrentBackupLogA]
1058
_DsSetCurrentBackupLogW: Pointer;
1060
function DsSetCurrentBackupLogW;
1062
GetProcedureAddress(_DsSetCurrentBackupLogW, ntdsbclilib, 'DsSetCurrentBackupLogW');
1066
JMP [_DsSetCurrentBackupLogW]
1071
_DsSetCurrentBackupLog: Pointer;
1073
function DsSetCurrentBackupLog;
1075
GetProcedureAddress(_DsSetCurrentBackupLog, ntdsbclilib, 'DsSetCurrentBackupLog' + AWSuffix);
1079
JMP [_DsSetCurrentBackupLog]
1084
_DsSetAuthIdentityA: Pointer;
1086
function DsSetAuthIdentityA;
1088
GetProcedureAddress(_DsSetAuthIdentityA, ntdsbclilib, 'DsSetAuthIdentityA');
1092
JMP [_DsSetAuthIdentityA]
1097
_DsSetAuthIdentityW: Pointer;
1099
function DsSetAuthIdentityW;
1101
GetProcedureAddress(_DsSetAuthIdentityW, ntdsbclilib, 'DsSetAuthIdentityW');
1105
JMP [_DsSetAuthIdentityW]
1110
_DsSetAuthIdentity: Pointer;
1112
function DsSetAuthIdentity;
1114
GetProcedureAddress(_DsSetAuthIdentity, ntdsbclilib, 'DsSetAuthIdentity' + AWSuffix);
1118
JMP [_DsSetAuthIdentity]
1124
function DsIsNTDSOnlineA; external ntdsbclilib name 'DsIsNTDSOnlineA';
1125
function DsIsNTDSOnlineW; external ntdsbclilib name 'DsIsNTDSOnlineW';
1126
function DsIsNTDSOnline; external ntdsbclilib name 'DsIsNTDSOnline' + AWSuffix;
1127
function DsBackupPrepareA; external ntdsbclilib name 'DsBackupPrepareA';
1128
function DsBackupPrepareW; external ntdsbclilib name 'DsBackupPrepareW';
1129
function DsBackupPrepare; external ntdsbclilib name 'DsBackupPrepare' + AWSuffix;
1130
function DsBackupGetDatabaseNamesA; external ntdsbclilib name 'DsBackupGetDatabaseNamesA';
1131
function DsBackupGetDatabaseNamesW; external ntdsbclilib name 'DsBackupGetDatabaseNamesW';
1132
function DsBackupGetDatabaseNames; external ntdsbclilib name 'DsBackupGetDatabaseNames' + AWSuffix;
1133
function DsBackupOpenFileA; external ntdsbclilib name 'DsBackupOpenFileA';
1134
function DsBackupOpenFileW; external ntdsbclilib name 'DsBackupOpenFileW';
1135
function DsBackupOpenFile; external ntdsbclilib name 'DsBackupOpenFile' + AWSuffix;
1136
function DsBackupRead; external ntdsbclilib name 'DsBackupRead';
1137
function DsBackupClose; external ntdsbclilib name 'DsBackupClose';
1138
function DsBackupGetBackupLogsA; external ntdsbclilib name 'DsBackupGetBackupLogsA';
1139
function DsBackupGetBackupLogsW; external ntdsbclilib name 'DsBackupGetBackupLogsW';
1140
function DsBackupGetBackupLogs; external ntdsbclilib name 'DsBackupGetBackupLogs' + AWSuffix;
1141
function DsBackupTruncateLogs; external ntdsbclilib name 'DsBackupTruncateLogs';
1142
function DsBackupEnd; external ntdsbclilib name 'DsBackupEnd';
1143
procedure DsBackupFree; external ntdsbclilib name 'DsBackupFree';
1144
function DsRestoreGetDatabaseLocationsA; external ntdsbclilib name 'DsRestoreGetDatabaseLocationsA';
1145
function DsRestoreGetDatabaseLocationsW; external ntdsbclilib name 'DsRestoreGetDatabaseLocationsW';
1146
function DsRestoreGetDatabaseLocations; external ntdsbclilib name 'DsRestoreGetDatabaseLocations' + AWSuffix;
1147
function DsRestorePrepareA; external ntdsbclilib name 'DsRestorePrepareA';
1148
function DsRestorePrepareW; external ntdsbclilib name 'DsRestorePrepareW';
1149
function DsRestorePrepare; external ntdsbclilib name 'DsRestorePrepare' + AWSuffix;
1150
function DsRestoreRegisterA; external ntdsbclilib name 'DsRestoreRegisterA';
1151
function DsRestoreRegisterW; external ntdsbclilib name 'DsRestoreRegisterW';
1152
function DsRestoreRegister; external ntdsbclilib name 'DsRestoreRegister' + AWSuffix;
1153
function DsRestoreRegisterComplete; external ntdsbclilib name 'DsRestoreRegisterComplete';
1154
function DsRestoreEnd; external ntdsbclilib name 'DsRestoreEnd';
1155
function DsSetCurrentBackupLogA; external ntdsbclilib name 'DsSetCurrentBackupLogA';
1156
function DsSetCurrentBackupLogW; external ntdsbclilib name 'DsSetCurrentBackupLogW';
1157
function DsSetCurrentBackupLog; external ntdsbclilib name 'DsSetCurrentBackupLog' + AWSuffix;
1158
function DsSetAuthIdentityA; external ntdsbclilib name 'DsSetAuthIdentityA';
1159
function DsSetAuthIdentityW; external ntdsbclilib name 'DsSetAuthIdentityW';
1160
function DsSetAuthIdentity; external ntdsbclilib name 'DsSetAuthIdentity' + AWSuffix;
1162
{$ENDIF DYNAMIC_LINK}