home *** CD-ROM | disk | FTP | other *** search
/ CD Actual Thematic 25: Programming / pc_actual_25.iso / C_C++ / BorlandCompiler / freecommandLinetools.exe / Include / ntdsbcli.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-06-27  |  22.3 KB  |  727 lines

  1. /*++ BUILD Version: 0001    // Increment this if a change has global effects
  2.  
  3. Copyright (c) 1997-1999 Microsoft Corporation
  4.  
  5. Module Name:
  6.  
  7.     ntdsbcli.h
  8.  
  9. Abstract:
  10.  
  11.     This header contains the interface definition for the NT Directory Service
  12.     Backup Client APIs.
  13.  
  14. Environment:
  15.  
  16.       User Mode - Win32
  17.  
  18. Notes:
  19.  
  20. --*/
  21.  
  22. #ifndef _NTDSBCLI_H_
  23. #pragma option push -b -a8 -pc -A- /*P_O_Push*/
  24. #define _NTDSBCLI_H_
  25.  
  26. #if _MSC_VER > 1000
  27. #pragma once
  28. #endif
  29.  
  30. #ifdef __cplusplus
  31. extern "C" {
  32. #endif
  33.  
  34. #ifdef    MIDL_PASS
  35. #define    xRPC_STRING [string]
  36. #else
  37. #define    xRPC_STRING
  38. typedef unsigned short WCHAR;
  39. #endif
  40.  
  41. #ifndef _NTDSBCLI_DEFINED
  42. #define NTDSBCLI_API __declspec(dllimport) _stdcall
  43. #else
  44. #define NTDSBCLI_API
  45. #endif
  46.  
  47. // HRESULT should be defined if the user included ntdef.h or winnt.h or wtypes.h
  48. // Define it anyways just in case it is not defined yet
  49. #ifndef _HRESULT_DEFINED
  50. #define _HRESULT_DEFINED
  51.     typedef LONG HRESULT;
  52. #endif // _HRESULT_DEFINED
  53.  
  54. #define g_wszBackupAnnotation  L"NTDS Backup Interface"
  55. #define g_aszBackupAnnotation   "NTDS Backup Interface"
  56.  
  57. #define g_wszRestoreAnnotation L"NTDS Restore Interface"
  58. #define g_aszRestoreAnnotation  "NTDS Restore Interface"
  59.  
  60. #ifdef UNICODE
  61. #define g_szBackupAnnotation  g_wszBackupAnnotation
  62. #define g_szRestoreAnnotation g_wszRestoreAnnotation
  63. #else
  64. #define g_szBackupAnnotation  g_aszBackupAnnotation
  65. #define g_szRestoreAnnotation g_aszRestoreAnnotation
  66. #endif // UNICODE
  67.  
  68. // Type of Backup passed to DsBackupPrepare()
  69. // BACKUP_TYPE_FULL: Requesting backup of the complete DS (DIT, Log files, and Patch files)
  70. // BACKUP_TYPE_LOGS_ONLY: Requesting backup of only the log files
  71. // BACKUP_TYPE_INCREMENTAL: Requesting incremental backup i.e. backing up only changes that happened since last backup
  72. #define    BACKUP_TYPE_FULL            0x01
  73. #define    BACKUP_TYPE_LOGS_ONLY        0x02
  74. #define BACKUP_TYPE_INCREMENTAL     0x04        // not supported in product1
  75.  
  76. // Type of Restore passed to DsRestorePrepare()
  77. // RESTORE_TYPE_AUTHORATATIVE: The restored version wins throughout the enterprise
  78. // RESTORE_TYPE_ONLINE: Restoration is done when NTDS is online.
  79. // RESTORE_TYPE_CATCHUP: The restored version is reconciled through the standard reconciliation logic so that the
  80. //                          restored DIT can catchup with the rest of the enterprise.
  81. #define RESTORE_TYPE_AUTHORATATIVE  0x01
  82. #define RESTORE_TYPE_ONLINE         0x02        // not supported in product1
  83. #define RESTORE_TYPE_CATCHUP        0x04        // this is the default restore mode
  84.  
  85. // Setting the current log # to this value would disable incremental/differential backup
  86. #define BACKUP_DISABLE_INCREMENTAL  0xffffffff
  87.  
  88. // BFT is the bit flag used to represent file types (directory/dit/logfile/etc.)
  89. // We keep them as a character so that we can append/prepend them to the actual file
  90. // path. The code in the Backup API's rely on the fact that values 0-256 in 8 bit ascii
  91. // map to the values 0-256 in unicode.
  92. #ifdef UNICODE
  93.     typedef WCHAR BFT;
  94. #else
  95.     typedef CHAR BFT;
  96. #endif
  97.  
  98. // Bit flags:
  99. //  BFT_DIRECTORY               - indicates path specified is a directory
  100. //  BFT_DATABASE_DIRECTORY      - indicates that file goes into database directory
  101. //  BFT_LOG_DIRECTORY           - indicates that the file goes into log directory
  102. #define    BFT_DIRECTORY                0x80
  103. #define BFT_DATABASE_DIRECTORY        0x40
  104. #define    BFT_LOG_DIRECTORY            0x20
  105.  
  106. // Following combinations are defined for easy use of the filetype and the directory into
  107. // into which it goes
  108. #define    BFT_LOG                        (BFT)(TEXT('\x01') | BFT_LOG_DIRECTORY)
  109. #define    BFT_LOG_DIR                    (BFT)(TEXT('\x02') | BFT_DIRECTORY)
  110. #define    BFT_CHECKPOINT_DIR            (BFT)(TEXT('\x03') | BFT_DIRECTORY)
  111. #define    BFT_NTDS_DATABASE            (BFT)(TEXT('\x04') | BFT_DATABASE_DIRECTORY)
  112. #define    BFT_PATCH_FILE                (BFT)(TEXT('\x05') | BFT_LOG_DIRECTORY)
  113. #define    BFT_UNKNOWN                    (BFT)(TEXT('\x0f'))
  114.  
  115. #include <ntdsbmsg.h>
  116.  
  117. // Backup Context Handle
  118. typedef void    *HBC;
  119.  
  120. typedef struct tagEDB_RSTMAPA
  121. {
  122.     xRPC_STRING char        *szDatabaseName;
  123.     xRPC_STRING char        *szNewDatabaseName;
  124. } EDB_RSTMAPA, *PEDB_RSTMAPA;            /* restore map */
  125.  
  126. //    required for NTDS unicode support.
  127. //    UNDONE: NYI
  128. #define    UNICODE_RSTMAP
  129.  
  130. typedef struct tagEDB_RSTMAPW {
  131.     xRPC_STRING WCHAR *wszDatabaseName;
  132.     xRPC_STRING WCHAR *wszNewDatabaseName;
  133. } EDB_RSTMAPW, *PEDB_RSTMAPW;
  134.  
  135. #ifdef UNICODE
  136. #define EDB_RSTMAP EDB_RSTMAPW
  137. #define PEDB_RSTMAP PEDB_RSTMAPW
  138. #else
  139. #define EDB_RSTMAP EDB_RSTMAPA
  140. #define PEDB_RSTMAP PEDB_RSTMAPA
  141. #endif
  142.  
  143. // For all the functions in this interface that have atleast one string
  144. // parameter provide macros to invoke the appropriate version of the
  145. // corresponding function.
  146. #ifdef UNICODE
  147.  
  148. #define DsIsNTDSOnline                      DsIsNTDSOnlineW
  149. #define DsBackupPrepare                     DsBackupPrepareW
  150. #define DsBackupGetDatabaseNames            DsBackupGetDatabaseNamesW
  151. #define DsBackupOpenFile                    DsBackupOpenFileW
  152. #define DsBackupGetBackupLogs               DsBackupGetBackupLogsW
  153. #define DsRestoreGetDatabaseLocations       DsRestoreGetDatabaseLocationsW
  154. #define DsRestorePrepare                    DsRestorePrepareW
  155. #define DsRestoreRegister                   DsRestoreRegisterW
  156. #define DsSetCurrentBackupLog               DsSetCurrentBackupLogW
  157. #define DsSetAuthIdentity                   DsSetAuthIdentityW
  158.  
  159. #else
  160.  
  161. #define DsIsNTDSOnline                      DsIsNTDSOnlineA
  162. #define DsBackupPrepare                     DsBackupPrepareA
  163. #define DsBackupGetDatabaseNames            DsBackupGetDatabaseNamesA
  164. #define DsBackupOpenFile                    DsBackupOpenFileA
  165. #define DsBackupGetBackupLogs               DsBackupGetBackupLogsA
  166. #define DsRestoreGetDatabaseLocations       DsRestoreGetDatabaseLocationsA
  167. #define DsRestorePrepare                    DsRestorePrepareA
  168. #define DsRestoreRegister                   DsRestoreRegisterA
  169. #define DsSetCurrentBackupLog               DsSetCurrentBackupLogA
  170. #define DsSetAuthIdentity                   DsSetAuthIdentityA
  171.  
  172. #endif // #ifdef UNICODE
  173.  
  174.  
  175. /*************************************************************************************
  176. Routine Description:
  177.  
  178.       DsIsNTDSOnline
  179.         Checks to see if the NTDS is Online on the given server. This call is
  180.         guaranteed to return quickly.
  181.  
  182.   Arguments:
  183.     [in] szServerName - UNC name of the server to check
  184.     [out] pfNTDSOnline - pointer to receive the bool result (TRUE if NTDS is
  185.                             online; FALSE, otherwise)
  186.  
  187. Return Value:
  188.  
  189.     ERROR_SUCCESS if the call executed successfully;
  190.     Failure code otherwise.
  191. **************************************************************************************/
  192. HRESULT
  193. NTDSBCLI_API
  194. DsIsNTDSOnlineA(
  195.     LPCSTR szServerName,
  196.     BOOL *pfNTDSOnline
  197.     );
  198.  
  199. HRESULT
  200. NTDSBCLI_API
  201. DsIsNTDSOnlineW(
  202.     LPCWSTR szServerName,
  203.     BOOL *pfNTDSOnline
  204.     );
  205.  
  206.  
  207. /*************************************************************************************
  208. Routine Description:
  209.  
  210.       DsBackupPrepare
  211.         Prepares the DS for the online backup and returns a Backup Context Handle
  212.         which should be used in the subsequent calls to other backup functions.
  213.  
  214.   Arguments:
  215.     [in]    szBackupServer - UNC name of the server to be prepared for online backup
  216.     [in]    grbit - flag to be passed to jet while backing up dbs
  217.     [in]    btFlag - BACKUP_TYPE_FULL or BACKUP_TYPE_LOGS_ONLY
  218.     [out]   ppvExpiryToken - pointer that will receive the pointer to the
  219.                 Expiry Token associated with this backup; Client should save
  220.                 this token and send it back through DsRestorePrepare() when
  221.                 attempting a restore; allocated memory should be freed using
  222.                 DsBackupFree() API by the caller when it is no longer needed.
  223.     [out]   pcbExpiryTokenSize - pointer to receive the size of the expiry token
  224.                 returned.
  225.     [out]   phbc - pointer that will receive the backup context handle
  226.  
  227. Return Value:
  228.  
  229.     One of the standard HRESULT success codes;
  230.     Failure code otherwise.
  231. **************************************************************************************/
  232. HRESULT
  233. NTDSBCLI_API
  234. DsBackupPrepareA(
  235.     LPCSTR szBackupServer,
  236.     ULONG grbit,
  237.     ULONG btFlag,
  238.     PVOID *ppvExpiryToken,
  239.     LPDWORD pcbExpiryTokenSize,
  240.     HBC *phbc
  241.     );
  242.  
  243. HRESULT
  244. NTDSBCLI_API
  245. DsBackupPrepareW(
  246.     LPCWSTR szBackupServer,
  247.     ULONG grbit,
  248.     ULONG btFlag,
  249.     PVOID *ppvExpiryToken,
  250.     LPDWORD pcbExpiryTokenSize,
  251.     HBC *phbc
  252.     );
  253.  
  254.  
  255. /*************************************************************************************
  256. Routine Description:
  257.  
  258.       DsBackupGetDatabaseNames
  259.         Gives the list of data bases that need to be backed up for the given
  260.         backup context
  261.  
  262.   Arguments:
  263.     [in]    hbc - backup context handle
  264.     [out]   pszAttachmentInfo - pointer that will receive the pointer to the attachment
  265.                 info; allocated memory should be freed using DsBackupFree() API by the
  266.                 caller when it is no longer needed; Attachment info is an array of
  267.                 null-terminated filenames and and the list is terminated by two-nulls.
  268.     [out]   pcbSize - will receive the number of bytes returned
  269. Return Value:
  270.  
  271.     One of the standard HRESULT success codes;
  272.     Failure code otherwise.
  273. **************************************************************************************/
  274. HRESULT
  275. NTDSBCLI_API
  276. DsBackupGetDatabaseNamesA(
  277.     HBC hbc,
  278.     LPSTR *pszAttachmentInfo,
  279.     LPDWORD pcbSize
  280.     );
  281.  
  282. HRESULT
  283. NTDSBCLI_API
  284. DsBackupGetDatabaseNamesW(
  285.     HBC hbc,
  286.     LPWSTR *pszAttachmentInfo,
  287.     LPDWORD pcbSize
  288.     );
  289.  
  290.  
  291.  
  292. /*************************************************************************************
  293. Routine Description:
  294.  
  295.       DsBackupOpenFile
  296.         Opens the given attachment for read.
  297.  
  298.   Arguments:
  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
  305. Return Value:
  306.  
  307.     One of the standard HRESULT success codes;
  308.     Failure code otherwise.
  309. **************************************************************************************/
  310. HRESULT
  311. NTDSBCLI_API
  312. DsBackupOpenFileA(
  313.     HBC hbc,
  314.     LPCSTR szAttachmentName,
  315.     DWORD cbReadHintSize,
  316.     LARGE_INTEGER *pliFileSize
  317.     );
  318.  
  319. HRESULT
  320. NTDSBCLI_API
  321. DsBackupOpenFileW(
  322.     HBC hbc,
  323.     LPCWSTR szAttachmentName,
  324.     DWORD cbReadHintSize,
  325.     LARGE_INTEGER *pliFileSize
  326.     );
  327.  
  328.  
  329.  
  330. /*************************************************************************************
  331. Routine Description:
  332.  
  333.       DsBackupRead
  334.         Reads the currently open attachment bytes into the given buffer. The client
  335.         application is expected to call this function repeatedly until it gets the
  336.         entire file (the application would have received the file size through the
  337.         DsBackupOpenFile() call before.
  338.  
  339.   Arguments:
  340.     [in]    hbc - backup context handle
  341.     [in]    pvBuffer - pointer to the buffer that would receive the read data.
  342.     [in]    cbBuffer - specifies the size of the above buffer
  343.     [out]   pcbRead - pointer to receive the actual number of bytes read.
  344. Return Value:
  345.  
  346.     One of the standard HRESULT success codes;
  347.     Failure code otherwise.
  348. **************************************************************************************/
  349. HRESULT
  350. NTDSBCLI_API
  351. DsBackupRead(
  352.     HBC hbc,
  353.     PVOID pvBuffer,
  354.     DWORD cbBuffer,
  355.     PDWORD pcbRead
  356.     );
  357.  
  358.  
  359.  
  360. /*************************************************************************************
  361. Routine Description:
  362.  
  363.       DsBackupClose
  364.         To be called by the application after it completes reading all the data in
  365.         the currently opened attachement.
  366.  
  367.   Arguments:
  368.     [in]    hbc - backup context handle
  369. Return Value:
  370.  
  371.     One of the standard HRESULT success codes;
  372.     Failure code otherwise.
  373. **************************************************************************************/
  374. HRESULT
  375. NTDSBCLI_API
  376. DsBackupClose(
  377.     HBC hbc
  378.     );
  379.  
  380.  
  381. /*************************************************************************************
  382. Routine Description:
  383.  
  384.       DsBackupGetBackupLogs
  385.         Gives the list of log files that need to be backed up for the given
  386.         backup context
  387.  
  388.   Arguments:
  389.     [in]    hbc - backup context handle
  390.     [out]   pszBackupLogFiles - pointer that will receive the pointer to the list of
  391.                 log files; allocated memory should be freed using DsBackupFree() API by the
  392.                 caller when it is no longer needed; Log files are returned in an array of
  393.                 null-terminated filenames and and the list is terminated by two-nulls.
  394.     [out]   pcbSize - will receive the number of bytes returned
  395. Return Value:
  396.  
  397.     One of the standard HRESULT success codes;
  398.     Failure code otherwise.
  399. **************************************************************************************/
  400. HRESULT
  401. NTDSBCLI_API
  402. DsBackupGetBackupLogsA(
  403.     HBC hbc,
  404.     LPSTR *pszBackupLogFiles,
  405.     LPDWORD pcbSize
  406.     );
  407.  
  408. HRESULT
  409. NTDSBCLI_API
  410. DsBackupGetBackupLogsW(
  411.     HBC hbc,
  412.     LPWSTR *pszBackupLogFiles,
  413.     LPDWORD pcbSize
  414.     );
  415.  
  416.  
  417. /*************************************************************************************
  418. Routine Description:
  419.  
  420.       DsBackupTruncateLogs
  421.         Called to truncate the already read backup logs.
  422.  
  423.   Arguments:
  424.     [in]    hbc - backup context handle
  425. Return Value:
  426.  
  427.     One of the standard HRESULT success codes;
  428.     Failure code otherwise.
  429. **************************************************************************************/
  430. HRESULT
  431. NTDSBCLI_API
  432. DsBackupTruncateLogs(
  433.     HBC hbc
  434.     );
  435.  
  436.  
  437. /*************************************************************************************
  438. Routine Description:
  439.  
  440.       DsBackupEnd
  441.         Called to end the current backup session.
  442.  
  443.   Arguments:
  444.     [in]    hbc - backup context handle of the backup session
  445. Return Value:
  446.  
  447.     One of the standard HRESULT success codes;
  448.     Failure code otherwise.
  449. **************************************************************************************/
  450. HRESULT
  451. NTDSBCLI_API
  452. DsBackupEnd(
  453.     HBC hbc
  454.     );
  455.  
  456.  
  457. /*************************************************************************************
  458. Routine Description:
  459.  
  460.       DsBackupFree
  461.         Should be used by the application to free any buffer allocated by the
  462.         NTDSBCLI dll.
  463.  
  464.   Arguments:
  465.     [in]    pvBuffer - pointer to the buffer that is to be freed.
  466.  
  467.   Return Value:
  468.     None.
  469. **************************************************************************************/
  470. VOID
  471. NTDSBCLI_API
  472. DsBackupFree(
  473.     PVOID pvBuffer
  474.     );
  475.  
  476.  
  477. /*************************************************************************************
  478. Routine Description:
  479.  
  480.       DsRestoreGetDatabaseLocations
  481.         Called both at backup time as well at restoration time to get the data base
  482.         locations for different types of files.
  483.  
  484.   Arguments:
  485.     [in]    hbc - backup context handle which would have been obtained through
  486.                     DsBackupPrepare() in the backup case and through DsRestorePrepare()
  487.                     in the restore case.
  488.     [out]   pszDatabaseLocationList - pointer that will receive the pointer to the list of
  489.                 database locations; allocated memory should be freed using DsBackupFree() API by the
  490.                 caller when it is no longer needed; locations are returned in an array of
  491.                 null-terminated names and and the list is terminated by two-nulls.
  492.                 The first character of each name is the BFT character that indicates the type
  493.                 of the file and the rest of the name tells gives the path into which that
  494.                 particular type of file should be restored.
  495.     [out]   pcbSize - will receive the number of bytes returned
  496. Return Value:
  497.  
  498.     One of the standard HRESULT success codes;
  499.     Failure code otherwise.
  500. **************************************************************************************/
  501. HRESULT
  502. NTDSBCLI_API
  503. DsRestoreGetDatabaseLocationsA(
  504.     HBC hbc,
  505.     LPSTR *pszDatabaseLocationList,
  506.     LPDWORD pcbSize
  507.     );
  508.  
  509. HRESULT
  510. NTDSBCLI_API
  511. DsRestoreGetDatabaseLocationsW(
  512.     HBC hbc,
  513.     LPWSTR *pszDatabaseLocationList,
  514.     LPDWORD pcbSize
  515.     );
  516.  
  517.  
  518. /*************************************************************************************
  519. Routine Description:
  520.  
  521.       DsRestorePrepare
  522.         Called to indicate beginning of a restore session.
  523.  
  524.   Arguments:
  525.     [in]    szServerName - UNC name of the server into which the restore operation is
  526.                             going to be performed.
  527.     [in]    rtFlag -  Or'ed combination of RESTORE_TYPE_* flags; 0 if no special flags
  528.                             are to be specified
  529.     [in]    pvExpiryToken - pointer to the expiry token associated with this
  530.                             backup. The client would have received this when they backed up the DS.
  531.     [in]    cbExpiryTokenSize - size of the expiry token.
  532.     [out]   phbc - pointer to receive the backup context handle which is to be passed
  533.                             to the subsequent restore APIs
  534.  
  535. Return Value:
  536.  
  537.     One of the standard HRESULT success codes;
  538.     Failure code otherwise.
  539. **************************************************************************************/
  540. HRESULT
  541. NTDSBCLI_API
  542. DsRestorePrepareA(
  543.     LPCSTR szServerName,
  544.     ULONG rtFlag,
  545.     PVOID pvExpiryToken,
  546.     DWORD cbExpiryTokenSize,
  547.     HBC *phbc
  548.     );
  549.  
  550. HRESULT
  551. NTDSBCLI_API
  552. DsRestorePrepareW(
  553.     LPCWSTR szServerName,
  554.     ULONG rtFlag,
  555.     PVOID pvExpiryToken,
  556.     DWORD cbExpiryTokenSize,
  557.     HBC *phbc
  558.     );
  559.  
  560.  
  561. /*************************************************************************************
  562. Routine Description:
  563.  
  564.       DsRestoreRegister
  565.         This will register a restore operation. It will interlock all sbsequent restore
  566.         operations, and will prevent the restore target from starting until the call
  567.         to DsRestoreRegisterComplete() is made.
  568.  
  569.   Arguments:
  570.     [in]    hbc - backup context handle for the restore session.
  571.     [in]    szCheckPointFilePath - path where the check point files are restored
  572.     [in]    szLogPath - path where the log files are restored
  573.     [in]    rgrstmap - restore map
  574.     [in]    crstmap - tells if ther is a new restore map
  575.     [in]    szBackupLogPath - path where the backup logs are located
  576.     [in]    genLow - Lowest log# that was restored in this restore session
  577.     [in]    genHigh - Highest log# that was restored in this restore session
  578.  
  579.   Return Value:
  580.  
  581.     One of the standard HRESULT success codes;
  582.     Failure code otherwise.
  583. **************************************************************************************/
  584. HRESULT
  585. NTDSBCLI_API
  586. DsRestoreRegisterA(
  587.     HBC hbc,
  588.     LPCSTR szCheckPointFilePath,
  589.     LPCSTR szLogPath,
  590.     EDB_RSTMAPA rgrstmap[],
  591.     LONG crstmap,
  592.     LPCSTR szBackupLogPath,
  593.     ULONG genLow,
  594.     ULONG genHigh
  595.     );
  596.  
  597. HRESULT
  598. NTDSBCLI_API
  599. DsRestoreRegisterW(
  600.     HBC hbc,
  601.     LPCWSTR szCheckPointFilePath,
  602.     LPCWSTR szLogPath,
  603.     EDB_RSTMAPW rgrstmap[],
  604.     LONG crstmap,
  605.     LPCWSTR szBackupLogPath,
  606.     ULONG genLow,
  607.     ULONG genHigh
  608.     );
  609.  
  610.  
  611.  
  612. /*************************************************************************************
  613. Routine Description:
  614.  
  615.       DsRestoreRegisterComplete
  616.         Called to indicate that a previously registered restore is complete.
  617.  
  618.   Arguments:
  619.     [in]    hbc - backup context handle
  620.     [in]    hrRestoreState - success code if the restore was successful
  621. Return Value:
  622.  
  623.     One of the standard HRESULT success codes;
  624.     Failure code otherwise.
  625. **************************************************************************************/
  626. HRESULT
  627. NTDSBCLI_API
  628. DsRestoreRegisterComplete(
  629.     HBC hbc,
  630.     HRESULT hrRestoreState
  631.     );
  632.  
  633.  
  634. /*************************************************************************************
  635. Routine Description:
  636.  
  637.       DsRestoreEnd
  638.         Called to end a restore session
  639.  
  640.   Arguments:
  641.     [in]    hbc - backup context handle
  642. Return Value:
  643.  
  644.     One of the standard HRESULT success codes;
  645.     Failure code otherwise.
  646. **************************************************************************************/
  647. HRESULT
  648. NTDSBCLI_API
  649. DsRestoreEnd(
  650.     HBC hbc
  651.     );
  652.  
  653.  
  654. /*************************************************************************************
  655. Routine Description:
  656.  
  657.       DsSetCurrentBackupLog
  658.         Called to set the current backup log number after a successful restore
  659.  
  660.   Arguments:
  661.     [in]    szServerName - UNC name of the server for which the current backup log has
  662.                                 to be set
  663.     [in]    dwCurrentLog -  current log number
  664. Return Value:
  665.  
  666.     One of the standard HRESULT success codes;
  667.     Failure code otherwise.
  668. **************************************************************************************/
  669. HRESULT
  670. NTDSBCLI_API
  671. DsSetCurrentBackupLogA(
  672.     LPCSTR szServerName,
  673.     DWORD dwCurrentLog
  674.     );
  675.  
  676. HRESULT
  677. NTDSBCLI_API
  678. DsSetCurrentBackupLogW(
  679.     LPCWSTR szServerName,
  680.     DWORD dwCurrentLog
  681.     );
  682.  
  683.  
  684. /*************************************************************************************
  685. Routine Description:
  686.  
  687.       DsSetAuthIdentity
  688.         Used to set the security context under which the client APIs are to be
  689.         called. If this function is not called, security context of the current
  690.         process is assumed.
  691.  
  692.   Arguments:
  693.     [in]    szUserName - name of the user
  694.     [in]    szDomainName -  name of the domain the user belongs to
  695.     [in]    szPassword - password of the user in the specified domain
  696.  
  697. Return Value:
  698.  
  699.     One of the standard HRESULT success codes;
  700.     Failure code otherwise.
  701. **************************************************************************************/
  702. HRESULT
  703. NTDSBCLI_API
  704. DsSetAuthIdentityA(
  705.     LPCSTR szUserName,
  706.     LPCSTR szDomainName,
  707.     LPCSTR szPassword
  708.     );
  709.  
  710. HRESULT
  711. NTDSBCLI_API
  712. DsSetAuthIdentityW(
  713.     LPCWSTR szUserName,
  714.     LPCWSTR szDomainName,
  715.     LPCWSTR szPassword
  716.     );
  717.  
  718.  
  719.  
  720. #ifdef __cplusplus
  721. }
  722. #endif
  723.  
  724. #pragma option pop /*P_O_Pop*/
  725. #endif // _NTDSBCLI_H_
  726.  
  727.