📄 ntdsbmsg.pas
字号:
{******************************************************************}
{ }
{ Borland Delphi Runtime Library }
{ DS Backup/Restore error codes interface unit }
{ }
{ Portions created by Microsoft are }
{ Copyright (C) 1995-1999 Microsoft Corporation. }
{ All Rights Reserved. }
{ }
{ The original file is: ntdsbmsg.h, released June 2000. }
{ The original Pascal code is: NtDsbMsg.pas, released Dec 2000 }
{ The initial developer of the Pascal code is Marcel van Brakel }
{ (brakelm@bart.nl). }
{ }
{ Portions created by Marcel van Brakel are }
{ Copyright (C) 1999 Marcel van Brakel. }
{ }
{ Obtained through: }
{ Joint Endeavour of Delphi Innovators (Project JEDI) }
{ }
{ You may retrieve the latest version of this file at the Project }
{ JEDI home page, located at http://delphi-jedi.org }
{ }
{ The contents of this file are used with permission, subject to }
{ the Mozilla Public License Version 1.1 (the "License"); you may }
{ not use this file except in compliance with the License. You may }
{ obtain a copy of the License at }
{ http://www.mozilla.org/MPL/MPL-1.1.html }
{ }
{ Software distributed under the License is distributed on an }
{ "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or }
{ implied. See the License for the specific language governing }
{ rights and limitations under the License. }
{ }
{******************************************************************}
unit NtDsBMsg;
{$WEAKPACKAGEUNIT}
{$HPPEMIT ''}
{$HPPEMIT '#include "NtDsBMsg.h"'}
{$HPPEMIT ''}
{$I WINDEFINES.INC}
interface
uses
WinError, WinType;
//
// Windows NT Directory Service Backup/Restore API error codes
// Copyright (C) 1996-1999, Microsoft Corporation
//
//
// SUCCESS
//
//
// Values are 32 bit values layed out as follows:
//
// 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1
// 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
// +---+-+-+-----------------------+-------------------------------+
// |Sev|C|R| Facility | Code |
// +---+-+-+-----------------------+-------------------------------+
//
// where
//
// Sev - is the severity code
//
// 00 - Success
// 01 - Informational
// 10 - Warning
// 11 - Error
//
// C - is the Customer code flag
//
// R - is a reserved bit
//
// Facility - is the facility code
//
// Code - is the facility's status code
//
//
// Define the facility codes
//
const
FACILITY_SYSTEM = $0;
{$EXTERNALSYM FACILITY_SYSTEM}
FACILITY_NTDSB = $800;
{$EXTERNALSYM FACILITY_NTDSB}
FACILITY_BACKUP = $7FF;
{$EXTERNALSYM FACILITY_BACKUP}
//
// Define the severity codes
//
STATUS_SEVERITY_WARNING = $2;
{$EXTERNALSYM STATUS_SEVERITY_WARNING}
STATUS_SEVERITY_SUCCESS = $0;
{$EXTERNALSYM STATUS_SEVERITY_SUCCESS}
STATUS_SEVERITY_INFORMATIONAL = $1;
{$EXTERNALSYM STATUS_SEVERITY_INFORMATIONAL}
STATUS_SEVERITY_ERROR = $3;
{$EXTERNALSYM STATUS_SEVERITY_ERROR}
//
// MessageId: hrNone
//
// MessageText:
//
// The operation was successful
//
hrNone = HRESULT($00000000);
{$EXTERNALSYM hrNone}
//
// ERRORS
//
//
// MessageId: hrNyi
//
// MessageText:
//
// The function is not yet implemented
//
hrNyi = HRESULT($C0000001);
{$EXTERNALSYM hrNyi}
//
// Backup errors
//
//
// MessageId: hrInvalidParam
//
// MessageText:
//
// The parameter is not valid.
//
hrInvalidParam = HRESULT($C7FF0001);
{$EXTERNALSYM hrInvalidParam}
//
// MessageId: hrError
//
// MessageText:
//
// An internal error has occurred.
//
hrError = HRESULT($C7FF0002);
{$EXTERNALSYM hrError}
//
// MessageId: hrInvalidHandle
//
// MessageText:
//
// The handle is not valid.
//
hrInvalidHandle = HRESULT($C7FF0003);
{$EXTERNALSYM hrInvalidHandle}
//
// MessageId: hrRestoreInProgress
//
// MessageText:
//
// The Restore process is already in progress.
//
hrRestoreInProgress = HRESULT($C7FF0004);
{$EXTERNALSYM hrRestoreInProgress}
//
// MessageId: hrAlreadyOpen
//
// MessageText:
//
// The file specified is already open.
//
hrAlreadyOpen = HRESULT($C7FF0005);
{$EXTERNALSYM hrAlreadyOpen}
//
// MessageId: hrInvalidRecips
//
// MessageText:
//
// The recipients are invalid.
//
hrInvalidRecips = HRESULT($C7FF0006);
{$EXTERNALSYM hrInvalidRecips}
//
// MessageId: hrCouldNotConnect
//
// MessageText:
//
// Unable to perform the backup. Either you are not connected to the specified backup server
// or the service you are trying to backup is not running.
//
hrCouldNotConnect = HRESULT($C7FF0007);
{$EXTERNALSYM hrCouldNotConnect}
//
// MessageId: hrRestoreMapExists
//
// MessageText:
//
// A restore map already exists for the specified component. You can only specify
// a restore map when performing a full restore.
//
hrRestoreMapExists = HRESULT($C7FF0008);
{$EXTERNALSYM hrRestoreMapExists}
//
// MessageId: hrIncrementalBackupDisabled
//
// MessageText:
//
// Another application has modified the specified Windows NT Directory Service database such that any
// subsequent backups will fail. You must perform a full backup to fix this problem.
//
hrIncrementalBackupDisabled = HRESULT($C7FF0009);
{$EXTERNALSYM hrIncrementalBackupDisabled}
//
// MessageId: hrLogFileNotFound
//
// MessageText:
//
// Unable to perform an incremental backup because a required Windows NT Directory Service database log file could not be found.
//
hrLogFileNotFound = HRESULT($C7FF000A);
{$EXTERNALSYM hrLogFileNotFound}
//
// MessageId: hrCircularLogging
//
// MessageText:
//
// The Windows NT Directory Service component specified is configured to use circular database logs.
// It cannot be backed up without a full backup.
//
hrCircularLogging = HRESULT($C7FF000B);
{$EXTERNALSYM hrCircularLogging}
//
// MessageId: hrNoFullRestore
//
// MessageText:
//
// The databases have not been restored to this machine. You cannot restore an incremental backup
// until a full backup has been restored.
//
hrNoFullRestore = HRESULT($C7FF000C);
{$EXTERNALSYM hrNoFullRestore}
//
// MessageId: hrCommunicationError
//
// MessageText:
//
// A communications error occurred while attempting to perform a local backup.
//
hrCommunicationError = HRESULT($C7FF000D);
{$EXTERNALSYM hrCommunicationError}
//
// MessageId: hrFullBackupNotTaken
//
// MessageText:
//
// You must perform a full backup before you can perform an incremental backup.
//
hrFullBackupNotTaken = HRESULT($C7FF000E);
{$EXTERNALSYM hrFullBackupNotTaken}
//
// MessageId: hrMissingExpiryToken
//
// MessageText:
//
// Expiry token is missing. Cannot restore without knowing the expiry information.
//
hrMissingExpiryToken = HRESULT($C7FF000F);
{$EXTERNALSYM hrMissingExpiryToken}
//
// MessageId: hrUnknownExpiryTokenFormat
//
// MessageText:
//
// Expiry token is in unrecognizable format.
//
hrUnknownExpiryTokenFormat = HRESULT($C7FF0010);
{$EXTERNALSYM hrUnknownExpiryTokenFormat}
//
// MessageId: hrContentsExpired
//
// MessageText:
//
// DS Contents in the backup copy are out of date. Try restoring with a more recent copy.
//
hrContentsExpired = HRESULT($C7FF0011);
{$EXTERNALSYM hrContentsExpired}
hrAlreadyListening = HRESULT(RPC_S_ALREADY_LISTENING);
{$EXTERNALSYM hrAlreadyListening}
//
// ERRORS
//
//
// SYSTEM errors
//
//
// MessageId: hrFileClose
//
// MessageText:
//
// Unable to close the DOS file
//
hrFileClose = HRESULT($C8000066);
{$EXTERNALSYM hrFileClose}
//
// MessageId: hrOutOfThreads
//
// MessageText:
//
// Unable to start a thread because there are none available.
//
hrOutOfThreads = HRESULT($C8000067);
{$EXTERNALSYM hrOutOfThreads}
//
// MessageId: hrTooManyIO
//
// MessageText:
//
// The system is busy because there are too many I/Os.
//
hrTooManyIO = HRESULT($C8000069);
{$EXTERNALSYM hrTooManyIO}
//
// BUFFER MANAGER errors
//
//
// MessageId: hrBFNotSynchronous
//
// MessageText:
//
// The buffer page has been evicted.
//
hrBFNotSynchronous = HRESULT($880000C8);
{$EXTERNALSYM hrBFNotSynchronous}
//
// MessageId: hrBFPageNotFound
//
// MessageText:
//
// Unable to find the page.
//
hrBFPageNotFound = HRESULT($880000C9);
{$EXTERNALSYM hrBFPageNotFound}
//
// MessageId: hrBFInUse
//
// MessageText:
//
// Unable to abandon the buffer.
//
hrBFInUse = HRESULT($C80000CA);
{$EXTERNALSYM hrBFInUse}
//
// DIRECTORY MANAGER errors
//
//
// MessageId: hrPMRecDeleted
//
// MessageText:
//
// The record has been deleted.
//
hrPMRecDeleted = HRESULT($C800012E);
{$EXTERNALSYM hrPMRecDeleted}
//
// MessageId: hrRemainingVersions
//
// MessageText:
//
// There is idle work remaining.
//
hrRemainingVersions = HRESULT($88000141);
{$EXTERNALSYM hrRemainingVersions}
//
// RECORD MANAGER errors
//
//
// MessageId: hrFLDKeyTooBig
//
// MessageText:
//
// The key was truncated because it is more than 255 bytes.
//
hrFLDKeyTooBig = HRESULT($88000190);
{$EXTERNALSYM hrFLDKeyTooBig}
//
// MessageId: hrFLDTooManySegments
//
// MessageText:
//
// There are too many key segments.
//
hrFLDTooManySegments = HRESULT($C8000191);
{$EXTERNALSYM hrFLDTooManySegments}
//
// MessageId: hrFLDNullKey
//
// MessageText:
//
// The key is NULL.
//
hrFLDNullKey = HRESULT($88000192);
{$EXTERNALSYM hrFLDNullKey}
//
// LOGGING/RECOVERY errors
//
//
// MessageId: hrLogFileCorrupt
//
// MessageText:
//
// The log file is damaged.
//
hrLogFileCorrupt = HRESULT($C80001F5);
{$EXTERNALSYM hrLogFileCorrupt}
//
// MessageId: hrNoBackupDirectory
//
// MessageText:
//
// No backup directory was given.
//
hrNoBackupDirectory = HRESULT($C80001F7);
{$EXTERNALSYM hrNoBackupDirectory}
//
// MessageId: hrBackupDirectoryNotEmpty
//
// MessageText:
//
// The backup directory is not empty.
//
hrBackupDirectoryNotEmpty = HRESULT($C80001F8);
{$EXTERNALSYM hrBackupDirectoryNotEmpty}
//
// MessageId: hrBackupInProgress
//
// MessageText:
//
// Backup is already active.
//
hrBackupInProgress = HRESULT($C80001F9);
{$EXTERNALSYM hrBackupInProgress}
//
// MessageId: hrMissingPreviousLogFile
//
// MessageText:
//
// A log file for the checkpoint is missing.
//
hrMissingPreviousLogFile = HRESULT($C80001FD);
{$EXTERNALSYM hrMissingPreviousLogFile}
//
// MessageId: hrLogWriteFail
//
// MessageText:
//
// Unable to write to the log file.
//
hrLogWriteFail = HRESULT($C80001FE);
{$EXTERNALSYM hrLogWriteFail}
//
// MessageId: hrBadLogVersion
//
// MessageText:
//
// The version of the log file is not compatible with the version of the Windows NT Directory Service database (NTDS).
//
hrBadLogVersion = HRESULT($C8000202);
{$EXTERNALSYM hrBadLogVersion}
//
// MessageId: hrInvalidLogSequence
//
// MessageText:
//
// The time stamp in the next log does not match what was expected.
//
hrInvalidLogSequence = HRESULT($C8000203);
{$EXTERNALSYM hrInvalidLogSequence}
//
// MessageId: hrLoggingDisabled
//
// MessageText:
//
// The log is not active.
//
hrLoggingDisabled = HRESULT($C8000204);
{$EXTERNALSYM hrLoggingDisabled}
//
// MessageId: hrLogBufferTooSmall
//
// MessageText:
//
// The log buffer is too small to be recovered.
//
hrLogBufferTooSmall = HRESULT($C8000205);
{$EXTERNALSYM hrLogBufferTooSmall}
//
// MessageId: hrLogSequenceEnd
//
// MessageText:
//
// The maximum number of log files has been exceeded.
//
hrLogSequenceEnd = HRESULT($C8000207);
{$EXTERNALSYM hrLogSequenceEnd}
//
// MessageId: hrNoBackup
//
// MessageText:
//
// There is no backup in progress.
//
hrNoBackup = HRESULT($C8000208);
{$EXTERNALSYM hrNoBackup}
//
// MessageId: hrInvalidBackupSequence
//
// MessageText:
//
// The backup call is out of sequence.
//
hrInvalidBackupSequence = HRESULT($C8000209);
{$EXTERNALSYM hrInvalidBackupSequence}
//
// MessageId: hrBackupNotAllowedYet
//
// MessageText:
//
// Unable to perform a backup now.
//
hrBackupNotAllowedYet = HRESULT($C800020B);
{$EXTERNALSYM hrBackupNotAllowedYet}
//
// MessageId: hrDeleteBackupFileFail
//
// MessageText:
//
// Unable to delete the backup file.
//
hrDeleteBackupFileFail = HRESULT($C800020C);
{$EXTERNALSYM hrDeleteBackupFileFail}
//
// MessageId: hrMakeBackupDirectoryFail
//
// MessageText:
//
// Unable to make a backup temporary directory.
//
hrMakeBackupDirectoryFail = HRESULT($C800020D);
{$EXTERNALSYM hrMakeBackupDirectoryFail}
//
// MessageId: hrInvalidBackup
//
// MessageText:
//
// An incremental backup cannot be performed when circular logging is enabled.
//
hrInvalidBackup = HRESULT($C800020E);
{$EXTERNALSYM hrInvalidBackup}
//
// MessageId: hrRecoveredWithErrors
//
// MessageText:
//
// Errors were encountered during the repair process.
//
hrRecoveredWithErrors = HRESULT($C800020F);
{$EXTERNALSYM hrRecoveredWithErrors}
//
// MessageId: hrMissingLogFile
//
// MessageText:
//
// The current log file is missing.
//
hrMissingLogFile = HRESULT($C8000210);
{$EXTERNALSYM hrMissingLogFile}
//
// MessageId: hrLogDiskFull
//
// MessageText:
//
// The log disk is full.
//
hrLogDiskFull = HRESULT($C8000211);
{$EXTERNALSYM hrLogDiskFull}
//
// MessageId: hrBadLogSignature
//
// MessageText:
//
// A log file is damaged.
//
hrBadLogSignature = HRESULT($C8000212);
{$EXTERNALSYM hrBadLogSignature}
//
// MessageId: hrBadDbSignature
//
// MessageText:
//
// A database file is damaged.
//
hrBadDbSignature = HRESULT($C8000213);
{$EXTERNALSYM hrBadDbSignature}
//
// MessageId: hrBadCheckpointSignature
//
// MessageText:
//
// A checkpoint file is damaged.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -