📄 jwantdsapi.pas
字号:
pName: LPSTR; // name in requested format
end;
{$EXTERNALSYM DS_NAME_RESULT_ITEMA}
TDsNameResultItemA = DS_NAME_RESULT_ITEMA;
PDsNameResultItemA = PDS_NAME_RESULT_ITEMA;
PDS_NAME_RESULTA = ^DS_NAME_RESULTA;
{$EXTERNALSYM PDS_NAME_RESULTA}
DS_NAME_RESULTA = record
cItems: DWORD; // item count
rItems: PDS_NAME_RESULT_ITEMA; // item array
end;
{$EXTERNALSYM DS_NAME_RESULTA}
TDsNameResultA = DS_NAME_RESULTA;
PDsNameResultA = PDS_NAME_RESULTA;
PDS_NAME_RESULT_ITEMW = ^DS_NAME_RESULT_ITEMW;
{$EXTERNALSYM PDS_NAME_RESULT_ITEMW}
DS_NAME_RESULT_ITEMW = record
status: DWORD; // DS_NAME_ERROR
pDomain: LPWSTR; // DNS domain
pName: LPWSTR; // name in requested format
end;
{$EXTERNALSYM DS_NAME_RESULT_ITEMW}
TDsNameResultItemW = DS_NAME_RESULT_ITEMW;
PDsNameResultItemW = PDS_NAME_RESULT_ITEMW;
PDS_NAME_RESULTW = ^DS_NAME_RESULTW;
{$EXTERNALSYM PDS_NAME_RESULTW}
DS_NAME_RESULTW = record
cItems: DWORD; // item count
rItems: PDS_NAME_RESULT_ITEMW; // item array
end;
{$EXTERNALSYM DS_NAME_RESULTW}
TDsNameResultW = DS_NAME_RESULTW;
PDsNameResultW = PDS_NAME_RESULTW;
{$IFDEF UNICODE}
DS_NAME_RESULT = DS_NAME_RESULTW;
{$EXTERNALSYM DS_NAME_RESULT}
PDS_NAME_RESULT = PDS_NAME_RESULTW;
{$EXTERNALSYM PDS_NAME_RESULT}
DS_NAME_RESULT_ITEM = DS_NAME_RESULT_ITEMW;
{$EXTERNALSYM DS_NAME_RESULT_ITEM}
PDS_NAME_RESULT_ITEM = PDS_NAME_RESULT_ITEMW;
{$EXTERNALSYM PDS_NAME_RESULT_ITEM}
TDsNameResult = TDsNameResultW;
PDsNameResult = PDsNameResultW;
TDsNameResultItem = TDsNameResultItemW;
PDsNameResultItem = PDsNameResultItemW;
{$ELSE}
DS_NAME_RESULT = DS_NAME_RESULTA;
{$EXTERNALSYM DS_NAME_RESULT}
PDS_NAME_RESULT = PDS_NAME_RESULTA;
{$EXTERNALSYM PDS_NAME_RESULT}
DS_NAME_RESULT_ITEM = DS_NAME_RESULT_ITEMA;
{$EXTERNALSYM DS_NAME_RESULT_ITEM}
PDS_NAME_RESULT_ITEM = PDS_NAME_RESULT_ITEMA;
{$EXTERNALSYM PDS_NAME_RESULT_ITEM}
TDsNameResult = TDsNameResultA;
PDsNameResult = PDsNameResultA;
TDsNameResultItem = TDsNameResultItemA;
PDsNameResultItem = PDsNameResultItemA;
{$ENDIF}
// Public replication option flags
// ********************
// DsBindWithSpnEx flags
// ********************
// Allow the Bind to use delegate service level, so that you can
// do ntdsapi operations that require delegation, such as
// DsAddSidHistory, and DsReplicaSyncAll(). Most operations do
// not require DELEGATE so this flag should only be specified
// if you need it, because if you bind to a rogue server with
// the DELEGATE flag, you'll allow the rogue server to use your
// credentials to connect back to a non-rogue server and perform
// operations other than you intended.
const
NTDSAPI_BIND_ALLOW_DELEGATION = ($00000001);
{$EXTERNALSYM NTDSAPI_BIND_ALLOW_DELEGATION}
// ********************
// Replica Sync flags
// These flag values are used both as input to DsReplicaSync and
// as output from DsReplicaGetInfo, PENDING_OPS, DS_REPL_OPW.ulOptions
// ********************
// Perform this operation asynchronously.
// Required when using DS_REPSYNC_ALL_SOURCES
const
DS_REPSYNC_ASYNCHRONOUS_OPERATION = $00000001;
{$EXTERNALSYM DS_REPSYNC_ASYNCHRONOUS_OPERATION}
// Writeable replica. Otherwise, read-only.
DS_REPSYNC_WRITEABLE = $00000002;
{$EXTERNALSYM DS_REPSYNC_WRITEABLE}
// This is a periodic sync request as scheduled by the admin.
DS_REPSYNC_PERIODIC = $00000004;
{$EXTERNALSYM DS_REPSYNC_PERIODIC}
// Use inter-site messaging
DS_REPSYNC_INTERSITE_MESSAGING = $00000008;
{$EXTERNALSYM DS_REPSYNC_INTERSITE_MESSAGING}
// Sync from all sources.
DS_REPSYNC_ALL_SOURCES = $00000010;
{$EXTERNALSYM DS_REPSYNC_ALL_SOURCES}
// Sync starting from scratch (i.e., at the first USN).
DS_REPSYNC_FULL = $00000020;
{$EXTERNALSYM DS_REPSYNC_FULL}
// This is a notification of an update that was marked urgent.
DS_REPSYNC_URGENT = $00000040;
{$EXTERNALSYM DS_REPSYNC_URGENT}
// Don't discard this synchronization request, even if a similar
// sync is pending.
DS_REPSYNC_NO_DISCARD = $00000080;
{$EXTERNALSYM DS_REPSYNC_NO_DISCARD}
// Sync even if link is currently disabled.
DS_REPSYNC_FORCE = $00000100;
{$EXTERNALSYM DS_REPSYNC_FORCE}
// Causes the source DSA to check if a reps-to is present for the local DSA
// (aka the destination). If not, one is added. This ensures that
// source sends change notifications.
DS_REPSYNC_ADD_REFERENCE = $00000200;
{$EXTERNALSYM DS_REPSYNC_ADD_REFERENCE}
// A sync from this source has never completed (e.g., a new source).
DS_REPSYNC_NEVER_COMPLETED = $00000400;
{$EXTERNALSYM DS_REPSYNC_NEVER_COMPLETED}
// When this sync is complete, requests a sync in the opposite direction.
DS_REPSYNC_TWO_WAY = $00000800;
{$EXTERNALSYM DS_REPSYNC_TWO_WAY}
// Do not request change notifications from this source.
DS_REPSYNC_NEVER_NOTIFY = $00001000;
{$EXTERNALSYM DS_REPSYNC_NEVER_NOTIFY}
// Sync the NC from this source when the DSA is started.
DS_REPSYNC_INITIAL = $00002000;
{$EXTERNALSYM DS_REPSYNC_INITIAL}
// Use compression when replicating. Saves message size (e.g., network
// bandwidth) at the expense of extra CPU overhead at both the source and
// destination servers.
DS_REPSYNC_USE_COMPRESSION = $00004000;
{$EXTERNALSYM DS_REPSYNC_USE_COMPRESSION}
// Sync was abandoned for lack of updates
DS_REPSYNC_ABANDONED = $00008000;
{$EXTERNALSYM DS_REPSYNC_ABANDONED}
// Initial sync in progress
DS_REPSYNC_INITIAL_IN_PROGRESS = $00010000;
{$EXTERNALSYM DS_REPSYNC_INITIAL_IN_PROGRESS}
// Partial Attribute Set sync in progress
DS_REPSYNC_PARTIAL_ATTRIBUTE_SET = $00020000;
{$EXTERNALSYM DS_REPSYNC_PARTIAL_ATTRIBUTE_SET}
// Sync is being retried
DS_REPSYNC_REQUEUE = $00040000;
{$EXTERNALSYM DS_REPSYNC_REQUEUE}
// Sync is a notification request from a source
DS_REPSYNC_NOTIFICATION = $00080000;
{$EXTERNALSYM DS_REPSYNC_NOTIFICATION}
// Sync is a special form which requests to establish contact
// now and do the rest of the sync later
DS_REPSYNC_ASYNCHRONOUS_REPLICA = $00100000;
{$EXTERNALSYM DS_REPSYNC_ASYNCHRONOUS_REPLICA}
// Request critical objects only
DS_REPSYNC_CRITICAL = $00200000;
{$EXTERNALSYM DS_REPSYNC_CRITICAL}
// A full synchronization is in progress
DS_REPSYNC_FULL_IN_PROGRESS = $00400000;
{$EXTERNALSYM DS_REPSYNC_FULL_IN_PROGRESS}
// Synchronization request was previously preempted
DS_REPSYNC_PREEMPTED = $00800000;
{$EXTERNALSYM DS_REPSYNC_PREEMPTED}
// ********************
// Replica Add flags
// ********************
// Perform this operation asynchronously.
DS_REPADD_ASYNCHRONOUS_OPERATION = $00000001;
{$EXTERNALSYM DS_REPADD_ASYNCHRONOUS_OPERATION}
// Create a writeable replica. Otherwise, read-only.
DS_REPADD_WRITEABLE = $00000002;
{$EXTERNALSYM DS_REPADD_WRITEABLE}
// Sync the NC from this source when the DSA is started.
DS_REPADD_INITIAL = $00000004;
{$EXTERNALSYM DS_REPADD_INITIAL}
// Sync the NC from this source periodically, as defined by the
// schedule passed in the preptimesSync argument.
DS_REPADD_PERIODIC = $00000008;
{$EXTERNALSYM DS_REPADD_PERIODIC}
// Sync from the source DSA via an Intersite Messaging Service (ISM) transport
// (e.g., SMTP) rather than native DS RPC.
DS_REPADD_INTERSITE_MESSAGING = $00000010;
{$EXTERNALSYM DS_REPADD_INTERSITE_MESSAGING}
// Don't replicate the NC now -- just save enough state such that we
// know to replicate it later.
DS_REPADD_ASYNCHRONOUS_REPLICA = $00000020;
{$EXTERNALSYM DS_REPADD_ASYNCHRONOUS_REPLICA}
// Disable notification-based synchronization for the NC from this source.
// This is expected to be a temporary state; the similar flag
// DS_REPADD_NEVER_NOTIFY should be used if the disable is to be more permanent.
DS_REPADD_DISABLE_NOTIFICATION = $00000040;
{$EXTERNALSYM DS_REPADD_DISABLE_NOTIFICATION}
// Disable periodic synchronization for the NC from this source
DS_REPADD_DISABLE_PERIODIC = $00000080;
{$EXTERNALSYM DS_REPADD_DISABLE_PERIODIC}
// Use compression when replicating. Saves message size (e.g., network
// bandwidth) at the expense of extra CPU overhead at both the source and
// destination servers.
DS_REPADD_USE_COMPRESSION = $00000100;
{$EXTERNALSYM DS_REPADD_USE_COMPRESSION}
// Do not request change notifications from this source. When this flag is
// set, the source will not notify the destination when changes occur.
// Recommended for all intersite replication, which may occur over WAN links.
// This is expected to be a more or less permanent state; the similar flag
// DS_REPADD_DISABLE_NOTIFICATION should be used if notifications are to be
// disabled only temporarily.
DS_REPADD_NEVER_NOTIFY = $00000200;
{$EXTERNALSYM DS_REPADD_NEVER_NOTIFY}
// When this sync is complete, requests a sync in the opposite direction.
DS_REPADD_TWO_WAY = $00000400;
{$EXTERNALSYM DS_REPADD_TWO_WAY}
// Request critical objects only
// Critical only is only allowed while installing
// A critical only sync does not bring all objects in the partition. It
// replicates just the ones necessary for minimal directory operation.
// A normal, non-critical sync must be performed before the partition
// can be considered fully synchronized.
DS_REPADD_CRITICAL = $00000800;
{$EXTERNALSYM DS_REPADD_CRITICAL}
// ********************
// Replica Delete flags
// ********************
// Perform this operation asynchronously.
DS_REPDEL_ASYNCHRONOUS_OPERATION = $00000001;
{$EXTERNALSYM DS_REPDEL_ASYNCHRONOUS_OPERATION}
// The replica being deleted is writeable.
DS_REPDEL_WRITEABLE = $00000002;
{$EXTERNALSYM DS_REPDEL_WRITEABLE}
// Replica is a mail-based replica
DS_REPDEL_INTERSITE_MESSAGING = $00000004;
{$EXTERNALSYM DS_REPDEL_INTERSITE_MESSAGING}
// Ignore any error generated by contacting the source to tell it to scratch
// this server from its Reps-To for this NC.
DS_REPDEL_IGNORE_ERRORS = $00000008;
{$EXTERNALSYM DS_REPDEL_IGNORE_ERRORS}
// Do not contact the source telling it to scratch this server from its
// Rep-To for this NC. Otherwise, if the link is RPC-based, the source will
// be contacted.
DS_REPDEL_LOCAL_ONLY = $00000010;
{$EXTERNALSYM DS_REPDEL_LOCAL_ONLY}
// Delete all the objects in the NC
// "No source" is incompatible with (and rejected for) writeable NCs. This is
// valid only for read-only NCs, and then only if the NC has no source. This
// can occur when the NC has been partially deleted (in which case the KCC
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -