⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ntdsbcli.pas

📁 详细Windows API大全有关知识以及相关问题
💻 PAS
📖 第 1 页 / 共 3 页
字号:
  var ppvExpiryToken: PVOID; var pcbExpiryTokenSize: DWORD; var phbc: HBC): HRESULT; stdcall;
{$EXTERNALSYM DsBackupPrepare}
{$ELSE}
function DsBackupPrepare(szBackupServer: LPCSTR; grbit: ULONG; btFlag: ULONG;
  var ppvExpiryToken: PVOID; var pcbExpiryTokenSize: DWORD; var phbc: HBC): HRESULT; stdcall;
{$EXTERNALSYM DsBackupPrepare}
{$ENDIF}

{*************************************************************************************
Routine Description:

      DsBackupGetDatabaseNames
        Gives the list of data bases that need to be backed up for the given
        backup context

  Arguments:
    [in]    hbc - backup context handle
    [out]   pszAttachmentInfo - pointer that will receive the pointer to the attachment
                info; allocated memory should be freed using DsBackupFree() API by the
                caller when it is no longer needed; Attachment info is 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.
**************************************************************************************}

function DsBackupGetDatabaseNamesA(hbc: HBC; var pszAttachmentInfo: LPSTR;
  var pcbSize: DWORD): HRESULT; stdcall;
{$EXTERNALSYM DsBackupGetDatabaseNamesA}
function DsBackupGetDatabaseNamesW(hbc: HBC; var pszAttachmentInfo: LPWSTR;
  var pcbSize: DWORD): HRESULT; stdcall;
{$EXTERNALSYM DsBackupGetDatabaseNamesW}

{$IFDEF UNICODE}
function DsBackupGetDatabaseNames(hbc: HBC; var pszAttachmentInfo: LPWSTR;
  var pcbSize: DWORD): HRESULT; stdcall;
{$EXTERNALSYM DsBackupGetDatabaseNames}
{$ELSE}
function DsBackupGetDatabaseNames(hbc: HBC; var pszAttachmentInfo: LPSTR;
  var pcbSize: DWORD): HRESULT; stdcall;
{$EXTERNALSYM DsBackupGetDatabaseNames}
{$ENDIF}

{*************************************************************************************
Routine Description:

      DsBackupOpenFile
        Opens the given attachment for read.

  Arguments:
    [in]    hbc - backup context handle
    [in]    szAttachmentName - name of the attachment to be opened for read
    [in]    cbReadHintSize - suggested size in bytes that might be used during the
                subsequent reads on this attachement
    [out]   pliFileSize - pointer to a large integer that would receive the size in
                bytes of the given attachment
Return Value:

    One of the standard HRESULT success codes;
    Failure code otherwise.
**************************************************************************************}

function DsBackupOpenFileA(hbc: HBC; szAttachmentName: LPCSTR; cbReadHintSize: DWORD;
  var pliFileSize: LARGE_INTEGER): HRESULT; stdcall;
{$EXTERNALSYM DsBackupOpenFileA}
function DsBackupOpenFileW(hbc: HBC; szAttachmentName: LPCWSTR; cbReadHintSize: DWORD;
  var pliFileSize: LARGE_INTEGER): HRESULT; stdcall;
{$EXTERNALSYM DsBackupOpenFileW}

{$IFDEF UNICODE}
function DsBackupOpenFile(hbc: HBC; szAttachmentName: LPCWSTR; cbReadHintSize: DWORD;
  var pliFileSize: LARGE_INTEGER): HRESULT; stdcall;
{$EXTERNALSYM DsBackupOpenFile}
{$ELSE}
function DsBackupOpenFile(hbc: HBC; szAttachmentName: LPCSTR; cbReadHintSize: DWORD;
  var pliFileSize: LARGE_INTEGER): HRESULT; stdcall;
{$EXTERNALSYM DsBackupOpenFile}
{$ENDIF}

