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

📄 ntdsbcli.pas

📁 详细Windows API大全有关知识以及相关问题
💻 PAS
📖 第 1 页 / 共 3 页
字号:
  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.
**************************************************************************************}

function DsRestorePrepareA(szServerName: LPCSTR; rtFlag: ULONG; pvExpiryToken: PVOID;
  cbExpiryTokenSize: DWORD; var phbc: HBC): HRESULT; stdcall;
{$EXTERNALSYM DsRestorePrepareA}
function DsRestorePrepareW(szServerName: LPCWSTR; rtFlag: ULONG; pvExpiryToken: PVOID;
  cbExpiryTokenSize: DWORD; var phbc: HBC): HRESULT; stdcall;
{$EXTERNALSYM DsRestorePrepareW}

{$IFDEF UNICODE}
function DsRestorePrepare(szServerName: LPCWSTR; rtFlag: ULONG; pvExpiryToken: PVOID;
  cbExpiryTokenSize: DWORD; var phbc: HBC): HRESULT; stdcall;
{$EXTERNALSYM DsRestorePrepare}
{$ELSE}
function DsRestorePrepare(szServerName: LPCSTR; rtFlag: ULONG; pvExpiryToken: PVOID;
  cbExpiryTokenSize: DWORD; var phbc: HBC): HRESULT; stdcall;
{$EXTERNALSYM DsRestorePrepare}
{$ENDIF}

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

function DsRestoreRegisterA(hbc: HBC; szCheckPointFilePath, szLogPath: LPCSTR;
  rgrstmap: PEDB_RSTMAPA; crstmap: LONG; szBackupLogPath: LPCSTR; genLow, genHigh: ULONG): HRESULT; stdcall;
{$EXTERNALSYM DsRestoreRegisterA}
function DsRestoreRegisterW(hbc: HBC; szCheckPointFilePath, szLogPath: LPCWSTR;
  rgrstmap: PEDB_RSTMAPW; crstmap: LONG; szBackupLogPath: LPCWSTR; genLow, genHigh: ULONG): HRESULT; stdcall;
{$EXTERNALSYM DsRestoreRegisterW}

{$IFDEF UNICODE}
function DsRestoreRegister(hbc: HBC; szCheckPointFilePath, szLogPath: LPCWSTR;
  rgrstmap: PEDB_RSTMAPW; crstmap: LONG; szBackupLogPath: LPCWSTR; genLow, genHigh: ULONG): HRESULT; stdcall;
{$EXTERNALSYM DsRestoreRegister}
{$ELSE}
function DsRestoreRegister(hbc: HBC; szCheckPointFilePath, szLogPath: LPCSTR;
  rgrstmap: PEDB_RSTMAPA; crstmap: LONG; szBackupLogPath: LPCSTR; genLow, genHigh: ULONG): HRESULT; stdcall;
{$EXTERNALSYM DsRestoreRegister}
{$ENDIF}

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

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

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

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

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

function DsSetCurrentBackupLogA(szServerName: LPCSTR; dwCurrentLog: DWORD): HRESULT; stdcall;
{$EXTERNALSYM DsSetCurrentBackupLogA}
function DsSetCurrentBackupLogW(szServerName: LPCWSTR; dwCurrentLog: DWORD): HRESULT; stdcall;
{$EXTERNALSYM DsSetCurrentBackupLogW}

{$IFDEF UNICODE}
function DsSetCurrentBackupLog(szServerName: LPCWSTR; dwCurrentLog: DWORD): HRESULT; stdcall;
{$EXTERNALSYM DsSetCurrentBackupLog}
{$ELSE}
function DsSetCurrentBackupLog(szServerName: LPCSTR; dwCurrentLog: DWORD): HRESULT; stdcall;
{$EXTERNALSYM DsSetCurrentBackupLog}
{$ENDIF}

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

function DsSetAuthIdentityA(szUserName, szDomainName, szPassword: LPCSTR): HRESULT; stdcall;
{$EXTERNALSYM DsSetAuthIdentityA}
function DsSetAuthIdentityW(szUserName, szDomainName, szPassword: LPCWSTR): HRESULT; stdcall;
{$EXTERNALSYM DsSetAuthIdentityW}

{$IFDEF UNICODE}
function DsSetAuthIdentity(szUserName, szDomainName, szPassword: LPCWSTR): HRESULT; stdcall;
{$EXTERNALSYM DsSetAuthIdentity}
{$ELSE}
function DsSetAuthIdentity(szUserName, szDomainName, szPassword: LPCSTR): HRESULT; stdcall;
{$EXTERNALSYM DsSetAuthIdentity}
{$ENDIF}

implementation

const
  ntdsbclilib = 'ntdsbclilib.dll';

