📄 ntdsbcli.h
字号:
the currently opened attachement.
Arguments:
[in] hbc - backup context handle
Return Value:
One of the standard HRESULT success codes;
Failure code otherwise.
**************************************************************************************/
HRESULT
NTDSBCLI_API
DsBackupClose(
HBC hbc
);
/*************************************************************************************
Routine Description:
DsBackupGetBackupLogs
Gives the list of log files that need to be backed up for the given
backup context
Arguments:
[in] hbc - backup context handle
[out] pszBackupLogFiles - pointer that will receive the pointer to the list of
log files; allocated memory should be freed using DsBackupFree() API by the
caller when it is no longer needed; Log files are returned in an array of
null-terminated filenames and and the list is terminated by two-nulls.
[out] pcbSize - will receive the number of bytes returned
Return Value:
One of the standard HRESULT success codes;
Failure code otherwise.
**************************************************************************************/
HRESULT
NTDSBCLI_API
DsBackupGetBackupLogsA(
HBC hbc,
LPSTR *pszBackupLogFiles,
LPDWORD pcbSize
);
HRESULT
NTDSBCLI_API
DsBackupGetBackupLogsW(
HBC hbc,
LPWSTR *pszBackupLogFiles,
LPDWORD pcbSize
);
/*************************************************************************************
Routine Description:
DsBackupTruncateLogs
Called to truncate the already read backup logs.
Arguments:
[in] hbc - backup context handle
Return Value:
One of the standard HRESULT success codes;
Failure code otherwise.
**************************************************************************************/
HRESULT
NTDSBCLI_API
DsBackupTruncateLogs(
HBC hbc
);
/*************************************************************************************
Routine Description:
DsBackupEnd
Called to end the current backup session.
Arguments:
[in] hbc - backup context handle of the backup session
Return Value:
One of the standard HRESULT success codes;
Failure code otherwise.
**************************************************************************************/
HRESULT
NTDSBCLI_API
DsBackupEnd(
HBC hbc
);
/*************************************************************************************
Routine Description:
DsBackupFree
Should be used by the application to free any buffer allocated by the
NTDSBCLI dll.
Arguments:
[in] pvBuffer - pointer to the buffer that is to be freed.
Return Value:
None.
**************************************************************************************/
VOID
NTDSBCLI_API
DsBackupFree(
PVOID pvBuffer
);
/*************************************************************************************
Routine Description:
DsRestoreGetDatabaseLocations
Called both at backup time as well at restoration time to get the data base
locations for different types of files.
Arguments:
[in] hbc - backup context handle which would have been obtained through
DsBackupPrepare() in the backup case and through DsRestorePrepare()
in the restore case.
[out] pszDatabaseLocationList - pointer that will receive the pointer to the list of
database locations; allocated memory should be freed using DsBackupFree() API by the
caller when it is no longer needed; locations are returned in an array of
null-terminated names and and the list is terminated by two-nulls.
The first character of each name is the BFT character that indicates the type
of the file and the rest of the name tells gives the path into which that
particular type of file should be restored.
[out] pcbSize - will receive the number of bytes returned
Return Value:
One of the standard HRESULT success codes;
Failure code otherwise.
**************************************************************************************/
HRESULT
NTDSBCLI_API
DsRestoreGetDatabaseLocationsA(
HBC hbc,
LPSTR *pszDatabaseLocationList,
LPDWORD pcbSize
);
HRESULT
NTDSBCLI_API
DsRestoreGetDatabaseLocationsW(
HBC hbc,
LPWSTR *pszDatabaseLocationList,
LPDWORD pcbSize
);
/*************************************************************************************
Routine Description:
DsRestorePrepare
Called to indicate beginning of a restore session.
Arguments:
[in] szServerName - UNC name of the server into which the restore operation is
going to be performed.
[in] rtFlag - Or'ed combination of RESTORE_TYPE_* flags; 0 if no special flags
are to be specified
[in] pvExpiryToken - pointer to the expiry token associated with this
backup. The client would have received this when they backed up the DS.
[in] cbExpiryTokenSize - size of the expiry token.
[out] phbc - pointer to receive the backup context handle which is to be passed
to the subsequent restore APIs
Return Value:
One of the standard HRESULT success codes;
Failure code otherwise.
**************************************************************************************/
HRESULT
NTDSBCLI_API
DsRestorePrepareA(
LPCSTR szServerName,
ULONG rtFlag,
PVOID pvExpiryToken,
DWORD cbExpiryTokenSize,
HBC *phbc
);
HRESULT
NTDSBCLI_API
DsRestorePrepareW(
LPCWSTR szServerName,
ULONG rtFlag,
PVOID pvExpiryToken,
DWORD cbExpiryTokenSize,
HBC *phbc
);
/*************************************************************************************
Routine Description:
DsRestoreRegister
This will register a restore operation. It will interlock all sbsequent restore
operations, and will prevent the restore target from starting until the call
to DsRestoreRegisterComplete() is made.
Arguments:
[in] hbc - backup context handle for the restore session.
[in] szCheckPointFilePath - path where the check point files are restored
[in] szLogPath - path where the log files are restored
[in] rgrstmap - restore map
[in] crstmap - tells if ther is a new restore map
[in] szBackupLogPath - path where the backup logs are located
[in] genLow - Lowest log# that was restored in this restore session
[in] genHigh - Highest log# that was restored in this restore session
Return Value:
One of the standard HRESULT success codes;
Failure code otherwise.
**************************************************************************************/
HRESULT
NTDSBCLI_API
DsRestoreRegisterA(
HBC hbc,
LPCSTR szCheckPointFilePath,
LPCSTR szLogPath,
EDB_RSTMAPA rgrstmap[],
LONG crstmap,
LPCSTR szBackupLogPath,
ULONG genLow,
ULONG genHigh
);
HRESULT
NTDSBCLI_API
DsRestoreRegisterW(
HBC hbc,
LPCWSTR szCheckPointFilePath,
LPCWSTR szLogPath,
EDB_RSTMAPW rgrstmap[],
LONG crstmap,
LPCWSTR szBackupLogPath,
ULONG genLow,
ULONG genHigh
);
/*************************************************************************************
Routine Description:
DsRestoreRegisterComplete
Called to indicate that a previously registered restore is complete.
Arguments:
[in] hbc - backup context handle
[in] hrRestoreState - success code if the restore was successful
Return Value:
One of the standard HRESULT success codes;
Failure code otherwise.
**************************************************************************************/
HRESULT
NTDSBCLI_API
DsRestoreRegisterComplete(
HBC hbc,
HRESULT hrRestoreState
);
/*************************************************************************************
Routine Description:
DsRestoreEnd
Called to end a restore session
Arguments:
[in] hbc - backup context handle
Return Value:
One of the standard HRESULT success codes;
Failure code otherwise.
**************************************************************************************/
HRESULT
NTDSBCLI_API
DsRestoreEnd(
HBC hbc
);
/*************************************************************************************
Routine Description:
DsSetCurrentBackupLog
Called to set the current backup log number after a successful restore
Arguments:
[in] szServerName - UNC name of the server for which the current backup log has
to be set
[in] dwCurrentLog - current log number
Return Value:
One of the standard HRESULT success codes;
Failure code otherwise.
**************************************************************************************/
HRESULT
NTDSBCLI_API
DsSetCurrentBackupLogA(
LPCSTR szServerName,
DWORD dwCurrentLog
);
HRESULT
NTDSBCLI_API
DsSetCurrentBackupLogW(
LPCWSTR szServerName,
DWORD dwCurrentLog
);
/*************************************************************************************
Routine Description:
DsSetAuthIdentity
Used to set the security context under which the client APIs are to be
called. If this function is not called, security context of the current
process is assumed.
Arguments:
[in] szUserName - name of the user
[in] szDomainName - name of the domain the user belongs to
[in] szPassword - password of the user in the specified domain
Return Value:
One of the standard HRESULT success codes;
Failure code otherwise.
**************************************************************************************/
HRESULT
NTDSBCLI_API
DsSetAuthIdentityA(
LPCSTR szUserName,
LPCSTR szDomainName,
LPCSTR szPassword
);
HRESULT
NTDSBCLI_API
DsSetAuthIdentityW(
LPCWSTR szUserName,
LPCWSTR szDomainName,
LPCWSTR szPassword
);
#ifdef __cplusplus
}
#endif
#pragma option pop /*P_O_Pop*/
#endif // _NTDSBCLI_H_
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -