Headers diff for ntdsapi.dll between 6.0.6001.18000-Windows 6.0 and 6.1.7600.16385-Windows 7.0 versions



 ntdsapi.h (6.0.6001.18000-Windows 6.0)   ntdsapi.h (6.1.7600.16385-Windows 7.0) 
skipping to change at line 64 skipping to change at line 64
typedef GUID UUID; typedef GUID UUID;
typedef void * RPC_AUTH_IDENTITY_HANDLE; typedef void * RPC_AUTH_IDENTITY_HANDLE;
typedef void VOID; typedef void VOID;
#endif #endif
// Following constants define the Active Directory Behavior // Following constants define the Active Directory Behavior
// Version numbers. // Version numbers.
#define DS_BEHAVIOR_WIN2000 0 #define DS_BEHAVIOR_WIN2000 0
#define DS_BEHAVIOR_WIN2003_WITH_MIXED_DOMAINS 1 #define DS_BEHAVIOR_WIN2003_WITH_MIXED_DOMAINS 1
#define DS_BEHAVIOR_WIN2003 2 #define DS_BEHAVIOR_WIN2003 2
#define DS_BEHAVIOR_LONGHORN 3 #define DS_BEHAVIOR_WIN2008 3
#define DS_BEHAVIOR_WIN2008R2 4
// Deprecated constants
#define DS_BEHAVIOR_LONGHORN DS_BEHAVIOR_WIN2008
#define DS_BEHAVIOR_WIN7 DS_BEHAVIOR_WIN2008R2
#define DS_DEFAULT_LOCALE \ #define DS_DEFAULT_LOCALE \
(MAKELCID(MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), \ (MAKELCID(MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), \
SORT_DEFAULT)) SORT_DEFAULT))
#define DS_DEFAULT_LOCALE_COMPARE_FLAGS (NORM_IGNORECASE | \ #define DS_DEFAULT_LOCALE_COMPARE_FLAGS (NORM_IGNORECASE | \
NORM_IGNOREKANATYPE | \ NORM_IGNOREKANATYPE | \
NORM_IGNORENONSPACE | \ NORM_IGNORENONSPACE | \
NORM_IGNOREWIDTH | \ NORM_IGNOREWIDTH | \
SORT_STRINGSORT ) SORT_STRINGSORT )
skipping to change at line 373 skipping to change at line 378
// work. // work.
#define NTDSAPI_BIND_FORCE_KERBEROS (0x00000004) #define NTDSAPI_BIND_FORCE_KERBEROS (0x00000004)
// ******************** // ********************
// Replica Sync flags // Replica Sync flags
// These flag values are used both as input to DsReplicaSync and // These flag values are used both as input to DsReplicaSync and
// as output from DsReplicaGetInfo, PENDING_OPS, DS_REPL_OPW.ulOptions // as output from DsReplicaGetInfo, PENDING_OPS, DS_REPL_OPW.ulOptions
// ******************** // ********************
// Perform this operation asynchronously. // Perform this operation asynchronously.
// Required when using DS_REPSYNC_ALL_SOURCES
#define DS_REPSYNC_ASYNCHRONOUS_OPERATION 0x00000001 #define DS_REPSYNC_ASYNCHRONOUS_OPERATION 0x00000001
// Writeable replica. Otherwise, read-only. // Writeable replica. Otherwise, read-only.
#define DS_REPSYNC_WRITEABLE 0x00000002 #define DS_REPSYNC_WRITEABLE 0x00000002
// This is a periodic sync request as scheduled by the admin. // This is a periodic sync request as scheduled by the admin.
#define DS_REPSYNC_PERIODIC 0x00000004 #define DS_REPSYNC_PERIODIC 0x00000004
// Use inter-site messaging // Use inter-site messaging
#define DS_REPSYNC_INTERSITE_MESSAGING 0x00000008 #define DS_REPSYNC_INTERSITE_MESSAGING 0x00000008
// Sync from all sources.
#define DS_REPSYNC_ALL_SOURCES 0x00000010
// Sync starting from scratch (i.e., at the first USN). // Sync starting from scratch (i.e., at the first USN).
#define DS_REPSYNC_FULL 0x00000020 #define DS_REPSYNC_FULL 0x00000020
// This is a notification of an update that was marked urgent. // This is a notification of an update that was marked urgent.
#define DS_REPSYNC_URGENT 0x00000040 #define DS_REPSYNC_URGENT 0x00000040
// Don't discard this synchronization request, even if a similar // Don't discard this synchronization request, even if a similar
// sync is pending. // sync is pending.
#define DS_REPSYNC_NO_DISCARD 0x00000080 #define DS_REPSYNC_NO_DISCARD 0x00000080
skipping to change at line 454 skipping to change at line 455
// Request critical objects only // Request critical objects only
#define DS_REPSYNC_CRITICAL 0x00200000 #define DS_REPSYNC_CRITICAL 0x00200000
// A full synchronization is in progress // A full synchronization is in progress
#define DS_REPSYNC_FULL_IN_PROGRESS 0x00400000 #define DS_REPSYNC_FULL_IN_PROGRESS 0x00400000
// Synchronization request was previously preempted // Synchronization request was previously preempted
#define DS_REPSYNC_PREEMPTED 0x00800000 #define DS_REPSYNC_PREEMPTED 0x00800000
// Replica has a full (not partial) set of attributes // Non GC readonly replica
#define DS_REPSYNC_FULL_REPLICA 0x01000000 #define DS_REPSYNC_NONGC_RO_REPLICA 0x01000000
// ******************** // ********************
// Replica Add flags // Replica Add flags
// ******************** // ********************
// Perform this operation asynchronously. // Perform this operation asynchronously.
#define DS_REPADD_ASYNCHRONOUS_OPERATION 0x00000001 #define DS_REPADD_ASYNCHRONOUS_OPERATION 0x00000001
// Create a writeable replica. Otherwise, read-only. // Create a writeable replica. Otherwise, read-only.
#define DS_REPADD_WRITEABLE 0x00000002 #define DS_REPADD_WRITEABLE 0x00000002
skipping to change at line 517 skipping to change at line 518
// Critical only is only allowed while installing // Critical only is only allowed while installing
// A critical only sync does not bring all objects in the partition. It // A critical only sync does not bring all objects in the partition. It
// replicates just the ones necessary for minimal directory operation. // replicates just the ones necessary for minimal directory operation.
// A normal, non-critical sync must be performed before the partition // A normal, non-critical sync must be performed before the partition
// can be considered fully synchronized. // can be considered fully synchronized.
#define DS_REPADD_CRITICAL 0x00000800 #define DS_REPADD_CRITICAL 0x00000800
// Special secret processing // Special secret processing
#define DS_REPADD_SELECT_SECRETS 0x00001000 #define DS_REPADD_SELECT_SECRETS 0x00001000
// Replica has a full (not partial) set of attributes // Non GC RO Replica
#define DS_REPADD_FULL_REPLICA 0x01000000 #define DS_REPADD_NONGC_RO_REPLICA 0x01000000
// ******************** // ********************
// Replica Delete flags // Replica Delete flags
// ******************** // ********************
// Perform this operation asynchronously. // Perform this operation asynchronously.
#define DS_REPDEL_ASYNCHRONOUS_OPERATION 0x00000001 #define DS_REPDEL_ASYNCHRONOUS_OPERATION 0x00000001
// The replica being deleted is writeable. // The replica being deleted is writeable.
#define DS_REPDEL_WRITEABLE 0x00000002 #define DS_REPDEL_WRITEABLE 0x00000002
skipping to change at line 590 skipping to change at line 591
// The replica being deleted is writeable. // The replica being deleted is writeable.
#define DS_REPUPD_WRITEABLE 0x00000002 #define DS_REPUPD_WRITEABLE 0x00000002
// Add a reference // Add a reference
#define DS_REPUPD_ADD_REFERENCE 0x00000004 #define DS_REPUPD_ADD_REFERENCE 0x00000004
// Remove a reference // Remove a reference
#define DS_REPUPD_DELETE_REFERENCE 0x00000008 #define DS_REPUPD_DELETE_REFERENCE 0x00000008
// Use GCSPN while notifying replica partner
#define DS_REPUPD_REFERENCE_GCSPN 0x00000010
// ******************** // ********************
// NC Related Flags // NC Related Flags
// ******************** // ********************
// //
// Instance Type bits, specifies flags for NC head creation. // Instance Type bits, specifies flags for NC head creation.
// //
#define DS_INSTANCETYPE_IS_NC_HEAD 0x00000001 // This if what to specify on an object to indicate it's an NC Head. #define DS_INSTANCETYPE_IS_NC_HEAD 0x00000001 // This if what to specify on an object to indicate it's an NC Head.
#define DS_INSTANCETYPE_NC_IS_WRITEABLE 0x00000004 // This is to indicate that the NC Head is writeable. #define DS_INSTANCETYPE_NC_IS_WRITEABLE 0x00000004 // This is to indicate that the NC Head is writeable.
#define DS_INSTANCETYPE_NC_COMING 0x00000010 // This is to indicate that this NC is still replicating in objects to this DC, and may not be a complete N C. #define DS_INSTANCETYPE_NC_COMING 0x00000010 // This is to indicate that this NC is still replicating in objects to this DC, and may not be a complete N C.
#define DS_INSTANCETYPE_NC_GOING 0x00000020 // This is to indicate that this NC is in the process of being removed from this DC, and may not be a compl ete NC. #define DS_INSTANCETYPE_NC_GOING 0x00000020 // This is to indicate that this NC is in the process of being removed from this DC, and may not be a compl ete NC.
skipping to change at line 615 skipping to change at line 619
// These macros define bit flags which can be set in the "options" attribute // These macros define bit flags which can be set in the "options" attribute
// of objects of the specified object class. // of objects of the specified object class.
// Bit flags valid for options attribute on NTDS-DSA objects. // Bit flags valid for options attribute on NTDS-DSA objects.
// //
#define NTDSDSA_OPT_IS_GC ( 1 << 0 ) /* DSA is a global cata log */ #define NTDSDSA_OPT_IS_GC ( 1 << 0 ) /* DSA is a global cata log */
#define NTDSDSA_OPT_DISABLE_INBOUND_REPL ( 1 << 1 ) /* disable inbound repl ication */ #define NTDSDSA_OPT_DISABLE_INBOUND_REPL ( 1 << 1 ) /* disable inbound repl ication */
#define NTDSDSA_OPT_DISABLE_OUTBOUND_REPL ( 1 << 2 ) /* disable outbound rep lication */ #define NTDSDSA_OPT_DISABLE_OUTBOUND_REPL ( 1 << 2 ) /* disable outbound rep lication */
#define NTDSDSA_OPT_DISABLE_NTDSCONN_XLATE ( 1 << 3 ) /* disable logical conn xlation */ #define NTDSDSA_OPT_DISABLE_NTDSCONN_XLATE ( 1 << 3 ) /* disable logical conn xlation */
#define NTDSDSA_OPT_DISABLE_SPN_REGISTRATION ( 1 << 4 ) /* disable SPN registra tion for ADAM */ #define NTDSDSA_OPT_DISABLE_SPN_REGISTRATION ( 1 << 4 ) /* disable SPN registra tion for ADAM */
#define NTDSDSA_OPT_DISABLE_OUTBOUND_SELECT_SECRET_NULL ( 1 << 5 ) /* disable #define NTDSDSA_OPT_GENERATE_OWN_TOPO ( 1 << 5 ) /* create own site topo
null'ing of secrets */ logy */
#define NTDSDSA_OPT_DISABLE_OUTBOUND_REPL_OBJ ( 1 << 6 ) /* disable outbound
replication */
#define NTDSDSA_OPT_DISABLE_OUTBOUND_REPL_SECRET ( 1 << 7 ) /* disable outbo
und replication */
// Bit flags for options attribute on NTDS-Connection objects. // Bit flags for options attribute on NTDS-Connection objects.
// //
// The reasons that two bits are required to control notification are as follows . // The reasons that two bits are required to control notification are as follows .
// We must support existing connections with the old behavior and the UI does no t // We must support existing connections with the old behavior and the UI does no t
// create manual connections with the new bit set. // create manual connections with the new bit set.
// The default for existing and manually created connections with bits 2 and 3 // The default for existing and manually created connections with bits 2 and 3
// clear must be the standard prior behavior: notification for intra-site and // clear must be the standard prior behavior: notification for intra-site and
// no notification for inter-site. // no notification for inter-site.
// We need a way to distinguish a old connection which desires the default // We need a way to distinguish a old connection which desires the default
skipping to change at line 867 skipping to change at line 869
// //
// DsBind will attempt to find a domain controller for the domain // DsBind will attempt to find a domain controller for the domain
// identified by DnsDomainName and fail if one can not be found. // identified by DnsDomainName and fail if one can not be found.
// //
// Mutual authentication will be performed using an SPN of // Mutual authentication will be performed using an SPN of
// LDAP/DnsHostName/DnsDomainName where DnsDomainName is that // LDAP/DnsHostName/DnsDomainName where DnsDomainName is that
// provided by the caller and DnsHostName is that returned by // provided by the caller and DnsHostName is that returned by
// DsGetDcName for the domain specified - provided DnsDomainName // DsGetDcName for the domain specified - provided DnsDomainName
// is a valid DNS domain name - i.e. not a NETBIOS domain name. // is a valid DNS domain name - i.e. not a NETBIOS domain name.
__checkReturn
NTDSAPI NTDSAPI
DWORD DWORD
WINAPI WINAPI
DsBindW( DsBindW(
LPCWSTR DomainControllerName, // in, optional __in_opt LPCWSTR DomainControllerName, // in, optional
LPCWSTR DnsDomainName, // in, optional __in_opt LPCWSTR DnsDomainName, // in, optional
HANDLE *phDS); __out HANDLE *phDS);
__checkReturn
NTDSAPI NTDSAPI
DWORD DWORD
WINAPI WINAPI
DsBindA( DsBindA(
LPCSTR DomainControllerName, // in, optional __in_opt LPCSTR DomainControllerName, // in, optional
LPCSTR DnsDomainName, // in, optional __in_opt LPCSTR DnsDomainName, // in, optional
HANDLE *phDS); __out HANDLE *phDS);
#ifdef UNICODE #ifdef UNICODE
#define DsBind DsBindW #define DsBind DsBindW
#else #else
#define DsBind DsBindA #define DsBind DsBindA
#endif #endif
__checkReturn
NTDSAPI NTDSAPI
DWORD DWORD
WINAPI WINAPI
DsBindWithCredW( DsBindWithCredW(
LPCWSTR DomainControllerName, // in, optional __in_opt LPCWSTR DomainControllerName, // in, optional
LPCWSTR DnsDomainName, // in, optional __in_opt LPCWSTR DnsDomainName, // in, optional
RPC_AUTH_IDENTITY_HANDLE AuthIdentity, // in, optional __in_opt RPC_AUTH_IDENTITY_HANDLE AuthIdentity, // in, optional
HANDLE *phDS); __out HANDLE *phDS);
__checkReturn
NTDSAPI NTDSAPI
DWORD DWORD
WINAPI WINAPI
DsBindWithCredA( DsBindWithCredA(
LPCSTR DomainControllerName, // in, optional __in_opt LPCSTR DomainControllerName, // in, optional
LPCSTR DnsDomainName, // in, optional __in_opt LPCSTR DnsDomainName, // in, optional
RPC_AUTH_IDENTITY_HANDLE AuthIdentity, // in, optional __in_opt RPC_AUTH_IDENTITY_HANDLE AuthIdentity, // in, optional
HANDLE *phDS); __out HANDLE *phDS);
#ifdef UNICODE #ifdef UNICODE
#define DsBindWithCred DsBindWithCredW #define DsBindWithCred DsBindWithCredW
#else #else
#define DsBindWithCred DsBindWithCredA #define DsBindWithCred DsBindWithCredA
#endif #endif
// //
// DsBindWithSpn{A|W} allows the caller to specify the service principal // DsBindWithSpn{A|W} allows the caller to specify the service principal
// name (SPN) which will be used for mutual authentication against // name (SPN) which will be used for mutual authentication against
// the destination server. Do not provide an SPN if you are expecting // the destination server. Do not provide an SPN if you are expecting
// DsBind to find a server for you as SPNs are machine specific and its // DsBind to find a server for you as SPNs are machine specific and its
// unlikely the SPN you provide matches the server DsBind finds for you. // unlikely the SPN you provide matches the server DsBind finds for you.
// Providing a NULL ServicePrincipalName argument results in behavior // Providing a NULL ServicePrincipalName argument results in behavior
// identical to DsBindWithCred{A|W}. // identical to DsBindWithCred{A|W}.
// //
__checkReturn
NTDSAPI NTDSAPI
DWORD DWORD
WINAPI WINAPI
DsBindWithSpnW( DsBindWithSpnW(
LPCWSTR DomainControllerName, // in, optional __in_opt LPCWSTR DomainControllerName, // in, optional
LPCWSTR DnsDomainName, // in, optional __in_opt LPCWSTR DnsDomainName, // in, optional
RPC_AUTH_IDENTITY_HANDLE AuthIdentity, // in, optional __in_opt RPC_AUTH_IDENTITY_HANDLE AuthIdentity, // in, optional
LPCWSTR ServicePrincipalName, // in, optional __in_opt LPCWSTR ServicePrincipalName, // in, optional
HANDLE *phDS); __out HANDLE *phDS);
__checkReturn
NTDSAPI NTDSAPI
DWORD DWORD
WINAPI WINAPI
DsBindWithSpnA( DsBindWithSpnA(
LPCSTR DomainControllerName, // in, optional __in_opt LPCSTR DomainControllerName, // in, optional
LPCSTR DnsDomainName, // in, optional __in_opt LPCSTR DnsDomainName, // in, optional
RPC_AUTH_IDENTITY_HANDLE AuthIdentity, // in, optional __in_opt RPC_AUTH_IDENTITY_HANDLE AuthIdentity, // in, optional
LPCSTR ServicePrincipalName, // in, optional __in_opt LPCSTR ServicePrincipalName, // in, optional
HANDLE *phDS); __out HANDLE *phDS);
#ifdef UNICODE #ifdef UNICODE
#define DsBindWithSpn DsBindWithSpnW #define DsBindWithSpn DsBindWithSpnW
#else #else
#define DsBindWithSpn DsBindWithSpnA #define DsBindWithSpn DsBindWithSpnA
#endif #endif
// //
// DsBindWithSpnEx{A|W} allows you all the options of the previous // DsBindWithSpnEx{A|W} allows you all the options of the previous
// DsBindWithSpn(), plus the added benefit of specifying some optional // DsBindWithSpn(), plus the added benefit of specifying some optional
// Binding flags. Currently if you pass NTDSAPI_BIND_ALLOW_DELEGATION, // Binding flags. Currently if you pass NTDSAPI_BIND_ALLOW_DELEGATION,
// you will get the exact old behaviour. If you can avoid it, you // you will get the exact old behaviour. If you can avoid it, you
// should not specify this flag, see flag above for details. // should not specify this flag, see flag above for details.
// //
__checkReturn
NTDSAPI_POSTXP NTDSAPI_POSTXP
DWORD DWORD
WINAPI WINAPI
DsBindWithSpnExW( DsBindWithSpnExW(
__in LPCWSTR DomainControllerName, // in, optional __in_opt LPCWSTR DomainControllerName, // in, optional
__in LPCWSTR DnsDomainName, // in, optional __in_opt LPCWSTR DnsDomainName, // in, optional
RPC_AUTH_IDENTITY_HANDLE AuthIdentity, // in, optional __in_opt RPC_AUTH_IDENTITY_HANDLE AuthIdentity, // in, optional
__in LPCWSTR ServicePrincipalName, // in, optional __in_opt LPCWSTR ServicePrincipalName, // in, optional
DWORD BindFlags, // in, optional __in_opt DWORD BindFlags, // in, optional
HANDLE *phDS); __out HANDLE *phDS);
__checkReturn
NTDSAPI_POSTXP NTDSAPI_POSTXP
DWORD DWORD
WINAPI WINAPI
DsBindWithSpnExA( DsBindWithSpnExA(
__in LPCSTR DomainControllerName, // in, optional __in_opt LPCSTR DomainControllerName, // in, optional
__in LPCSTR DnsDomainName, // in, optional __in_opt LPCSTR DnsDomainName, // in, optional
RPC_AUTH_IDENTITY_HANDLE AuthIdentity, // in, optional __in_opt RPC_AUTH_IDENTITY_HANDLE AuthIdentity, // in, optional
__in LPCSTR ServicePrincipalName, // in, optional __in_opt LPCSTR ServicePrincipalName, // in, optional
DWORD BindFlags, // in, optional __in_opt DWORD BindFlags, // in, optional
HANDLE *phDS); __out HANDLE *phDS);
#ifdef UNICODE #ifdef UNICODE
#define DsBindWithSpnEx DsBindWithSpnExW #define DsBindWithSpnEx DsBindWithSpnExW
#else #else
#define DsBindWithSpnEx DsBindWithSpnExA #define DsBindWithSpnEx DsBindWithSpnExA
#endif #endif
// //
// DsBindByInstance{A|W} Allows the explicit binding to any AD/AM // DsBindByInstance{A|W} Allows the explicit binding to any AD/AM
// or AD instance by Annotation or InstanceGuid. For binding to // or AD instance by Annotation or InstanceGuid. For binding to
// an AD instance the Annotation and InstanceGuid can be left NULL. // an AD instance the Annotation and InstanceGuid can be left NULL.
// To Bind to an AD/AM instance one or the other must be specified // To Bind to an AD/AM instance one or the other must be specified
// to specify the AD/AM instance desired. // to specify the AD/AM instance desired.
// //
__checkReturn
NTDSAPI_POSTXP NTDSAPI_POSTXP
DWORD DWORD
WINAPI WINAPI
DsBindByInstanceW( DsBindByInstanceW(
LPCWSTR ServerName, // in, optional __in_opt LPCWSTR ServerName, // in, optional
LPCWSTR Annotation, // in, optional __in_opt LPCWSTR Annotation, // in, optional
GUID * InstanceGuid, // in, optional __in_opt GUID * InstanceGuid, // in, optional
LPCWSTR DnsDomainName, // in, optional __in_opt LPCWSTR DnsDomainName, // in, optional
RPC_AUTH_IDENTITY_HANDLE AuthIdentity, // in, optional __in_opt RPC_AUTH_IDENTITY_HANDLE AuthIdentity, // in, optional
LPCWSTR ServicePrincipalName, // in, optional __in_opt LPCWSTR ServicePrincipalName, // in, optional
DWORD BindFlags, // in, optional __in_opt DWORD BindFlags, // in, optional
HANDLE *phDS); __out HANDLE *phDS);
__checkReturn
NTDSAPI_POSTXP NTDSAPI_POSTXP
DWORD DWORD
WINAPI WINAPI
DsBindByInstanceA( DsBindByInstanceA(
LPCSTR ServerName, // in, optional __in_opt LPCSTR ServerName, // in, optional
LPCSTR Annotation, // in, optional __in_opt LPCSTR Annotation, // in, optional
GUID * InstanceGuid, // in, optional __in_opt GUID * InstanceGuid, // in, optional
LPCSTR DnsDomainName, // in, optional __in_opt LPCSTR DnsDomainName, // in, optional
RPC_AUTH_IDENTITY_HANDLE AuthIdentity, // in, optional __in_opt RPC_AUTH_IDENTITY_HANDLE AuthIdentity, // in, optional
LPCSTR ServicePrincipalName, // in, optional __in_opt LPCSTR ServicePrincipalName, // in, optional
DWORD BindFlags, // in, optional __in_opt DWORD BindFlags, // in, optional
HANDLE *phDS); __out HANDLE *phDS);
#ifdef UNICODE #ifdef UNICODE
#define DsBindByInstance DsBindByInstanceW #define DsBindByInstance DsBindByInstanceW
#else #else
#define DsBindByInstance DsBindByInstanceA #define DsBindByInstance DsBindByInstanceA
#endif #endif
// //
// DsBindToISTG{A|W} allows the caller to bind to the server which // DsBindToISTG{A|W} allows the caller to bind to the server which
// holds the Inter-Site Topology Generator role in the specified site. // holds the Inter-Site Topology Generator role in the specified site.
// The site name should be the RDN of a site. If no site is specified, // The site name should be the RDN of a site. If no site is specified,
// the function will try to bind to the ISTG in a nearby site. // the function will try to bind to the ISTG in a nearby site.
// //
__checkReturn
NTDSAPI_POSTXP NTDSAPI_POSTXP
DWORD DWORD
WINAPI WINAPI
DsBindToISTGW( DsBindToISTGW(
LPCWSTR SiteName, // in, optional __in_opt LPCWSTR SiteName, // in, optional
HANDLE *phDS); __out HANDLE *phDS);
__checkReturn
NTDSAPI_POSTXP NTDSAPI_POSTXP
DWORD DWORD
WINAPI WINAPI
DsBindToISTGA( DsBindToISTGA(
LPCSTR SiteName, // in, optional __in_opt LPCSTR SiteName, // in, optional
HANDLE *phDS); __out HANDLE *phDS);
#ifdef UNICODE #ifdef UNICODE
#define DsBindToISTG DsBindToISTGW #define DsBindToISTG DsBindToISTGW
#else #else
#define DsBindToISTG DsBindToISTGA #define DsBindToISTG DsBindToISTGA
#endif #endif
// //
// DsBindingSetTimeout allows the caller to specify a timeout value // DsBindingSetTimeout allows the caller to specify a timeout value
// which will be honored by all RPC calls using the specified binding // which will be honored by all RPC calls using the specified binding
// handle. RPC calls which take longer the timeout value are canceled. // handle. RPC calls which take longer the timeout value are canceled.
// //
__checkReturn
NTDSAPI_POSTXP NTDSAPI_POSTXP
DWORD DWORD
WINAPI WINAPI
DsBindingSetTimeout( DsBindingSetTimeout(
HANDLE hDS, // in __in HANDLE hDS, // in
ULONG cTimeoutSecs // in __in ULONG cTimeoutSecs // in
); );
// //
// DsUnBind // DsUnBind
// //
NTDSAPI NTDSAPI
DWORD DWORD
WINAPI WINAPI
DsUnBindW( DsUnBindW(
HANDLE *phDS); // in __in HANDLE *phDS); // in
NTDSAPI NTDSAPI
DWORD DWORD
WINAPI WINAPI
DsUnBindA( DsUnBindA(
HANDLE *phDS); // in __in HANDLE *phDS); // in
#ifdef UNICODE #ifdef UNICODE
#define DsUnBind DsUnBindW #define DsUnBind DsUnBindW
#else #else
#define DsUnBind DsUnBindA #define DsUnBind DsUnBindA
#endif #endif
// //
// DsMakePasswordCredentials // DsMakePasswordCredentials
// //
// This function constructs a credential structure which is suitable for input // This function constructs a credential structure which is suitable for input
// to the DsBindWithCredentials function, or the ldap_open function (winldap.h) // to the DsBindWithCredentials function, or the ldap_open function (winldap.h)
// The credential must be freed using DsFreeCredential. // The credential must be freed using DsFreeCredential.
// //
// None of the input parameters may be present indicating a null, default // None of the input parameters may be present indicating a null, default
// credential. Otherwise the username must be present. If the domain or // credential. Otherwise the username must be present. If the domain or
// password are null, they default to empty strings. The domain name may be // password are null, they default to empty strings. The domain name may be
// null when the username is fully qualified, for example UPN format. // null when the username is fully qualified, for example UPN format.
// //
__checkReturn
NTDSAPI NTDSAPI
DWORD DWORD
WINAPI WINAPI
DsMakePasswordCredentialsW( DsMakePasswordCredentialsW(
LPCWSTR User, __in_opt LPCWSTR User,
LPCWSTR Domain, __in_opt LPCWSTR Domain,
LPCWSTR Password, __in_opt LPCWSTR Password,
RPC_AUTH_IDENTITY_HANDLE *pAuthIdentity __out RPC_AUTH_IDENTITY_HANDLE *pAuthIdentity
); );
__checkReturn
NTDSAPI NTDSAPI
DWORD DWORD
WINAPI WINAPI
DsMakePasswordCredentialsA( DsMakePasswordCredentialsA(
LPCSTR User, __in_opt LPCSTR User,
LPCSTR Domain, __in_opt LPCSTR Domain,
LPCSTR Password, __in_opt LPCSTR Password,
RPC_AUTH_IDENTITY_HANDLE *pAuthIdentity __out RPC_AUTH_IDENTITY_HANDLE *pAuthIdentity
); );
#ifdef UNICODE #ifdef UNICODE
#define DsMakePasswordCredentials DsMakePasswordCredentialsW #define DsMakePasswordCredentials DsMakePasswordCredentialsW
#else #else
#define DsMakePasswordCredentials DsMakePasswordCredentialsA #define DsMakePasswordCredentials DsMakePasswordCredentialsA
#endif #endif
NTDSAPI NTDSAPI
VOID VOID
WINAPI WINAPI
DsFreePasswordCredentials( DsFreePasswordCredentials(
RPC_AUTH_IDENTITY_HANDLE AuthIdentity __in RPC_AUTH_IDENTITY_HANDLE AuthIdentity
); );
#define DsFreePasswordCredentialsW DsFreePasswordCredentials #define DsFreePasswordCredentialsW DsFreePasswordCredentials
#define DsFreePasswordCredentialsA DsFreePasswordCredentials #define DsFreePasswordCredentialsA DsFreePasswordCredentials
// //
// DsCrackNames // DsCrackNames
// //
__checkReturn
NTDSAPI NTDSAPI
DWORD DWORD
WINAPI WINAPI
DsCrackNamesW( DsCrackNamesW(
HANDLE hDS, // in __in_opt HANDLE hDS, // in
DS_NAME_FLAGS flags, // in __in DS_NAME_FLAGS flags, // in
DS_NAME_FORMAT formatOffered, // in __in DS_NAME_FORMAT formatOffered, // in
DS_NAME_FORMAT formatDesired, // in __in DS_NAME_FORMAT formatDesired, // in
DWORD cNames, // in __in DWORD cNames, // in
const LPCWSTR *rpNames, // in __in_ecount(cNames) const LPCWSTR *rpNames, // in
PDS_NAME_RESULTW *ppResult); // out __deref_out PDS_NAME_RESULTW *ppResult); // out
__checkReturn
NTDSAPI NTDSAPI
DWORD DWORD
WINAPI WINAPI
DsCrackNamesA( DsCrackNamesA(
HANDLE hDS, // in __in_opt HANDLE hDS, // in
DS_NAME_FLAGS flags, // in __in DS_NAME_FLAGS flags, // in
DS_NAME_FORMAT formatOffered, // in __in DS_NAME_FORMAT formatOffered, // in
DS_NAME_FORMAT formatDesired, // in __in DS_NAME_FORMAT formatDesired, // in
DWORD cNames, // in __in DWORD cNames, // in
const LPCSTR *rpNames, // in __in_ecount(cNames) const LPCSTR *rpNames, // in
PDS_NAME_RESULTA *ppResult); // out __deref_out PDS_NAME_RESULTA *ppResult); // out
#ifdef UNICODE #ifdef UNICODE
#define DsCrackNames DsCrackNamesW #define DsCrackNames DsCrackNamesW
#else #else
#define DsCrackNames DsCrackNamesA #define DsCrackNames DsCrackNamesA
#endif #endif
// //
// DsFreeNameResult // DsFreeNameResult
// //
NTDSAPI NTDSAPI
void void
WINAPI WINAPI
DsFreeNameResultW( DsFreeNameResultW(
DS_NAME_RESULTW *pResult); // in __in DS_NAME_RESULTW *pResult); // in
NTDSAPI NTDSAPI
void void
WINAPI WINAPI
DsFreeNameResultA( DsFreeNameResultA(
DS_NAME_RESULTA *pResult); // in __in DS_NAME_RESULTA *pResult); // in
#ifdef UNICODE #ifdef UNICODE
#define DsFreeNameResult DsFreeNameResultW #define DsFreeNameResult DsFreeNameResultW
#else #else
#define DsFreeNameResult DsFreeNameResultA #define DsFreeNameResult DsFreeNameResultA
#endif #endif
// ========================================================== // ==========================================================
// DSMakeSpn -- client call to create SPN for a service to which it wants to // DSMakeSpn -- client call to create SPN for a service to which it wants to
// authenticate. // authenticate.
skipping to change at line 1239 skipping to change at line 1258
// pcSpnLength - in -- max length IN CHARACTERS of principal name; // pcSpnLength - in -- max length IN CHARACTERS of principal name;
// out -- actual // out -- actual
// Length includes terminator // Length includes terminator
// pszSPN - server principal name // pszSPN - server principal name
// //
// If buffer is not large enough, ERROR_BUFFER_OVERFLOW is returned and the // If buffer is not large enough, ERROR_BUFFER_OVERFLOW is returned and the
// needed length is returned in pcSpnLength. // needed length is returned in pcSpnLength.
// //
// //
__checkReturn
NTDSAPI NTDSAPI
DWORD DWORD
WINAPI WINAPI
DsMakeSpnW( DsMakeSpnW(
__in IN LPCWSTR ServiceClass, __in LPCWSTR ServiceClass,
__in IN LPCWSTR ServiceName, __in LPCWSTR ServiceName,
__in_opt IN LPCWSTR InstanceName, __in_opt LPCWSTR InstanceName,
IN USHORT InstancePort, __in USHORT InstancePort,
__in_opt IN LPCWSTR Referrer, __in_opt LPCWSTR Referrer,
IN OUT DWORD *pcSpnLength, __inout DWORD *pcSpnLength,
__out_ecount_part (*pcSpnLength, *pcSpnLength) OUT LPWSTR pszSpn __out_ecount_part_opt(*pcSpnLength, *pcSpnLength) LPWSTR pszSpn
); );
__checkReturn
NTDSAPI NTDSAPI
DWORD DWORD
WINAPI WINAPI
DsMakeSpnA( DsMakeSpnA(
__in IN LPCSTR ServiceClass, __in LPCSTR ServiceClass,
__in IN LPCSTR ServiceName, __in LPCSTR ServiceName,
__in_opt IN LPCSTR InstanceName, __in_opt LPCSTR InstanceName,
IN USHORT InstancePort, __in USHORT InstancePort,
__in_opt IN LPCSTR Referrer, __in_opt LPCSTR Referrer,
IN OUT DWORD *pcSpnLength, __inout DWORD *pcSpnLength,
__out_ecount_part (*pcSpnLength, *pcSpnLength) OUT LPSTR pszSpn __out_ecount_part (*pcSpnLength, *pcSpnLength) LPSTR pszSpn
); );
#ifdef UNICODE #ifdef UNICODE
#define DsMakeSpn DsMakeSpnW #define DsMakeSpn DsMakeSpnW
#else #else
#define DsMakeSpn DsMakeSpnA #define DsMakeSpn DsMakeSpnA
#endif #endif
// ========================================================== // ==========================================================
// DsGetSPN -- server's call to gets SPNs for a service name by which it is // DsGetSPN -- server's call to gets SPNs for a service name by which it is
skipping to change at line 1294 skipping to change at line 1315
// IN USHORT cInstanceNames, // IN USHORT cInstanceNames,
// count of extra instance names and ports (0=>use gethostbyname) // count of extra instance names and ports (0=>use gethostbyname)
// IN LPCTSTR InstanceNames[] OPTIONAL, // IN LPCTSTR InstanceNames[] OPTIONAL,
// extra instance names (not used for host names) // extra instance names (not used for host names)
// IN USHORT InstancePorts[] OPTIONAL, // IN USHORT InstancePorts[] OPTIONAL,
// extra instance ports (0 => default) // extra instance ports (0 => default)
// IN OUT PULONG pcSpn, // count of SPNs // IN OUT PULONG pcSpn, // count of SPNs
// IN OUT LPTSTR * prpszSPN[] // IN OUT LPTSTR * prpszSPN[]
// a bunch of SPNs for this service; free with DsFreeSpnArray // a bunch of SPNs for this service; free with DsFreeSpnArray
__checkReturn
NTDSAPI NTDSAPI
DWORD DWORD
WINAPI WINAPI
DsGetSpnA( DsGetSpnA(
IN DS_SPN_NAME_TYPE ServiceType, __in DS_SPN_NAME_TYPE ServiceType,
IN LPCSTR ServiceClass, __in LPCSTR ServiceClass,
IN LPCSTR ServiceName, __in_opt LPCSTR ServiceName,
IN USHORT InstancePort, __in USHORT InstancePort,
IN USHORT cInstanceNames, __in USHORT cInstanceNames,
IN LPCSTR *pInstanceNames, __in_ecount_opt(cInstanceNames) LPCSTR *pInstanceNames,
IN const USHORT *pInstancePorts, __in_opt const USHORT *pInstancePorts,
OUT DWORD *pcSpn, __out DWORD *pcSpn,
__deref_out_ecount (*pcSpn) OUT LPSTR **prpszSpn __deref_out_ecount (*pcSpn) LPSTR **prpszSpn
); );
__checkReturn
NTDSAPI NTDSAPI
DWORD DWORD
WINAPI WINAPI
DsGetSpnW( DsGetSpnW(
IN DS_SPN_NAME_TYPE ServiceType, __in DS_SPN_NAME_TYPE ServiceType,
IN LPCWSTR ServiceClass, __in LPCWSTR ServiceClass,
IN LPCWSTR ServiceName, __in LPCWSTR ServiceName,
IN USHORT InstancePort, __in USHORT InstancePort,
IN USHORT cInstanceNames, __in USHORT cInstanceNames,
IN LPCWSTR *pInstanceNames, __in_ecount(cInstanceNames) LPCWSTR *pInstanceNames,
IN const USHORT *pInstancePorts, __in_opt const USHORT *pInstancePorts,
OUT DWORD *pcSpn, __out DWORD *pcSpn,
__deref_out_ecount(*pcSpn) OUT LPWSTR **prpszSpn __deref_out_ecount(*pcSpn) LPWSTR **prpszSpn
); );
#ifdef UNICODE #ifdef UNICODE
#define DsGetSpn DsGetSpnW #define DsGetSpn DsGetSpnW
#else #else
#define DsGetSpn DsGetSpnA #define DsGetSpn DsGetSpnA
#endif #endif
// ========================================================== // ==========================================================
// DsFreeSpnArray() -- Free array returned by DsGetSpn{A,W} // DsFreeSpnArray() -- Free array returned by DsGetSpn{A,W}
NTDSAPI NTDSAPI
void void
WINAPI WINAPI
DsFreeSpnArrayA( DsFreeSpnArrayA(
__in IN DWORD cSpn, __in DWORD cSpn,
__deref_out_ecount(cSpn) IN OUT LPSTR *rpszSpn __deref_in_ecount(cSpn) LPSTR *rpszSpn
); );
NTDSAPI NTDSAPI
void void
WINAPI WINAPI
DsFreeSpnArrayW( DsFreeSpnArrayW(
__in DWORD cSpn, __in DWORD cSpn,
__deref_out_ecount_part(cSpn,0) LPWSTR *rpszSpn __deref_inout_ecount(cSpn) LPWSTR *rpszSpn
); );
#ifdef UNICODE #ifdef UNICODE
#define DsFreeSpnArray DsFreeSpnArrayW #define DsFreeSpnArray DsFreeSpnArrayW
#else #else
#define DsFreeSpnArray DsFreeSpnArrayA #define DsFreeSpnArray DsFreeSpnArrayA
#endif #endif
// ========================================================== // ==========================================================
// DsCrackSpn() -- parse an SPN into the ServiceClass, // DsCrackSpn() -- parse an SPN into the ServiceClass,
skipping to change at line 1381 skipping to change at line 1404
// OUT LPCTSTR ServiceName, // the ServiceName part of the SPN // OUT LPCTSTR ServiceName, // the ServiceName part of the SPN
// IN OUT PUSHORT pcInstance, // input -- max length of ServiceClass; // IN OUT PUSHORT pcInstance, // input -- max length of ServiceClass;
// output -- actual length // output -- actual length
// OUT LPCTSTR InstanceName, // the InstanceName part of the SPN // OUT LPCTSTR InstanceName, // the InstanceName part of the SPN
// OUT PUSHORT InstancePort // instance port // OUT PUSHORT InstancePort // instance port
// //
// Note: lengths are in characters; all string lengths include terminators // Note: lengths are in characters; all string lengths include terminators
// All arguments except pszSpn are optional. // All arguments except pszSpn are optional.
// //
__checkReturn
NTDSAPI NTDSAPI
DWORD DWORD
WINAPI WINAPI
DsCrackSpnA( DsCrackSpnA(
__in IN LPCSTR pszSpn, __in LPCSTR pszSpn,
IN OUT LPDWORD pcServiceClass, __inout_opt LPDWORD pcServiceClass,
__out_ecount_part (*pcServiceClass, *pcServiceClass) OUT LPSTR ServiceClass, __out_ecount_part_opt (*pcServiceClass, *pcServiceClass) LPSTR ServiceClass,
IN OUT LPDWORD pcServiceName, __inout_opt LPDWORD pcServiceName,
__out_ecount_part_opt (*pcServiceName, *pcServiceName) OUT LPSTR ServiceName __out_ecount_part_opt (*pcServiceName, *pcServiceName) LPSTR ServiceName,
, __inout_opt LPDWORD pcInstanceName,
IN OUT LPDWORD pcInstanceName, __out_ecount_part_opt (*pcInstanceName, *pcInstanceName) LPSTR InstanceName,
__out_ecount_part_opt (*pcInstanceName, *pcInstanceName) OUT LPSTR InstanceN __out_opt USHORT *pInstancePort
ame,
OUT USHORT *pInstancePort
); );
__checkReturn
NTDSAPI NTDSAPI
DWORD DWORD
WINAPI WINAPI
DsCrackSpnW( DsCrackSpnW(
__in IN LPCWSTR pszSpn, __in LPCWSTR pszSpn,
IN OUT DWORD *pcServiceClass, __inout_opt DWORD *pcServiceClass,
__out_ecount_part (*pcServiceClass, *pcServiceClass) OUT LPWSTR ServiceClass __out_ecount_part_opt (*pcServiceClass, *pcServiceClass) LPWSTR ServiceClass
, ,
IN OUT DWORD *pcServiceName, __inout_opt DWORD *pcServiceName,
__out_ecount_part_opt (*pcServiceName, *pcServiceName) OUT LPWSTR ServiceNam __out_ecount_part_opt (*pcServiceName, *pcServiceName) LPWSTR ServiceName,
e, __inout_opt DWORD *pcInstanceName,
IN OUT DWORD *pcInstanceName, __out_ecount_part_opt (*pcInstanceName, *pcInstanceName) LPWSTR InstanceName
__out_ecount_part_opt (*pcInstanceName, *pcInstanceName) OUT LPWSTR Instance ,
Name, __out_opt USHORT *pInstancePort
OUT USHORT *pInstancePort
); );
#ifdef UNICODE #ifdef UNICODE
#define DsCrackSpn DsCrackSpnW #define DsCrackSpn DsCrackSpnW
#else #else
#define DsCrackSpn DsCrackSpnA #define DsCrackSpn DsCrackSpnA
#endif #endif
// ========================================================== // ==========================================================
// DsWriteAccountSpn -- set or add SPNs for an account object // DsWriteAccountSpn -- set or add SPNs for an account object
skipping to change at line 1435 skipping to change at line 1460
// //
// If called by the service to register itself, it can most easily get // If called by the service to register itself, it can most easily get
// the names by calling DsGetSpn with each of the names that // the names by calling DsGetSpn with each of the names that
// clients can use to find the service. // clients can use to find the service.
// //
// IN SpnWriteOp eOp, // set, add // IN SpnWriteOp eOp, // set, add
// IN LPCTSTR pszAccount, // DN of account to which to add SPN // IN LPCTSTR pszAccount, // DN of account to which to add SPN
// IN int cSPN, // count of SPNs to add to account // IN int cSPN, // count of SPNs to add to account
// IN LPCTSTR rpszSPN[] // SPNs to add to altSecID property // IN LPCTSTR rpszSPN[] // SPNs to add to altSecID property
__checkReturn
NTDSAPI NTDSAPI
DWORD DWORD
WINAPI WINAPI
DsWriteAccountSpnA( DsWriteAccountSpnA(
IN HANDLE hDS, __in HANDLE hDS,
IN DS_SPN_WRITE_OP Operation, __in DS_SPN_WRITE_OP Operation,
IN LPCSTR pszAccount, __in LPCSTR pszAccount,
IN DWORD cSpn, __in DWORD cSpn,
IN LPCSTR *rpszSpn __in_ecount(cSpn) LPCSTR *rpszSpn
); );
__checkReturn
NTDSAPI NTDSAPI
DWORD DWORD
WINAPI WINAPI
DsWriteAccountSpnW( DsWriteAccountSpnW(
IN HANDLE hDS, __in HANDLE hDS,
IN DS_SPN_WRITE_OP Operation, __in DS_SPN_WRITE_OP Operation,
IN LPCWSTR pszAccount, __in LPCWSTR pszAccount,
IN DWORD cSpn, __in DWORD cSpn,
IN LPCWSTR *rpszSpn __in_ecount(cSpn) LPCWSTR *rpszSpn
); );
#ifdef UNICODE #ifdef UNICODE
#define DsWriteAccountSpn DsWriteAccountSpnW #define DsWriteAccountSpn DsWriteAccountSpnW
#else #else
#define DsWriteAccountSpn DsWriteAccountSpnA #define DsWriteAccountSpn DsWriteAccountSpnA
#endif #endif
/*++ /*++
skipping to change at line 1505 skipping to change at line 1532
OUT, space utilized, in chars, including terminator OUT, space utilized, in chars, including terminator
pszSpn - Buffer, atleast of length *pcSpnLength pszSpn - Buffer, atleast of length *pcSpnLength
Return Value: Return Value:
WINAPI - Win32 error code WINAPI - Win32 error code
--*/ --*/
__checkReturn
NTDSAPI NTDSAPI
DWORD DWORD
WINAPI WINAPI
DsClientMakeSpnForTargetServerW( DsClientMakeSpnForTargetServerW(
__in IN LPCWSTR ServiceClass, __in LPCWSTR ServiceClass,
__in IN LPCWSTR ServiceName, __in LPCWSTR ServiceName,
IN OUT DWORD *pcSpnLength, __inout DWORD *pcSpnLength,
__out_ecount_part (*pcSpnLength, *pcSpnLength) OUT LPWSTR pszSpn __out_ecount_part (*pcSpnLength, *pcSpnLength) LPWSTR pszSpn
); );
__checkReturn
NTDSAPI NTDSAPI
DWORD DWORD
WINAPI WINAPI
DsClientMakeSpnForTargetServerA( DsClientMakeSpnForTargetServerA(
IN LPCSTR ServiceClass, __in LPCSTR ServiceClass,
IN LPCSTR ServiceName, __in LPCSTR ServiceName,
IN OUT DWORD *pcSpnLength, __inout DWORD *pcSpnLength,
__out_ecount_part(*pcSpnLength, *pcSpnLength) OUT LPSTR pszSpn __out_ecount_part(*pcSpnLength, *pcSpnLength) LPSTR pszSpn
); );
#ifdef UNICODE #ifdef UNICODE
#define DsClientMakeSpnForTargetServer DsClientMakeSpnForTargetServerW #define DsClientMakeSpnForTargetServer DsClientMakeSpnForTargetServerW
#else #else
#define DsClientMakeSpnForTargetServer DsClientMakeSpnForTargetServerA #define DsClientMakeSpnForTargetServer DsClientMakeSpnForTargetServerA
#endif #endif
/*++ /*++
skipping to change at line 1569 skipping to change at line 1598
Operation - What should be done with the values: add, replace or delete Operation - What should be done with the values: add, replace or delete
ServiceClass - Unique string identifying service ServiceClass - Unique string identifying service
UserObjectDN - Optional, dn of object to write SPN to UserObjectDN - Optional, dn of object to write SPN to
Return Value: Return Value:
WINAPI - Win32 error code WINAPI - Win32 error code
--*/ --*/
__checkReturn
NTDSAPI NTDSAPI
DWORD DWORD
WINAPI WINAPI
DsServerRegisterSpnA( DsServerRegisterSpnA(
IN DS_SPN_WRITE_OP Operation, DS_SPN_WRITE_OP Operation,
IN LPCSTR ServiceClass, __in LPCSTR ServiceClass,
IN LPCSTR UserObjectDN __in_opt LPCSTR UserObjectDN
); );
__checkReturn
NTDSAPI NTDSAPI
DWORD DWORD
WINAPI WINAPI
DsServerRegisterSpnW( DsServerRegisterSpnW(
IN DS_SPN_WRITE_OP Operation, DS_SPN_WRITE_OP Operation,
IN LPCWSTR ServiceClass, __in LPCWSTR ServiceClass,
IN LPCWSTR UserObjectDN __in_opt LPCWSTR UserObjectDN
); );
#ifdef UNICODE #ifdef UNICODE
#define DsServerRegisterSpn DsServerRegisterSpnW #define DsServerRegisterSpn DsServerRegisterSpnW
#else #else
#define DsServerRegisterSpn DsServerRegisterSpnA #define DsServerRegisterSpn DsServerRegisterSpnA
#endif #endif
// DsReplicaSync. The server that this call is executing on is called the // DsReplicaSync. The server that this call is executing on is called the
// destination. The destination's naming context will be brought up to date // destination. The destination's naming context will be brought up to date
skipping to change at line 1610 skipping to change at line 1641
// //
// PARAMETERS: // PARAMETERS:
// pNC (DSNAME *) // pNC (DSNAME *)
// Name of the NC to synchronize. // Name of the NC to synchronize.
// puuidSourceDRA (SZ) // puuidSourceDRA (SZ)
// objectGuid of DSA with which to synchronize the replica. // objectGuid of DSA with which to synchronize the replica.
// ulOptions (ULONG) // ulOptions (ULONG)
// Bitwise OR of zero or more flags // Bitwise OR of zero or more flags
// RETURNS: WIN32 STATUS // RETURNS: WIN32 STATUS
__checkReturn
NTDSAPI NTDSAPI
DWORD DWORD
WINAPI WINAPI
DsReplicaSyncA( DsReplicaSyncA(
IN HANDLE hDS, __in HANDLE hDS,
IN LPCSTR NameContext, __in LPCSTR NameContext,
IN const UUID *pUuidDsaSrc, __in const UUID *pUuidDsaSrc,
IN ULONG Options ULONG Options
); );
__checkReturn
NTDSAPI NTDSAPI
DWORD DWORD
WINAPI WINAPI
DsReplicaSyncW( DsReplicaSyncW(
IN HANDLE hDS, __in HANDLE hDS,
IN LPCWSTR NameContext, __in LPCWSTR NameContext,
IN const UUID *pUuidDsaSrc, __in const UUID *pUuidDsaSrc,
IN ULONG Options ULONG Options
); );
#ifdef UNICODE #ifdef UNICODE
#define DsReplicaSync DsReplicaSyncW #define DsReplicaSync DsReplicaSyncW
#else #else
#define DsReplicaSync DsReplicaSyncA #define DsReplicaSync DsReplicaSyncA
#endif #endif
// DsReplicaAdd // DsReplicaAdd
// //
skipping to change at line 1667 skipping to change at line 1700
pszSourceDsaAddress (IN) - Transport-specific address of the source DSA. pszSourceDsaAddress (IN) - Transport-specific address of the source DSA.
pSchedule (IN) - Schedule by which to replicate the NC from this pSchedule (IN) - Schedule by which to replicate the NC from this
source in the future. source in the future.
ulOptions (IN) - flags ulOptions (IN) - flags
RETURNS: WIN32 STATUS RETURNS: WIN32 STATUS
*/ */
__checkReturn
NTDSAPI NTDSAPI
DWORD DWORD
WINAPI WINAPI
DsReplicaAddA( DsReplicaAddA(
IN HANDLE hDS, __in HANDLE hDS,
IN LPCSTR NameContext, __in LPCSTR NameContext,
IN LPCSTR SourceDsaDn, __in LPCSTR SourceDsaDn,
IN LPCSTR TransportDn, __in LPCSTR TransportDn,
IN LPCSTR SourceDsaAddress, __in LPCSTR SourceDsaAddress,
IN const PSCHEDULE pSchedule, __in_opt const PSCHEDULE pSchedule,
IN DWORD Options DWORD Options
); );
__checkReturn
NTDSAPI NTDSAPI
DWORD DWORD
WINAPI WINAPI
DsReplicaAddW( DsReplicaAddW(
IN HANDLE hDS, __in HANDLE hDS,
IN LPCWSTR NameContext, __in LPCWSTR NameContext,
IN LPCWSTR SourceDsaDn, __in LPCWSTR SourceDsaDn,
IN LPCWSTR TransportDn, __in LPCWSTR TransportDn,
IN LPCWSTR SourceDsaAddress, __in LPCWSTR SourceDsaAddress,
IN const PSCHEDULE pSchedule, __in_opt const PSCHEDULE pSchedule,
IN DWORD Options DWORD Options
); );
#ifdef UNICODE #ifdef UNICODE
#define DsReplicaAdd DsReplicaAddW #define DsReplicaAdd DsReplicaAddW
#else #else
#define DsReplicaAdd DsReplicaAddA #define DsReplicaAdd DsReplicaAddA
#endif #endif
// DsReplicaDel // DsReplicaDel
// //
skipping to change at line 1722 skipping to change at line 1757
// pNC (DSNAME *) // pNC (DSNAME *)
// Name of the NC for which to delete a source. // Name of the NC for which to delete a source.
// pszSourceDRA (SZ) // pszSourceDRA (SZ)
// DSA for which to delete the source. // DSA for which to delete the source.
// ulOptions (ULONG) // ulOptions (ULONG)
// Bitwise OR of zero or more flags // Bitwise OR of zero or more flags
// //
// //
// RETURNS: WIN32 STATUS // RETURNS: WIN32 STATUS
__checkReturn
NTDSAPI NTDSAPI
DWORD DWORD
WINAPI WINAPI
DsReplicaDelA( DsReplicaDelA(
IN HANDLE hDS, __in HANDLE hDS,
IN LPCSTR NameContext, __in LPCSTR NameContext,
IN LPCSTR DsaSrc, __in LPCSTR DsaSrc,
IN ULONG Options ULONG Options
); );
__checkReturn
NTDSAPI NTDSAPI
DWORD DWORD
WINAPI WINAPI
DsReplicaDelW( DsReplicaDelW(
IN HANDLE hDS, __in HANDLE hDS,
IN LPCWSTR NameContext, __in LPCWSTR NameContext,
IN LPCWSTR DsaSrc, __in LPCWSTR DsaSrc,
IN ULONG Options ULONG Options
); );
#ifdef UNICODE #ifdef UNICODE
#define DsReplicaDel DsReplicaDelW #define DsReplicaDel DsReplicaDelW
#else #else
#define DsReplicaDel DsReplicaDelA #define DsReplicaDel DsReplicaDelA
#endif #endif
// DsReplicaModify // DsReplicaModify
// //
skipping to change at line 1797 skipping to change at line 1834
// UPDATE_FLAGS // UPDATE_FLAGS
// Update the flags associated with the replica. // Update the flags associated with the replica.
// UPDATE_TRANSPORT // UPDATE_TRANSPORT
// Update the transport associated with the replica. // Update the transport associated with the replica.
// ulOptions (ULONG) // ulOptions (ULONG)
// Bitwise OR of zero or more of the following: // Bitwise OR of zero or more of the following:
// DS_REPMOD_ASYNCHRONOUS_OPERATION // DS_REPMOD_ASYNCHRONOUS_OPERATION
// Perform this operation asynchronously. // Perform this operation asynchronously.
// RETURNS: WIN32 STATUS // RETURNS: WIN32 STATUS
__checkReturn
NTDSAPI NTDSAPI
DWORD DWORD
WINAPI WINAPI
DsReplicaModifyA( DsReplicaModifyA(
IN HANDLE hDS, __in HANDLE hDS,
IN LPCSTR NameContext, __in LPCSTR NameContext,
IN const UUID *pUuidSourceDsa, __in_opt const UUID *pUuidSourceDsa,
IN LPCSTR TransportDn, __reserved LPCSTR TransportDn,
IN LPCSTR SourceDsaAddress, __in LPCSTR SourceDsaAddress,
IN const PSCHEDULE pSchedule, __in_opt const PSCHEDULE pSchedule,
IN DWORD ReplicaFlags, __reserved DWORD ReplicaFlags,
IN DWORD ModifyFields, DWORD ModifyFields,
IN DWORD Options DWORD Options
); );
__checkReturn
NTDSAPI NTDSAPI
DWORD DWORD
WINAPI WINAPI
DsReplicaModifyW( DsReplicaModifyW(
IN HANDLE hDS, __in HANDLE hDS,
IN LPCWSTR NameContext, __in LPCWSTR NameContext,
IN const UUID *pUuidSourceDsa, __in_opt const UUID *pUuidSourceDsa,
IN LPCWSTR TransportDn, __reserved LPCWSTR TransportDn,
IN LPCWSTR SourceDsaAddress, __in LPCWSTR SourceDsaAddress,
IN const PSCHEDULE pSchedule, __in_opt const PSCHEDULE pSchedule,
IN DWORD ReplicaFlags, DWORD ReplicaFlags,
IN DWORD ModifyFields, DWORD ModifyFields,
IN DWORD Options DWORD Options
); );
#ifdef UNICODE #ifdef UNICODE
#define DsReplicaModify DsReplicaModifyW #define DsReplicaModify DsReplicaModifyW
#else #else
#define DsReplicaModify DsReplicaModifyA #define DsReplicaModify DsReplicaModifyA
#endif #endif
// DsReplicaUpdateRefs // DsReplicaUpdateRefs
// //
skipping to change at line 1864 skipping to change at line 1903
// Perform this operation asynchronously. // Perform this operation asynchronously.
// DS_REPUPD_ADD_REFERENCE // DS_REPUPD_ADD_REFERENCE
// Add the given server to the Reps-To property. // Add the given server to the Reps-To property.
// DS_REPUPD_DEL_REFERENCE // DS_REPUPD_DEL_REFERENCE
// Remove the given server from the Reps-To property. // Remove the given server from the Reps-To property.
// Note that ADD_REF and DEL_REF may be paired to perform // Note that ADD_REF and DEL_REF may be paired to perform
// "add or update". // "add or update".
// //
// RETURNS: WIN32 STATUS // RETURNS: WIN32 STATUS
__checkReturn
NTDSAPI NTDSAPI
DWORD DWORD
WINAPI WINAPI
DsReplicaUpdateRefsA( DsReplicaUpdateRefsA(
IN HANDLE hDS, __in HANDLE hDS,
IN LPCSTR NameContext, __in LPCSTR NameContext,
IN LPCSTR DsaDest, __in LPCSTR DsaDest,
IN const UUID *pUuidDsaDest, __in const UUID *pUuidDsaDest,
IN ULONG Options ULONG Options
); );
__checkReturn
NTDSAPI NTDSAPI
DWORD DWORD
WINAPI WINAPI
DsReplicaUpdateRefsW( DsReplicaUpdateRefsW(
IN HANDLE hDS, __in HANDLE hDS,
IN LPCWSTR NameContext, __in LPCWSTR NameContext,
IN LPCWSTR DsaDest, __in LPCWSTR DsaDest,
IN const UUID *pUuidDsaDest, __in const UUID *pUuidDsaDest,
IN ULONG Options ULONG Options
); );
#ifdef UNICODE #ifdef UNICODE
#define DsReplicaUpdateRefs DsReplicaUpdateRefsW #define DsReplicaUpdateRefs DsReplicaUpdateRefsW
#else #else
#define DsReplicaUpdateRefs DsReplicaUpdateRefsA #define DsReplicaUpdateRefs DsReplicaUpdateRefsA
#endif #endif
// Friends of DsReplicaSyncAll // Friends of DsReplicaSyncAll
skipping to change at line 2032 skipping to change at line 2073
// PARAMETERS: // PARAMETERS:
// hDS (IN) - A DS connection bound to the destination server. // hDS (IN) - A DS connection bound to the destination server.
// pszNameContext (IN) - The naming context to synchronize // pszNameContext (IN) - The naming context to synchronize
// ulFlags (IN) - Bitwise OR of zero or more flags // ulFlags (IN) - Bitwise OR of zero or more flags
// pFnCallBack (IN, OPTIONAL) - Callback function for message-passing. // pFnCallBack (IN, OPTIONAL) - Callback function for message-passing.
// pCallbackData (IN, OPTIONAL) - A pointer that will be passed to the // pCallbackData (IN, OPTIONAL) - A pointer that will be passed to the
// first argument of the callback function. // first argument of the callback function.
// pErrors (OUT, OPTIONAL) - Pointer to a (PDS_REPSYNCALL_ERRINFO *) // pErrors (OUT, OPTIONAL) - Pointer to a (PDS_REPSYNCALL_ERRINFO *)
// object that will hold an array of error structure s. // object that will hold an array of error structure s.
__checkReturn
NTDSAPI NTDSAPI
DWORD DWORD
WINAPI WINAPI
DsReplicaSyncAllA ( DsReplicaSyncAllA (
HANDLE hDS, __in HANDLE hDS,
__in LPCSTR pszNameContext, __in LPCSTR pszNameContext,
ULONG ulFlags, ULONG ulFlags,
BOOL (__stdcall * pFnCallBack) (LPVOID, PDS_REPSYNCALL_UPDA __callback BOOL (__stdcall * pFnCallBack) (LPVOID, PDS
TEA), _REPSYNCALL_UPDATEA),
LPVOID pCallbackData, __in_opt LPVOID pCallbackData,
PDS_REPSYNCALL_ERRINFOA ** pErrors __deref_out_opt PDS_REPSYNCALL_ERRINFOA ** pErrors
); );
__checkReturn
NTDSAPI NTDSAPI
DWORD DWORD
WINAPI WINAPI
DsReplicaSyncAllW ( DsReplicaSyncAllW (
HANDLE hDS, __in HANDLE hDS,
__in LPCWSTR pszNameContext, __in LPCWSTR pszNameContext,
ULONG ulFlags, ULONG ulFlags,
BOOL (__stdcall * pFnCallBack) (LPVOID, PDS_REPSYNCALL_UPDA __callback BOOL (__stdcall * pFnCallBack) (LPVOID, PDS
TEW), _REPSYNCALL_UPDATEW),
LPVOID pCallbackData, __in_opt LPVOID pCallbackData,
PDS_REPSYNCALL_ERRINFOW ** pErrors __deref_out_opt PDS_REPSYNCALL_ERRINFOW ** pErrors
); );
#ifdef UNICODE #ifdef UNICODE
#define DsReplicaSyncAll DsReplicaSyncAllW #define DsReplicaSyncAll DsReplicaSyncAllW
#else #else
#define DsReplicaSyncAll DsReplicaSyncAllA #define DsReplicaSyncAll DsReplicaSyncAllA
#endif #endif
__checkReturn
NTDSAPI NTDSAPI
DWORD DWORD
WINAPI WINAPI
DsRemoveDsServerW( DsRemoveDsServerW(
HANDLE hDs, // in __in HANDLE hDs, // in
__in LPWSTR ServerDN, // in __in LPWSTR ServerDN, // in
__in_opt LPWSTR DomainDN, // in, optional __in_opt LPWSTR DomainDN, // in, optional
BOOL *fLastDcInDomain, // out, optional __out_opt BOOL *fLastDcInDomain, // out, optional
BOOL fCommit // in BOOL fCommit // in
); );
__checkReturn
NTDSAPI NTDSAPI
DWORD DWORD
WINAPI WINAPI
DsRemoveDsServerA( DsRemoveDsServerA(
HANDLE hDs, // in __in HANDLE hDs, // in
__in LPSTR ServerDN, // in __in LPSTR ServerDN, // in
__in_opt LPSTR DomainDN, // in, optional __in_opt LPSTR DomainDN, // in, optional
BOOL *fLastDcInDomain, // out, optional __out_opt BOOL *fLastDcInDomain, // out, optional
BOOL fCommit // in BOOL fCommit // in
); );
#ifdef UNICODE #ifdef UNICODE
#define DsRemoveDsServer DsRemoveDsServerW #define DsRemoveDsServer DsRemoveDsServerW
#else #else
#define DsRemoveDsServer DsRemoveDsServerA #define DsRemoveDsServer DsRemoveDsServerA
#endif #endif
__checkReturn
NTDSAPI NTDSAPI
DWORD DWORD
WINAPI WINAPI
DsRemoveDsDomainW( DsRemoveDsDomainW(
HANDLE hDs, // in __in HANDLE hDs, // in
__in LPWSTR DomainDN // in __in LPWSTR DomainDN // in
); );
__checkReturn
NTDSAPI NTDSAPI
DWORD DWORD
WINAPI WINAPI
DsRemoveDsDomainA( DsRemoveDsDomainA(
HANDLE hDs, // in __in HANDLE hDs, // in
__in LPSTR DomainDN // in __in LPSTR DomainDN // in
); );
#ifdef UNICODE #ifdef UNICODE
#define DsRemoveDsDomain DsRemoveDsDomainW #define DsRemoveDsDomain DsRemoveDsDomainW
#else #else
#define DsRemoveDsDomain DsRemoveDsDomainA #define DsRemoveDsDomain DsRemoveDsDomainA
#endif #endif
__checkReturn
NTDSAPI NTDSAPI
DWORD DWORD
WINAPI WINAPI
DsListSitesA( DsListSitesA(
HANDLE hDs, // in __in HANDLE hDs, // in
PDS_NAME_RESULTA *ppSites); // out __deref_out PDS_NAME_RESULTA *ppSites); // out
__checkReturn
NTDSAPI NTDSAPI
DWORD DWORD
WINAPI WINAPI
DsListSitesW( DsListSitesW(
HANDLE hDs, // in __in HANDLE hDs, // in
PDS_NAME_RESULTW *ppSites); // out __deref_out PDS_NAME_RESULTW *ppSites); // out
#ifdef UNICODE #ifdef UNICODE
#define DsListSites DsListSitesW #define DsListSites DsListSitesW
#else #else
#define DsListSites DsListSitesA #define DsListSites DsListSitesA
#endif #endif
__checkReturn
NTDSAPI NTDSAPI
DWORD DWORD
WINAPI WINAPI
DsListServersInSiteA( DsListServersInSiteA(
HANDLE hDs, // in __in HANDLE hDs, // in
LPCSTR site, // in __in LPCSTR site, // in
PDS_NAME_RESULTA *ppServers); // out __deref_out PDS_NAME_RESULTA *ppServers); // out
__checkReturn
NTDSAPI NTDSAPI
DWORD DWORD
WINAPI WINAPI
DsListServersInSiteW( DsListServersInSiteW(
HANDLE hDs, // in __in HANDLE hDs, // in
LPCWSTR site, // in __in LPCWSTR site, // in
PDS_NAME_RESULTW *ppServers); // out __deref_out PDS_NAME_RESULTW *ppServers); // out
#ifdef UNICODE #ifdef UNICODE
#define DsListServersInSite DsListServersInSiteW #define DsListServersInSite DsListServersInSiteW
#else #else
#define DsListServersInSite DsListServersInSiteA #define DsListServersInSite DsListServersInSiteA
#endif #endif
__checkReturn
NTDSAPI NTDSAPI
DWORD DWORD
WINAPI WINAPI
DsListDomainsInSiteA( DsListDomainsInSiteA(
HANDLE hDs, // in __in HANDLE hDs, // in
LPCSTR site, // in __in LPCSTR site, // in
PDS_NAME_RESULTA *ppDomains); // out __deref_out PDS_NAME_RESULTA *ppDomains); // out
__checkReturn
NTDSAPI NTDSAPI
DWORD DWORD
WINAPI WINAPI
DsListDomainsInSiteW( DsListDomainsInSiteW(
HANDLE hDs, // in __in HANDLE hDs, // in
LPCWSTR site, // in __in LPCWSTR site, // in
PDS_NAME_RESULTW *ppDomains); // out __deref_out PDS_NAME_RESULTW *ppDomains); // out
#ifdef UNICODE #ifdef UNICODE
#define DsListDomainsInSite DsListDomainsInSiteW #define DsListDomainsInSite DsListDomainsInSiteW
#else #else
#define DsListDomainsInSite DsListDomainsInSiteA #define DsListDomainsInSite DsListDomainsInSiteA
#endif #endif
__checkReturn
NTDSAPI NTDSAPI
DWORD DWORD
WINAPI WINAPI
DsListServersForDomainInSiteA( DsListServersForDomainInSiteA(
HANDLE hDs, // in __in HANDLE hDs, // in
LPCSTR domain, // in __in LPCSTR domain, // in
LPCSTR site, // in __in LPCSTR site, // in
PDS_NAME_RESULTA *ppServers); // out __deref_out PDS_NAME_RESULTA *ppServers); // out
__checkReturn
NTDSAPI NTDSAPI
DWORD DWORD
WINAPI WINAPI
DsListServersForDomainInSiteW( DsListServersForDomainInSiteW(
HANDLE hDs, // in __in HANDLE hDs, // in
LPCWSTR domain, // in __in LPCWSTR domain, // in
LPCWSTR site, // in __in LPCWSTR site, // in
PDS_NAME_RESULTW *ppServers); // out __deref_out PDS_NAME_RESULTW *ppServers); // out
#ifdef UNICODE #ifdef UNICODE
#define DsListServersForDomainInSite DsListServersForDomainInSiteW #define DsListServersForDomainInSite DsListServersForDomainInSiteW
#else #else
#define DsListServersForDomainInSite DsListServersForDomainInSiteA #define DsListServersForDomainInSite DsListServersForDomainInSiteA
#endif #endif
// Define indices for DsListInfoForServer return data. Check status // Define indices for DsListInfoForServer return data. Check status
// for each field as a given value may not be present. // for each field as a given value may not be present.
#define DS_LIST_DSA_OBJECT_FOR_SERVER 0 #define DS_LIST_DSA_OBJECT_FOR_SERVER 0
#define DS_LIST_DNS_HOST_NAME_FOR_SERVER 1 #define DS_LIST_DNS_HOST_NAME_FOR_SERVER 1
#define DS_LIST_ACCOUNT_OBJECT_FOR_SERVER 2 #define DS_LIST_ACCOUNT_OBJECT_FOR_SERVER 2
__checkReturn
NTDSAPI NTDSAPI
DWORD DWORD
WINAPI WINAPI
DsListInfoForServerA( DsListInfoForServerA(
HANDLE hDs, // in __in HANDLE hDs, // in
LPCSTR server, // in __in LPCSTR server, // in
PDS_NAME_RESULTA *ppInfo); // out __deref_out PDS_NAME_RESULTA *ppInfo); // out
__checkReturn
NTDSAPI NTDSAPI
DWORD DWORD
WINAPI WINAPI
DsListInfoForServerW( DsListInfoForServerW(
HANDLE hDs, // in __in HANDLE hDs, // in
LPCWSTR server, // in __in LPCWSTR server, // in
PDS_NAME_RESULTW *ppInfo); // out __deref_out PDS_NAME_RESULTW *ppInfo); // out
#ifdef UNICODE #ifdef UNICODE
#define DsListInfoForServer DsListInfoForServerW #define DsListInfoForServer DsListInfoForServerW
#else #else
#define DsListInfoForServer DsListInfoForServerA #define DsListInfoForServer DsListInfoForServerA
#endif #endif
// Define indices for DsListRoles return data. Check status for // Define indices for DsListRoles return data. Check status for
// each field as a given value may not be present. // each field as a given value may not be present.
#define DS_ROLE_SCHEMA_OWNER 0 #define DS_ROLE_SCHEMA_OWNER 0
#define DS_ROLE_DOMAIN_OWNER 1 #define DS_ROLE_DOMAIN_OWNER 1
#define DS_ROLE_PDC_OWNER 2 #define DS_ROLE_PDC_OWNER 2
#define DS_ROLE_RID_OWNER 3 #define DS_ROLE_RID_OWNER 3
#define DS_ROLE_INFRASTRUCTURE_OWNER 4 #define DS_ROLE_INFRASTRUCTURE_OWNER 4
__checkReturn
NTDSAPI NTDSAPI
DWORD DWORD
WINAPI WINAPI
DsListRolesA( DsListRolesA(
HANDLE hDs, // in __in HANDLE hDs, // in
PDS_NAME_RESULTA *ppRoles); // out __deref_out PDS_NAME_RESULTA *ppRoles); // out
__checkReturn
NTDSAPI NTDSAPI
DWORD DWORD
WINAPI WINAPI
DsListRolesW( DsListRolesW(
HANDLE hDs, // in __in HANDLE hDs, // in
PDS_NAME_RESULTW *ppRoles); // out __deref_out PDS_NAME_RESULTW *ppRoles); // out
#ifdef UNICODE #ifdef UNICODE
#define DsListRoles DsListRolesW #define DsListRoles DsListRolesW
#else #else
#define DsListRoles DsListRolesA #define DsListRoles DsListRolesA
#endif #endif
// //
// DsQuerySitesByCost{A|W} allows the caller to determine the // DsQuerySitesByCost{A|W} allows the caller to determine the
// communication cost between the From Site and each of the sites // communication cost between the From Site and each of the sites
skipping to change at line 2274 skipping to change at line 2333
// The Site Names should all be passed as RDNs. For example, if the // The Site Names should all be passed as RDNs. For example, if the
// site's DN is "CN=Foo,CN=Sites,CN=Configuration,...", the RDN is // site's DN is "CN=Foo,CN=Sites,CN=Configuration,...", the RDN is
// simply "Foo". // simply "Foo".
// //
typedef struct { typedef struct {
DWORD errorCode; DWORD errorCode;
DWORD cost; DWORD cost;
} DS_SITE_COST_INFO, *PDS_SITE_COST_INFO; } DS_SITE_COST_INFO, *PDS_SITE_COST_INFO;
__checkReturn
NTDSAPI_POSTXP NTDSAPI_POSTXP
DWORD DWORD
WINAPI WINAPI
DsQuerySitesByCostW( DsQuerySitesByCostW(
HANDLE hDS, // in __in HANDLE hDS, // in
__in LPWSTR pwszFromSite, // in __in LPWSTR pwszFromSite, // in
__deref_in_ecount (cToSites) LPWSTR *rgwszToSites, // in __deref_in_ecount (cToSites) LPWSTR *rgwszToSites, // in
DWORD cToSites, // in __in DWORD cToSites, // in
DWORD dwFlags, // in __reserved DWORD dwFlags, // in
PDS_SITE_COST_INFO *prgSiteInfo // out __deref_out PDS_SITE_COST_INFO *prgSiteInfo // out
); );
__checkReturn
NTDSAPI_POSTXP NTDSAPI_POSTXP
DWORD DWORD
WINAPI WINAPI
DsQuerySitesByCostA( DsQuerySitesByCostA(
HANDLE hDS, // in __in HANDLE hDS, // in
__in LPSTR pszFromSite, // in __in LPSTR pszFromSite, // in
__deref_in_ecount (cToSites) LPSTR *rgszToSites, // in __deref_in_ecount (cToSites) LPSTR *rgszToSites, // in
DWORD cToSites, // in DWORD cToSites, // in
DWORD dwFlags, // in __reserved DWORD dwFlags, // in
PDS_SITE_COST_INFO *prgSiteInfo // out __deref_out PDS_SITE_COST_INFO *prgSiteInfo // out
); );
#ifdef UNICODE #ifdef UNICODE
#define DsQuerySitesByCost DsQuerySitesByCostW #define DsQuerySitesByCost DsQuerySitesByCostW
#else #else
#define DsQuerySitesByCost DsQuerySitesByCostA #define DsQuerySitesByCost DsQuerySitesByCostA
#endif #endif
// //
// DsQuerySitesByCost will free the site info array returned // DsQuerySitesByCost will free the site info array returned
// from DsQuerySitesByCost{A|W}. // from DsQuerySitesByCost{A|W}.
// //
VOID VOID
WINAPI WINAPI
DsQuerySitesFree( DsQuerySitesFree(
PDS_SITE_COST_INFO rgSiteInfo __in PDS_SITE_COST_INFO rgSiteInfo
); );
// Definitions required for DsMapSchemaGuid routines. // Definitions required for DsMapSchemaGuid routines.
#define DS_SCHEMA_GUID_NOT_FOUND 0 #define DS_SCHEMA_GUID_NOT_FOUND 0
#define DS_SCHEMA_GUID_ATTR 1 #define DS_SCHEMA_GUID_ATTR 1
#define DS_SCHEMA_GUID_ATTR_SET 2 #define DS_SCHEMA_GUID_ATTR_SET 2
#define DS_SCHEMA_GUID_CLASS 3 #define DS_SCHEMA_GUID_CLASS 3
#define DS_SCHEMA_GUID_CONTROL_RIGHT 4 #define DS_SCHEMA_GUID_CONTROL_RIGHT 4
skipping to change at line 2346 skipping to change at line 2407
GUID guid; // mapped GUID GUID guid; // mapped GUID
DWORD guidType; // DS_SCHEMA_GUID_* value DWORD guidType; // DS_SCHEMA_GUID_* value
#ifdef MIDL_PASS #ifdef MIDL_PASS
[string,unique] WCHAR *pName; // might be NULL [string,unique] WCHAR *pName; // might be NULL
#else #else
LPWSTR pName; // might be NULL LPWSTR pName; // might be NULL
#endif #endif
} DS_SCHEMA_GUID_MAPW, *PDS_SCHEMA_GUID_MAPW; } DS_SCHEMA_GUID_MAPW, *PDS_SCHEMA_GUID_MAPW;
__checkReturn
NTDSAPI NTDSAPI
DWORD DWORD
WINAPI WINAPI
DsMapSchemaGuidsA( DsMapSchemaGuidsA(
HANDLE hDs, // in __in HANDLE hDs, // in
DWORD cGuids, // in DWORD cGuids, // in
GUID *rGuids, // in __in_ecount(cGuids) GUID *rGuids, // in
DS_SCHEMA_GUID_MAPA **ppGuidMap); // out __deref_out DS_SCHEMA_GUID_MAPA **ppGuidMap); // out
NTDSAPI NTDSAPI
VOID VOID
WINAPI WINAPI
DsFreeSchemaGuidMapA( DsFreeSchemaGuidMapA(
PDS_SCHEMA_GUID_MAPA pGuidMap); // in __in PDS_SCHEMA_GUID_MAPA pGuidMap); // in
__checkReturn
NTDSAPI NTDSAPI
DWORD DWORD
WINAPI WINAPI
DsMapSchemaGuidsW( DsMapSchemaGuidsW(
HANDLE hDs, // in __in HANDLE hDs, // in
DWORD cGuids, // in DWORD cGuids, // in
GUID *rGuids, // in __in_ecount(cGuids) GUID *rGuids, // in
DS_SCHEMA_GUID_MAPW **ppGuidMap); // out __deref_out DS_SCHEMA_GUID_MAPW **ppGuidMap); // out
NTDSAPI NTDSAPI
VOID VOID
WINAPI WINAPI
DsFreeSchemaGuidMapW( DsFreeSchemaGuidMapW(
PDS_SCHEMA_GUID_MAPW pGuidMap); // in __in PDS_SCHEMA_GUID_MAPW pGuidMap); // in
#ifdef UNICODE #ifdef UNICODE
#define DS_SCHEMA_GUID_MAP DS_SCHEMA_GUID_MAPW #define DS_SCHEMA_GUID_MAP DS_SCHEMA_GUID_MAPW
#define PDS_SCHEMA_GUID_MAP PDS_SCHEMA_GUID_MAPW #define PDS_SCHEMA_GUID_MAP PDS_SCHEMA_GUID_MAPW
#define DsMapSchemaGuids DsMapSchemaGuidsW #define DsMapSchemaGuids DsMapSchemaGuidsW
#define DsFreeSchemaGuidMap DsFreeSchemaGuidMapW #define DsFreeSchemaGuidMap DsFreeSchemaGuidMapW
#else #else
#define DS_SCHEMA_GUID_MAP DS_SCHEMA_GUID_MAPA #define DS_SCHEMA_GUID_MAP DS_SCHEMA_GUID_MAPA
#define PDS_SCHEMA_GUID_MAP PDS_SCHEMA_GUID_MAPA #define PDS_SCHEMA_GUID_MAP PDS_SCHEMA_GUID_MAPA
#define DsMapSchemaGuids DsMapSchemaGuidsA #define DsMapSchemaGuids DsMapSchemaGuidsA
skipping to change at line 2573 skipping to change at line 2636
} DS_DOMAIN_CONTROLLER_INFO_3W, *PDS_DOMAIN_CONTROLLER_INFO_3W; } DS_DOMAIN_CONTROLLER_INFO_3W, *PDS_DOMAIN_CONTROLLER_INFO_3W;
// The following APIs strictly find domain controller account objects // The following APIs strictly find domain controller account objects
// in the DS and return information associated with them. As such, they // in the DS and return information associated with them. As such, they
// may return entries which correspond to domain controllers long since // may return entries which correspond to domain controllers long since
// decommissioned, etc. and there is no guarantee that there exists a // decommissioned, etc. and there is no guarantee that there exists a
// physical domain controller at all. Use DsGetDcName (dsgetdc.h) to find // physical domain controller at all. Use DsGetDcName (dsgetdc.h) to find
// live domain controllers for a domain. // live domain controllers for a domain.
__checkReturn
NTDSAPI NTDSAPI
DWORD DWORD
WINAPI WINAPI
DsGetDomainControllerInfoA( DsGetDomainControllerInfoA(
HANDLE hDs, // in __in HANDLE hDs, // in
LPCSTR DomainName, // in __in LPCSTR DomainName, // in
DWORD InfoLevel, // in DWORD InfoLevel, // in
DWORD *pcOut, // out __out DWORD *pcOut, // out
VOID **ppInfo); // out __deref_out_ecount(*pcOut) VOID **ppInfo); /
/ out
__checkReturn
NTDSAPI NTDSAPI
DWORD DWORD
WINAPI WINAPI
DsGetDomainControllerInfoW( DsGetDomainControllerInfoW(
HANDLE hDs, // in __in HANDLE hDs, // in
LPCWSTR DomainName, // in __in LPCWSTR DomainName, // in
DWORD InfoLevel, // in DWORD InfoLevel, // in
DWORD *pcOut, // out __out DWORD *pcOut, // out
VOID **ppInfo); // out __deref_out_ecount(*pcOut) VOID **ppInfo); /
/ out
NTDSAPI NTDSAPI
VOID VOID
WINAPI WINAPI
DsFreeDomainControllerInfoA( DsFreeDomainControllerInfoA(
DWORD InfoLevel, // in DWORD InfoLevel, // in
DWORD cInfo, // in DWORD cInfo, // in
VOID *pInfo); // in __in_ecount(cInfo) VOID *pInfo); // in
NTDSAPI NTDSAPI
VOID VOID
WINAPI WINAPI
DsFreeDomainControllerInfoW( DsFreeDomainControllerInfoW(
DWORD InfoLevel, // in DWORD InfoLevel, // in
DWORD cInfo, // in DWORD cInfo, // in
VOID *pInfo); // in __in_ecount(cInfo) VOID *pInfo); // in
#ifdef UNICODE #ifdef UNICODE
#define DS_DOMAIN_CONTROLLER_INFO_1 DS_DOMAIN_CONTROLLER_INFO_1W #define DS_DOMAIN_CONTROLLER_INFO_1 DS_DOMAIN_CONTROLLER_INFO_1W
#define DS_DOMAIN_CONTROLLER_INFO_2 DS_DOMAIN_CONTROLLER_INFO_2W #define DS_DOMAIN_CONTROLLER_INFO_2 DS_DOMAIN_CONTROLLER_INFO_2W
#define DS_DOMAIN_CONTROLLER_INFO_3 DS_DOMAIN_CONTROLLER_INFO_3W #define DS_DOMAIN_CONTROLLER_INFO_3 DS_DOMAIN_CONTROLLER_INFO_3W
#define PDS_DOMAIN_CONTROLLER_INFO_1 PDS_DOMAIN_CONTROLLER_INFO_1W #define PDS_DOMAIN_CONTROLLER_INFO_1 PDS_DOMAIN_CONTROLLER_INFO_1W
#define PDS_DOMAIN_CONTROLLER_INFO_2 PDS_DOMAIN_CONTROLLER_INFO_2W #define PDS_DOMAIN_CONTROLLER_INFO_2 PDS_DOMAIN_CONTROLLER_INFO_2W
#define PDS_DOMAIN_CONTROLLER_INFO_3 PDS_DOMAIN_CONTROLLER_INFO_3W #define PDS_DOMAIN_CONTROLLER_INFO_3 PDS_DOMAIN_CONTROLLER_INFO_3W
#define DsGetDomainControllerInfo DsGetDomainControllerInfoW #define DsGetDomainControllerInfo DsGetDomainControllerInfoW
#define DsFreeDomainControllerInfo DsFreeDomainControllerInfoW #define DsFreeDomainControllerInfo DsFreeDomainControllerInfoW
skipping to change at line 2640 skipping to change at line 2705
typedef enum { typedef enum {
DS_KCC_TASKID_UPDATE_TOPOLOGY = 0 DS_KCC_TASKID_UPDATE_TOPOLOGY = 0
} DS_KCC_TASKID; } DS_KCC_TASKID;
// Don't wait for completion of the task; queue it and return. // Don't wait for completion of the task; queue it and return.
#define DS_KCC_FLAG_ASYNC_OP (1 << 0) #define DS_KCC_FLAG_ASYNC_OP (1 << 0)
// Don't enqueue the task if another queued task will run soon. // Don't enqueue the task if another queued task will run soon.
#define DS_KCC_FLAG_DAMPED (1 << 1) #define DS_KCC_FLAG_DAMPED (1 << 1)
__checkReturn
NTDSAPI NTDSAPI
DWORD DWORD
WINAPI WINAPI
DsReplicaConsistencyCheck( DsReplicaConsistencyCheck(
HANDLE hDS, // in __in HANDLE hDS, // in
DS_KCC_TASKID TaskID, // in DS_KCC_TASKID TaskID, // in
DWORD dwFlags); // in DWORD dwFlags); // in
__checkReturn
NTDSAPI NTDSAPI
DWORD DWORD
WINAPI WINAPI
DsReplicaVerifyObjectsW( DsReplicaVerifyObjectsW(
HANDLE hDS, // in __in HANDLE hDS, // in
LPCWSTR NameContext,// in __in LPCWSTR NameContext,// in
const UUID * pUuidDsaSrc,// in __in const UUID * pUuidDsaSrc,// in
ULONG ulOptions); // in ULONG ulOptions); // in
__checkReturn
NTDSAPI NTDSAPI
DWORD DWORD
WINAPI WINAPI
DsReplicaVerifyObjectsA( DsReplicaVerifyObjectsA(
HANDLE hDS, // in __in HANDLE hDS, // in
LPCSTR NameContext,// in __in LPCSTR NameContext,// in
const UUID * pUuidDsaSrc,// in __in const UUID * pUuidDsaSrc,// in
ULONG ulOptions); // in ULONG ulOptions); // in
#ifdef UNICODE #ifdef UNICODE
#define DsReplicaVerifyObjects DsReplicaVerifyObjectsW #define DsReplicaVerifyObjects DsReplicaVerifyObjectsW
#else #else
#define DsReplicaVerifyObjects DsReplicaVerifyObjectsA #define DsReplicaVerifyObjects DsReplicaVerifyObjectsA
#endif #endif
// Do not delete objects on DsReplicaVerifyObjects call // Do not delete objects on DsReplicaVerifyObjects call
#define DS_EXIST_ADVISORY_MODE (0x1) #define DS_EXIST_ADVISORY_MODE (0x1)
skipping to change at line 2711 skipping to change at line 2779
// Bit values for flags argument to DsReplicaGetInfo2 // Bit values for flags argument to DsReplicaGetInfo2
#define DS_REPL_INFO_FLAG_IMPROVE_LINKED_ATTRS (0x00000001) #define DS_REPL_INFO_FLAG_IMPROVE_LINKED_ATTRS (0x00000001)
// Bit values for the dwReplicaFlags field of the DS_REPL_NEIGHBOR structure. // Bit values for the dwReplicaFlags field of the DS_REPL_NEIGHBOR structure.
// Also used for the ulReplicaFlags argument to DsReplicaModify // Also used for the ulReplicaFlags argument to DsReplicaModify
#define DS_REPL_NBR_WRITEABLE (0x00000010) #define DS_REPL_NBR_WRITEABLE (0x00000010)
#define DS_REPL_NBR_SYNC_ON_STARTUP (0x00000020) #define DS_REPL_NBR_SYNC_ON_STARTUP (0x00000020)
#define DS_REPL_NBR_DO_SCHEDULED_SYNCS (0x00000040) #define DS_REPL_NBR_DO_SCHEDULED_SYNCS (0x00000040)
#define DS_REPL_NBR_USE_ASYNC_INTERSITE_TRANSPORT (0x00000080) #define DS_REPL_NBR_USE_ASYNC_INTERSITE_TRANSPORT (0x00000080)
#define DS_REPL_NBR_TWO_WAY_SYNC (0x00000200) #define DS_REPL_NBR_TWO_WAY_SYNC (0x00000200)
#define DS_REPL_NBR_FULL_REPLICA (0x00000400) #define DS_REPL_NBR_NONGC_RO_REPLICA (0x00000400)
#define DS_REPL_NBR_RETURN_OBJECT_PARENTS (0x00000800) #define DS_REPL_NBR_RETURN_OBJECT_PARENTS (0x00000800)
#define DS_REPL_NBR_SELECT_SECRETS (0x00001000) #define DS_REPL_NBR_SELECT_SECRETS (0x00001000)
#define DS_REPL_NBR_FULL_SYNC_IN_PROGRESS (0x00010000) #define DS_REPL_NBR_FULL_SYNC_IN_PROGRESS (0x00010000)
#define DS_REPL_NBR_FULL_SYNC_NEXT_PACKET (0x00020000) #define DS_REPL_NBR_FULL_SYNC_NEXT_PACKET (0x00020000)
#define DS_REPL_NBR_GCSPN (0x00100000)
#define DS_REPL_NBR_NEVER_SYNCED (0x00200000) #define DS_REPL_NBR_NEVER_SYNCED (0x00200000)
#define DS_REPL_NBR_PREEMPTED (0x01000000) #define DS_REPL_NBR_PREEMPTED (0x01000000)
#define DS_REPL_NBR_IGNORE_CHANGE_NOTIFICATIONS (0x04000000) #define DS_REPL_NBR_IGNORE_CHANGE_NOTIFICATIONS (0x04000000)
#define DS_REPL_NBR_DISABLE_SCHEDULED_SYNC (0x08000000) #define DS_REPL_NBR_DISABLE_SCHEDULED_SYNC (0x08000000)
#define DS_REPL_NBR_COMPRESS_CHANGES (0x10000000) #define DS_REPL_NBR_COMPRESS_CHANGES (0x10000000)
#define DS_REPL_NBR_NO_CHANGE_NOTIFICATIONS (0x20000000) #define DS_REPL_NBR_NO_CHANGE_NOTIFICATIONS (0x20000000)
#define DS_REPL_NBR_PARTIAL_ATTRIBUTE_SET (0x40000000) #define DS_REPL_NBR_PARTIAL_ATTRIBUTE_SET (0x40000000)
// This is the mask of replica flags that may be changed on the DsReplicaModify // This is the mask of replica flags that may be changed on the DsReplicaModify
// call using the ulReplicaFlags parameter. The other flags are protected // call using the ulReplicaFlags parameter. The other flags are protected
skipping to change at line 3071 skipping to change at line 3140
FILETIME ftimeOldestSync; FILETIME ftimeOldestSync;
FILETIME ftimeOldestAdd; FILETIME ftimeOldestAdd;
FILETIME ftimeOldestMod; FILETIME ftimeOldestMod;
FILETIME ftimeOldestDel; FILETIME ftimeOldestDel;
FILETIME ftimeOldestUpdRefs; FILETIME ftimeOldestUpdRefs;
} DS_REPL_QUEUE_STATISTICSW; } DS_REPL_QUEUE_STATISTICSW;
// Fields can be added only to the end of this structure. // Fields can be added only to the end of this structure.
typedef struct _DS_REPL_QUEUE_STATISTICSW DS_REPL_QUEUE_STATISTICSW_BLOB; typedef struct _DS_REPL_QUEUE_STATISTICSW DS_REPL_QUEUE_STATISTICSW_BLOB;
__checkReturn
NTDSAPI NTDSAPI
DWORD DWORD
WINAPI WINAPI
DsReplicaGetInfoW( DsReplicaGetInfoW(
HANDLE hDS, // in __in HANDLE hDS, // in
DS_REPL_INFO_TYPE InfoType, // in DS_REPL_INFO_TYPE InfoType, // in
LPCWSTR pszObject, // in __in_opt LPCWSTR pszObject, // in
UUID * puuidForSourceDsaObjGuid, // in __in_opt UUID * puuidForSourceDsaObjGuid, // in
VOID ** ppInfo); // out __deref_out VOID ** ppInfo); // out
// This API is not supported by Windows 2000 clients or Windows 2000 DCs. // This API is not supported by Windows 2000 clients or Windows 2000 DCs.
__checkReturn
NTDSAPI NTDSAPI
DWORD DWORD
WINAPI WINAPI
DsReplicaGetInfo2W( DsReplicaGetInfo2W(
HANDLE hDS, // in __in HANDLE hDS, // in
DS_REPL_INFO_TYPE InfoType, // in DS_REPL_INFO_TYPE InfoType, // in
LPCWSTR pszObject, // in __in_opt LPCWSTR pszObject, // in
UUID * puuidForSourceDsaObjGuid, // in __in_opt UUID * puuidForSourceDsaObjGuid, // in
LPCWSTR pszAttributeName, // in __in_opt LPCWSTR pszAttributeName, // in
LPCWSTR pszValue, // in __in_opt LPCWSTR pszValue, // in
DWORD dwFlags, // in DWORD dwFlags, // in
DWORD dwEnumerationContext, // in DWORD dwEnumerationContext, // in
VOID ** ppInfo); // out __deref_out VOID ** ppInfo); // out
NTDSAPI NTDSAPI
void void
WINAPI WINAPI
DsReplicaFreeInfo( DsReplicaFreeInfo(
DS_REPL_INFO_TYPE InfoType, // in DS_REPL_INFO_TYPE InfoType, // in
VOID * pInfo); // in __in VOID * pInfo); // in
#ifdef UNICODE #ifdef UNICODE
#define DsReplicaGetInfo DsReplicaGetInfoW #define DsReplicaGetInfo DsReplicaGetInfoW
#define DsReplicaGetInfo2 DsReplicaGetInfo2W #define DsReplicaGetInfo2 DsReplicaGetInfo2W
#define DS_REPL_NEIGHBOR DS_REPL_NEIGHBORW #define DS_REPL_NEIGHBOR DS_REPL_NEIGHBORW
#define DS_REPL_NEIGHBORS DS_REPL_NEIGHBORSW #define DS_REPL_NEIGHBORS DS_REPL_NEIGHBORSW
#define DS_REPL_CURSOR_3 DS_REPL_CURSOR_3W #define DS_REPL_CURSOR_3 DS_REPL_CURSOR_3W
#define DS_REPL_CURSORS_3 DS_REPL_CURSORS_3W #define DS_REPL_CURSORS_3 DS_REPL_CURSORS_3W
#define DS_REPL_KCC_DSA_FAILURES DS_REPL_KCC_DSA_FAILURESW #define DS_REPL_KCC_DSA_FAILURES DS_REPL_KCC_DSA_FAILURESW
#define DS_REPL_KCC_DSA_FAILURE DS_REPL_KCC_DSA_FAILUREW #define DS_REPL_KCC_DSA_FAILURE DS_REPL_KCC_DSA_FAILUREW
#define DS_REPL_OP DS_REPL_OPW #define DS_REPL_OP DS_REPL_OPW
#define DS_REPL_PENDING_OPS DS_REPL_PENDING_OPSW #define DS_REPL_PENDING_OPS DS_REPL_PENDING_OPSW
#else #else
// No ANSI equivalents currently supported. // No ANSI equivalents currently supported.
#endif #endif
__checkReturn
NTDSAPI NTDSAPI
DWORD DWORD
WINAPI WINAPI
DsAddSidHistoryW( DsAddSidHistoryW(
HANDLE hDS, // in __in HANDLE hDS, // in
DWORD Flags, // in - sbz for now __reserved DWORD Flags, // in - sbz for n
LPCWSTR SrcDomain, // in - DNS or NetBIOS ow
LPCWSTR SrcPrincipal, // in - SAM account name __in LPCWSTR SrcDomain, // in - DNS or NetBIOS
LPCWSTR SrcDomainController, // in, optional __in LPCWSTR SrcPrincipal, // in - SAM account nam
RPC_AUTH_IDENTITY_HANDLE SrcDomainCreds, // in - creds for src domain e
LPCWSTR DstDomain, // in - DNS or NetBIOS __in_opt LPCWSTR SrcDomainController, // in, optional
LPCWSTR DstPrincipal); // in - SAM account name __in_opt RPC_AUTH_IDENTITY_HANDLE SrcDomainCreds, // in - creds for s
rc domain
__in LPCWSTR DstDomain, // in - DNS or NetBIOS
__in LPCWSTR DstPrincipal); // in - SAM account nam
e
__checkReturn
NTDSAPI NTDSAPI
DWORD DWORD
WINAPI WINAPI
DsAddSidHistoryA( DsAddSidHistoryA(
HANDLE hDS, // in __in HANDLE hDS, // in
DWORD Flags, // in - sbz for now __reserved DWORD Flags, // in - sbz for n
LPCSTR SrcDomain, // in - DNS or NetBIOS ow
LPCSTR SrcPrincipal, // in - SAM account name __in LPCSTR SrcDomain, // in - DNS or NetBIOS
LPCSTR SrcDomainController, // in, optional __in LPCSTR SrcPrincipal, // in - SAM account nam
RPC_AUTH_IDENTITY_HANDLE SrcDomainCreds, // in - creds for src domain e
LPCSTR DstDomain, // in - DNS or NetBIOS __in_opt LPCSTR SrcDomainController, // in, optional
LPCSTR DstPrincipal); // in - SAM account name __in_opt RPC_AUTH_IDENTITY_HANDLE SrcDomainCreds, // in - creds for s
rc domain
__in LPCSTR DstDomain, // in - DNS or NetBIOS
__in LPCSTR DstPrincipal); // in - SAM account nam
e
#ifdef UNICODE #ifdef UNICODE
#define DsAddSidHistory DsAddSidHistoryW #define DsAddSidHistory DsAddSidHistoryW
#else #else
#define DsAddSidHistory DsAddSidHistoryA #define DsAddSidHistory DsAddSidHistoryA
#endif #endif
// The DsInheritSecurityIdentity API adds the source principal's SID and // The DsInheritSecurityIdentity API adds the source principal's SID and
// SID history to the destination principal's SID history and then DELETES // SID history to the destination principal's SID history and then DELETES
// THE SOURCE PRINCIPAL. Source and destination principal must be in the // THE SOURCE PRINCIPAL. Source and destination principal must be in the
// same domain. // same domain.
__checkReturn
NTDSAPI NTDSAPI
DWORD DWORD
WINAPI WINAPI
DsInheritSecurityIdentityW( DsInheritSecurityIdentityW(
HANDLE hDS, // in __in HANDLE hDS, // in
DWORD Flags, // in - sbz for now __reserved DWORD Flags, // in - sbz for n
LPCWSTR SrcPrincipal, // in - distinguished name ow
LPCWSTR DstPrincipal); // in - distinguished name __in LPCWSTR SrcPrincipal, // in - distinguished n
ame
__in LPCWSTR DstPrincipal); // in - distinguished n
ame
__checkReturn
NTDSAPI NTDSAPI
DWORD DWORD
WINAPI WINAPI
DsInheritSecurityIdentityA( DsInheritSecurityIdentityA(
HANDLE hDS, // in __in HANDLE hDS, // in
DWORD Flags, // in - sbz for now __reserved DWORD Flags, // in - sbz for n
LPCSTR SrcPrincipal, // in - distinguished name ow
LPCSTR DstPrincipal); // in - distinguished name __in LPCSTR SrcPrincipal, // in - distinguished n
ame
__in LPCSTR DstPrincipal); // in - distinguished n
ame
#ifdef UNICODE #ifdef UNICODE
#define DsInheritSecurityIdentity DsInheritSecurityIdentityW #define DsInheritSecurityIdentity DsInheritSecurityIdentityW
#else #else
#define DsInheritSecurityIdentity DsInheritSecurityIdentityA #define DsInheritSecurityIdentity DsInheritSecurityIdentityA
#endif #endif
#ifndef MIDL_PASS #ifndef MIDL_PASS
/*++ /*++
========================================================== ==========================================================
__checkReturn
NTDSAPI NTDSAPI
DWORD DWORD
WINAPI WINAPI
DsQuoteRdnValue( DsQuoteRdnValue(
IN DWORD cUnquotedRdnValueLength, DWORD cUnquotedRdnValueLength,
IN LPCTCH psUnquotedRdnValue, __in_ecount(cUnquotedRdnValueLength) LPCTCH psUnquotedRdnValue,
IN OUT DWORD *pcQuotedRdnValueLength, __inout DWORD *pcQuotedRdnValueLength,
OUT LPTCH psQuotedRdnValue __out_ecount_part(*pcQuotedRdnValueLength, *pcQuotedRdnValueLength) LPTCH
psQuotedRdnValue
) )
/*++ /*++
Description Description
This client call converts an RDN value into a quoted RDN value if This client call converts an RDN value into a quoted RDN value if
the RDN value contains characters that require quotes. The resultant the RDN value contains characters that require quotes. The resultant
RDN can be submitted as part of a DN to the DS using various APIs RDN can be submitted as part of a DN to the DS using various APIs
such as LDAP. such as LDAP.
skipping to change at line 3243 skipping to change at line 3319
to hold psQuotedRdnValue. to hold psQuotedRdnValue.
ERROR_INVALID_PARAMETER ERROR_INVALID_PARAMETER
Invalid parameter. Invalid parameter.
ERROR_NOT_ENOUGH_MEMORY ERROR_NOT_ENOUGH_MEMORY
Allocation error. Allocation error.
--*/ --*/
__checkReturn
NTDSAPI NTDSAPI
DWORD DWORD
WINAPI WINAPI
DsQuoteRdnValueW( DsQuoteRdnValueW(
IN DWORD cUnquotedRdnValueLength, DWORD cUnquotedRdnValueLength,
__in_ecount(cUnquotedRdnValueLength) IN LPCWCH psUnquotedRdnValue, __in_ecount(cUnquotedRdnValueLength) IN LPCWCH psUnquotedRdnValue,
IN OUT DWORD *pcQuotedRdnValueLength, __inout DWORD *pcQuotedRdnValueLength,
__out_ecount_part(*pcQuotedRdnValueLength, *pcQuotedRdnValueLength) OUT L __out_ecount_part(*pcQuotedRdnValueLength, *pcQuotedRdnValueLength) LPWCH
PWCH psQuotedRdnValue psQuotedRdnValue
); );
__checkReturn
NTDSAPI NTDSAPI
DWORD DWORD
WINAPI WINAPI
DsQuoteRdnValueA( DsQuoteRdnValueA(
IN DWORD cUnquotedRdnValueLength, DWORD cUnquotedRdnValueLength,
__in_ecount (cUnquotedRdnValueLength) IN LPCCH psUnquotedRdnValue, __in_ecount (cUnquotedRdnValueLength) IN LPCCH psUnquotedRdnValue,
IN OUT DWORD *pcQuotedRdnValueLength, __inout DWORD *pcQuotedRdnValueLength,
__out_ecount_part (*pcQuotedRdnValueLength, *pcQuotedRdnValueLength) OUT __out_ecount_part (*pcQuotedRdnValueLength, *pcQuotedRdnValueLength) LPCH
LPCH psQuotedRdnValue psQuotedRdnValue
); );
#ifdef UNICODE #ifdef UNICODE
#define DsQuoteRdnValue DsQuoteRdnValueW #define DsQuoteRdnValue DsQuoteRdnValueW
#else #else
#define DsQuoteRdnValue DsQuoteRdnValueA #define DsQuoteRdnValue DsQuoteRdnValueA
#endif #endif
/*++ /*++
========================================================== ==========================================================
__checkReturn
NTDSAPI NTDSAPI
DWORD DWORD
WINAPI WINAPI
DsUnquoteRdnValue( DsUnquoteRdnValue(
IN DWORD cQuotedRdnValueLength, DWORD cQuotedRdnValueLength,
IN LPCTCH psQuotedRdnValue, __in_ecount(cQuotedRdnValueLength) LPCTCH psQuotedRdnValue,
IN OUT DWORD *pcUnquotedRdnValueLength, __inout DWORD *pcUnquotedRdnValueLength,
OUT LPTCH psUnquotedRdnValue __out_ecount_part(*pcUnquotedRdnValueLength,*pcUnquotedRdnValueLength) LP
TCH psUnquotedRdnValue
) )
Description Description
This client call converts a quoted RDN Value into an unquoted RDN This client call converts a quoted RDN Value into an unquoted RDN
Value. The resultant RDN value should *NOT* be submitted as part Value. The resultant RDN value should *NOT* be submitted as part
of a DN to the DS using various APIs such as LDAP. of a DN to the DS using various APIs such as LDAP.
When psQuotedRdnValue is quoted: When psQuotedRdnValue is quoted:
The leading and trailing quote are removed. The leading and trailing quote are removed.
skipping to change at line 3348 skipping to change at line 3427
to hold psUnquotedRdnValue. to hold psUnquotedRdnValue.
ERROR_INVALID_PARAMETER ERROR_INVALID_PARAMETER
Invalid parameter. Invalid parameter.
ERROR_NOT_ENOUGH_MEMORY ERROR_NOT_ENOUGH_MEMORY
Allocation error. Allocation error.
--*/ --*/
__checkReturn
NTDSAPI NTDSAPI
DWORD DWORD
WINAPI WINAPI
DsUnquoteRdnValueW( DsUnquoteRdnValueW(
IN DWORD cQuotedRdnValueLength, DWORD cQuotedRdnValueLength,
__in_ecount (cQuotedRdnValueLength) IN LPCWCH psQuotedRdnValue, __in_ecount (cQuotedRdnValueLength) LPCWCH psQuotedRdnValue,
IN OUT DWORD *pcUnquotedRdnValueLength, __inout DWORD *pcUnquotedRdnValueLength,
__out_ecount_part (*pcUnquotedRdnValueLength, *pcUnquotedRdnValueLength) OUT __out_ecount_part (*pcUnquotedRdnValueLength, *pcUnquotedRdnValueLength) LPW
LPWCH psUnquotedRdnValue CH psUnquotedRdnValue
); );
__checkReturn
NTDSAPI NTDSAPI
DWORD DWORD
WINAPI WINAPI
DsUnquoteRdnValueA( DsUnquoteRdnValueA(
IN DWORD cQuotedRdnValueLength, DWORD cQuotedRdnValueLength,
__in_ecount (cQuotedRdnValueLength) IN LPCCH psQuotedRdnValue, __in_ecount (cQuotedRdnValueLength) LPCCH psQuotedRdnValue,
IN OUT DWORD *pcUnquotedRdnValueLength, __inout DWORD *pcUnquotedRdnValueLength,
__out_ecount_part (*pcUnquotedRdnValueLength, *pcUnquotedRdnValueLength) OUT __out_ecount_part (*pcUnquotedRdnValueLength, *pcUnquotedRdnValueLength) LPC
LPCH psUnquotedRdnValue H psUnquotedRdnValue
); );
#ifdef UNICODE #ifdef UNICODE
#define DsUnquoteRdnValue DsUnquoteRdnValueW #define DsUnquoteRdnValue DsUnquoteRdnValueW
#else #else
#define DsUnquoteRdnValue DsUnquoteRdnValueA #define DsUnquoteRdnValue DsUnquoteRdnValueA
#endif #endif
/*++ /*++
========================================================== ==========================================================
__checkReturn
NTDSAPI NTDSAPI
DWORD DWORD
WINAPI WINAPI
DsGetRdnW( DsGetRdnW(
IN OUT LPCWCH *ppDN, IN OUT LPCWCH *ppDN,
IN OUT DWORD *pcDN, IN OUT DWORD *pcDN,
OUT LPCWCH *ppKey, OUT LPCWCH *ppKey,
OUT DWORD *pcKey, OUT DWORD *pcKey,
OUT LPCWCH *ppVal, OUT LPCWCH *ppVal,
OUT DWORD *pcVal OUT DWORD *pcVal
skipping to change at line 3465 skipping to change at line 3547
*pccVal is 0, then *ppVal is undefined. *pccVal is 0, then *ppVal is undefined.
ERROR_DS_NAME_UNPARSEABLE ERROR_DS_NAME_UNPARSEABLE
The first RDN in *ppDN could not be parsed. All output parameters The first RDN in *ppDN could not be parsed. All output parameters
are undefined. are undefined.
Any other error Any other error
All output parameters are undefined. All output parameters are undefined.
--*/ --*/
__checkReturn
NTDSAPI NTDSAPI
DWORD DWORD
WINAPI WINAPI
DsGetRdnW( DsGetRdnW(
IN OUT LPCWCH *ppDN, __deref_inout_ecount_part(*pcDN,*pcDN) LPCWCH *ppDN,
IN OUT DWORD *pcDN, __inout DWORD *pcDN,
OUT LPCWCH *ppKey, __deref_out_ecount(*pcKey) LPCWCH *ppKey,
OUT DWORD *pcKey, __out DWORD *pcKey,
OUT LPCWCH *ppVal, __deref_out_ecount(*pcVal) LPCWCH *ppVal,
OUT DWORD *pcVal __out DWORD *pcVal
); );
/*++ /*++
========================================================== ==========================================================
__checkReturn
NTDSAPI NTDSAPI
BOOL BOOL
WINAPI WINAPI
DsCrackUnquotedMangledRdnW( DsCrackUnquotedMangledRdnW(
IN LPCWSTR pszRDN, IN LPCWSTR pszRDN,
IN DWORD cchRDN, IN DWORD cchRDN,
OUT OPTIONAL GUID *pGuid, OUT OPTIONAL GUID *pGuid,
OUT OPTIONAL DS_MANGLE_FOR *peDsMangleFor OUT OPTIONAL DS_MANGLE_FOR *peDsMangleFor
); );
skipping to change at line 3519 skipping to change at line 3603
Return Value: Return Value:
BOOL - Whether the RDN is mangled or not BOOL - Whether the RDN is mangled or not
--*/ --*/
NTDSAPI NTDSAPI
BOOL BOOL
WINAPI WINAPI
DsCrackUnquotedMangledRdnW( DsCrackUnquotedMangledRdnW(
IN LPCWSTR pszRDN, __in_ecount(cchRDN) LPCWSTR pszRDN,
IN DWORD cchRDN, DWORD cchRDN,
OUT OPTIONAL GUID *pGuid, __out_opt GUID *pGuid,
OUT OPTIONAL DS_MANGLE_FOR *peDsMangleFor __out_opt DS_MANGLE_FOR *peDsMangleFor
); );
NTDSAPI NTDSAPI
BOOL BOOL
WINAPI WINAPI
DsCrackUnquotedMangledRdnA( DsCrackUnquotedMangledRdnA(
IN LPCSTR pszRDN, __in_ecount(cchRDN) LPCSTR pszRDN,
IN DWORD cchRDN, DWORD cchRDN,
OUT OPTIONAL GUID *pGuid, __out_opt GUID *pGuid,
OUT OPTIONAL DS_MANGLE_FOR *peDsMangleFor __out_opt DS_MANGLE_FOR *peDsMangleFor
); );
#ifdef UNICODE #ifdef UNICODE
#define DsCrackUnquotedMangledRdn DsCrackUnquotedMangledRdnW #define DsCrackUnquotedMangledRdn DsCrackUnquotedMangledRdnW
#else #else
#define DsCrackUnquotedMangledRdn DsCrackUnquotedMangledRdnA #define DsCrackUnquotedMangledRdn DsCrackUnquotedMangledRdnA
#endif #endif
/*++ /*++
========================================================== ==========================================================
__checkReturn
NTDSAPI NTDSAPI
BOOL BOOL
WINAPI WINAPI
DsIsMangledRdnValueW( DsIsMangledRdnValueW(
LPCWSTR pszRdn, LPCWSTR pszRdn,
DWORD cRdn, DWORD cRdn,
DS_MANGLE_FOR eDsMangleForDesired DS_MANGLE_FOR eDsMangleForDesired
); );
Description Description
skipping to change at line 3593 skipping to change at line 3678
Return Value: Return Value:
BOOL - True if the Rdn is mangled and is of the required type BOOL - True if the Rdn is mangled and is of the required type
--*/ --*/
NTDSAPI NTDSAPI
BOOL BOOL
WINAPI WINAPI
DsIsMangledRdnValueW( DsIsMangledRdnValueW(
LPCWSTR pszRdn, __in_ecount(cRdn) LPCWSTR pszRdn,
DWORD cRdn, DWORD cRdn,
DS_MANGLE_FOR eDsMangleForDesired DS_MANGLE_FOR eDsMangleForDesired
); );
NTDSAPI NTDSAPI
BOOL BOOL
WINAPI WINAPI
DsIsMangledRdnValueA( DsIsMangledRdnValueA(
LPCSTR pszRdn, __in_ecount(cRdn) LPCSTR pszRdn,
DWORD cRdn, DWORD cRdn,
DS_MANGLE_FOR eDsMangleForDesired DS_MANGLE_FOR eDsMangleForDesired
); );
#ifdef UNICODE #ifdef UNICODE
#define DsIsMangledRdnValue DsIsMangledRdnValueW #define DsIsMangledRdnValue DsIsMangledRdnValueW
#else #else
#define DsIsMangledRdnValue DsIsMangledRdnValueA #define DsIsMangledRdnValue DsIsMangledRdnValueA
#endif #endif
skipping to change at line 3651 skipping to change at line 3736
Return Value: Return Value:
BOOL - True if first RDN is mangled and is of the given mangle type BOOL - True if first RDN is mangled and is of the given mangle type
--*/ --*/
NTDSAPI NTDSAPI
BOOL BOOL
WINAPI WINAPI
DsIsMangledDnA( DsIsMangledDnA(
LPCSTR pszDn, __in LPCSTR pszDn,
DS_MANGLE_FOR eDsMangleFor DS_MANGLE_FOR eDsMangleFor
); );
NTDSAPI NTDSAPI
BOOL BOOL
WINAPI WINAPI
DsIsMangledDnW( DsIsMangledDnW(
LPCWSTR pszDn, __in LPCWSTR pszDn,
DS_MANGLE_FOR eDsMangleFor DS_MANGLE_FOR eDsMangleFor
); );
#ifdef UNICODE #ifdef UNICODE
#define DsIsMangledDn DsIsMangledDnW #define DsIsMangledDn DsIsMangledDnW
#else #else
#define DsIsMangledDn DsIsMangledDnA #define DsIsMangledDn DsIsMangledDnA
#endif #endif
// ------------------------------------------------------------------------- // -------------------------------------------------------------------------
skipping to change at line 3712 skipping to change at line 3797
#define ADAM_REPL_AUTHENTICATION_MODE_NEGOTIATE_PASS_THROUGH 0 #define ADAM_REPL_AUTHENTICATION_MODE_NEGOTIATE_PASS_THROUGH 0
// Negotiate authentication. If Kerberos is available, it will be used. // Negotiate authentication. If Kerberos is available, it will be used.
// Otherwise, authentication will fall back to NTLM (unless machine policy // Otherwise, authentication will fall back to NTLM (unless machine policy
// forbids this). // forbids this).
#define ADAM_REPL_AUTHENTICATION_MODE_NEGOTIATE 1 #define ADAM_REPL_AUTHENTICATION_MODE_NEGOTIATE 1
// ADAM will require Kerberos mutual authentication. // ADAM will require Kerberos mutual authentication.
#define ADAM_REPL_AUTHENTICATION_MODE_MUTUAL_AUTH_REQUIRED 2 #define ADAM_REPL_AUTHENTICATION_MODE_MUTUAL_AUTH_REQUIRED 2
// -------------------------------------------------------------------------
// Optional Feature values:
// -------------------------------------------------------------------------
// Flags for the msDS-OptionalFeatureFlags attribute of the FeatureConfiguration
object.
#define FLAG_FOREST_OPTIONAL_FEATURE (0x00000001) // The optional feature is
a forest level feature.
#define FLAG_DOMAIN_OPTIONAL_FEATURE (0x00000002) // The optional feature is
a domain level feature.
#define FLAG_DISABLABLE_OPTIONAL_FEATURE (0x00000004) // The optional feature ma
y be turned off.
// GUID of the Recycle Bin optional feature
#define GUID_RECYCLE_BIN_OPTIONAL_FEATURE_A "d8dc6d76d0ac5e44f3b9a7f9b6744f2
a"
#define GUID_RECYCLE_BIN_OPTIONAL_FEATURE_W L"d8dc6d76d0ac5e44f3b9a7f9b6744f2
a"
#define GUID_RECYCLE_BIN_OPTIONAL_FEATURE_BYTE "\xd8\xdc\x6d\x76\xd0\xac\x5e\x4
4\xf3\xb9\xa7\xf9\xb6\x74\x4f\x2a"
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif !MIDL_PASS #endif !MIDL_PASS
#endif // _NTDSAPI_H_ #endif // _NTDSAPI_H_
 End of changes. 205 change blocks. 
401 lines changed or deleted 520 lines changed or added

This html diff was produced by rfcdiff 1.41.