function DsIsNTDSOnlineA; external ntdsbclilib name 'DsIsNTDSOnlineA';
function DsIsNTDSOnlineW; external ntdsbclilib name 'DsIsNTDSOnlineW';
{$IFDEF UNICODE}
function DsIsNTDSOnline; external ntdsbclilib name 'DsIsNTDSOnlineW';
{$ELSE}
function DsIsNTDSOnline; external ntdsbclilib name 'DsIsNTDSOnlineA';
{$ENDIF}
function DsBackupPrepareA; external ntdsbclilib name 'DsBackupPrepareA';
function DsBackupPrepareW; external ntdsbclilib name 'DsBackupPrepareW';
{$IFDEF UNICODE}
function DsBackupPrepare; external ntdsbclilib name 'DsBackupPrepareW';
{$ELSE}
function DsBackupPrepare; external ntdsbclilib name 'DsBackupPrepareA';
{$ENDIF}
function DsBackupGetDatabaseNamesA; external ntdsbclilib name 'DsBackupGetDatabaseNamesA';
function DsBackupGetDatabaseNamesW; external ntdsbclilib name 'DsBackupGetDatabaseNamesW';
{$IFDEF UNICODE}
function DsBackupGetDatabaseNames; external ntdsbclilib name 'DsBackupGetDatabaseNamesW';
{$ELSE}
function DsBackupGetDatabaseNames; external ntdsbclilib name 'DsBackupGetDatabaseNamesA';
{$ENDIF}
function DsBackupOpenFileA; external ntdsbclilib name 'DsBackupOpenFileA';
function DsBackupOpenFileW; external ntdsbclilib name 'DsBackupOpenFileW';
{$IFDEF UNICODE}
function DsBackupOpenFile; external ntdsbclilib name 'DsBackupOpenFileW';
{$ELSE}
function DsBackupOpenFile; external ntdsbclilib name 'DsBackupOpenFileA';
{$ENDIF}
function DsBackupRead; external ntdsbclilib name 'DsBackupRead';
function DsBackupClose; external ntdsbclilib name 'DsBackupClose';
function DsBackupGetBackupLogsA; external ntdsbclilib name 'DsBackupGetBackupLogsA';
function DsBackupGetBackupLogsW; external ntdsbclilib name 'DsBackupGetBackupLogsW';
{$IFDEF UNICODE}
function DsBackupGetBackupLogs; external ntdsbclilib name 'DsBackupGetBackupLogsW';
{$ELSE}
function DsBackupGetBackupLogs; external ntdsbclilib name 'DsBackupGetBackupLogsA';
{$ENDIF}
function DsBackupTruncateLogs; external ntdsbclilib name 'DsBackupTruncateLogs';
function DsBackupEnd; external ntdsbclilib name 'DsBackupEnd';
procedure DsBackupFree; external ntdsbclilib name 'DsBackupFree';
function DsRestoreGetDatabaseLocationsA; external ntdsbclilib name 'DsRestoreGetDatabaseLocationsA';
function DsRestoreGetDatabaseLocationsW; external ntdsbclilib name 'DsRestoreGetDatabaseLocationsW';
{$IFDEF UNICODE}
function DsRestoreGetDatabaseLocations; external ntdsbclilib name 'DsRestoreGetDatabaseLocationsW';
{$ELSE}
function DsRestoreGetDatabaseLocations; external ntdsbclilib name 'DsRestoreGetDatabaseLocationsA';
{$ENDIF}
function DsRestorePrepareA; external ntdsbclilib name 'DsRestorePrepareA';
function DsRestorePrepareW; external ntdsbclilib name 'DsRestorePrepareW';
{$IFDEF UNICODE}
function DsRestorePrepare; external ntdsbclilib name 'DsRestorePrepareW';
{$ELSE}
function DsRestorePrepare; external ntdsbclilib name 'DsRestorePrepareA';
{$ENDIF}
function DsRestoreRegisterA; external ntdsbclilib name 'DsRestoreRegisterA';
function DsRestoreRegisterW; external ntdsbclilib name 'DsRestoreRegisterW';
{$IFDEF UNICODE}
function DsRestoreRegister; external ntdsbclilib name 'DsRestoreRegisterW';
{$ELSE}
function DsRestoreRegister; external ntdsbclilib name 'DsRestoreRegisterA';
{$ENDIF}
function DsRestoreRegisterComplete; external ntdsbclilib name 'DsRestoreRegisterComplete';
function DsRestoreEnd; external ntdsbclilib name 'DsRestoreEnd';
function DsSetCurrentBackupLogA; external ntdsbclilib name 'DsSetCurrentBackupLogA';
function DsSetCurrentBackupLogW; external ntdsbclilib name 'DsSetCurrentBackupLogW';
{$IFDEF UNICODE}
function DsSetCurrentBackupLog; external ntdsbclilib name 'DsSetCurrentBackupLogW';
{$ELSE}
function DsSetCurrentBackupLog; external ntdsbclilib name 'DsSetCurrentBackupLogA';
{$ENDIF}
function DsSetAuthIdentityA; external ntdsbclilib name 'DsSetAuthIdentityA';
function DsSetAuthIdentityW; external ntdsbclilib name 'DsSetAuthIdentityW';
{$IFDEF UNICODE}
function DsSetAuthIdentity; external ntdsbclilib name 'DsSetAuthIdentityW';
{$ELSE}
function DsSetAuthIdentity; external ntdsbclilib name 'DsSetAuthIdentityA';
{$ENDIF}

end.

⌨️ 快捷键说明

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