{*************************************************************************************
Routine Description:

      DsBackupRead
        Reads the currently open attachment bytes into the given buffer. The client
        application is expected to call this function repeatedly until it gets the
        entire file (the application would have received the file size through the
        DsBackupOpenFile() call before.

  Arguments:
    [in]    hbc - backup context handle
    [in]    pvBuffer - pointer to the buffer that would receive the read data.
    [in]    cbBuffer - specifies the size of the above buffer
    [out]   pcbRead - pointer to receive the actual number of bytes read.
Return Value:

    One of the standard HRESULT success codes;
    Failure code otherwise.
**************************************************************************************}

function DsBackupRead(hbc: HBC; pvBuffer: PVOID; cbBuffer: DWORD; var pcbRead: DWORD): HRESULT; stdcall;
{$EXTERNALSYM DsBackupRead}

{*************************************************************************************
Routine Description:

      DsBackupClose
        To be called by the application after it completes reading all the data in
        the currently opened attachement.

  Arguments:
    [in]    hbc - backup context handle
Return Value:

    One of the standard HRESULT success codes;
    Failure code otherwise.
**************************************************************************************}

function DsBackupClose(hbc: HBC): HRESULT; stdcall;
{$EXTERNALSYM DsBackupClose}

{*************************************************************************************
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.
**************************************************************************************}

function DsBackupGetBackupLogsA(hbc: HBC; var pszBackupLogFiles: LPSTR;
  var pcbSize: DWORD): HRESULT; stdcall;
{$EXTERNALSYM DsBackupGetBackupLogsA}
function DsBackupGetBackupLogsW(hbc: HBC; var pszBackupLogFiles: LPWSTR;
  var pcbSize: DWORD): HRESULT; stdcall;
{$EXTERNALSYM DsBackupGetBackupLogsW}

{$IFDEF UNICODE}
function DsBackupGetBackupLogs(hbc: HBC; var pszBackupLogFiles: LPWSTR;
  var pcbSize: DWORD): HRESULT; stdcall;
{$EXTERNALSYM DsBackupGetBackupLogs}
{$ELSE}
function DsBackupGetBackupLogs(hbc: HBC; var pszBackupLogFiles: LPSTR;
  var pcbSize: DWORD): HRESULT; stdcall;
{$EXTERNALSYM DsBackupGetBackupLogs}
{$ENDIF}

{*************************************************************************************
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.
**************************************************************************************}

function DsBackupTruncateLogs(hbc: HBC): HRESULT; stdcall;
{$EXTERNALSYM DsBackupTruncateLogs}

{*************************************************************************************
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.
**************************************************************************************}

function DsBackupEnd(hbc: HBC): HRESULT; stdcall;
{$EXTERNALSYM DsBackupEnd}

{*************************************************************************************
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.
**************************************************************************************}

procedure DsBackupFree(pvBuffer: PVOID); stdcall;
{$EXTERNALSYM DsBackupFree}

{*************************************************************************************
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.
**************************************************************************************}

function DsRestoreGetDatabaseLocationsA(hbc: HBC; var pszDatabaseLocationList: LPSTR;
  var pcbSize: DWORD): HRESULT; stdcall;
{$EXTERNALSYM DsRestoreGetDatabaseLocationsA}
function DsRestoreGetDatabaseLocationsW(hbc: HBC; var pszDatabaseLocationList: LPWSTR;
  var pcbSize: DWORD): HRESULT; stdcall;
{$EXTERNALSYM DsRestoreGetDatabaseLocationsW}

{$IFDEF UNICODE}
function DsRestoreGetDatabaseLocations(hbc: HBC; var pszDatabaseLocationList: LPWSTR;
  var pcbSize: DWORD): HRESULT; stdcall;
{$EXTERNALSYM DsRestoreGetDatabaseLocations}
{$ELSE}
function DsRestoreGetDatabaseLocations(hbc: HBC; var pszDatabaseLocationList: LPSTR;
  var pcbSize: DWORD): HRESULT; stdcall;
{$EXTERNALSYM DsRestoreGetDatabaseLocations}
{$ENDIF}

{*************************************************************************************
Routine Description:

      DsRestorePrepare
        Called to indicate beginning of a restore session.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -