| ntdsapi.h (6.1.7600.16385-Windows_7.0) | | ntdsapi.h (6.3.9600.17415-Windows_8.1) |
| | |
| skipping to change at line 28 | | skipping to change at line 28 |
| Notes: | | Notes: |
| | |
| --*/ | | --*/ |
| | |
| #ifndef _NTDSAPI_H_ | | #ifndef _NTDSAPI_H_ |
| #define _NTDSAPI_H_ | | #define _NTDSAPI_H_ |
| | |
| #if _MSC_VER > 1000 | | #if _MSC_VER > 1000 |
| #pragma once | | #pragma once |
| #endif | | #endif |
|
| | #include <winapifamily.h> |
| | |
| | #pragma region Desktop Family |
| | #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) |
| | |
| #include <schedule.h> | | #include <schedule.h> |
|
| | #include <dsparse.h> |
| | |
| #if !defined(_NTDSAPI_) | | #if !defined(_NTDSAPI_) |
| #define NTDSAPI DECLSPEC_IMPORT | | #define NTDSAPI DECLSPEC_IMPORT |
| #if !defined(_NTDSAPI_POSTXP_ASLIB_) | | #if !defined(_NTDSAPI_POSTXP_ASLIB_) |
| #define NTDSAPI_POSTXP DECLSPEC_IMPORT | | #define NTDSAPI_POSTXP DECLSPEC_IMPORT |
| #else | | #else |
| #define NTDSAPI_POSTXP | | #define NTDSAPI_POSTXP |
| #endif | | #endif |
| #else | | #else |
| #define NTDSAPI | | #define NTDSAPI |
| | |
| skipping to change at line 66 | | skipping to change at line 71 |
| 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_WIN2008 3 | | #define DS_BEHAVIOR_WIN2008 3 |
| #define DS_BEHAVIOR_WIN2008R2 4 | | #define DS_BEHAVIOR_WIN2008R2 4 |
|
| | #define DS_BEHAVIOR_WIN2012 5 |
| | #define DS_BEHAVIOR_WIN2012R2 6 |
| | |
| // Deprecated constants | | // Deprecated constants |
|
| #define DS_BEHAVIOR_LONGHORN DS_BEHAVIOR_WIN2008 | | #define DS_BEHAVIOR_LONGHORN DS_BEHAVIOR_WIN2008 |
| #define DS_BEHAVIOR_WIN7 DS_BEHAVIOR_WIN2008R2 | | #define DS_BEHAVIOR_WIN7 DS_BEHAVIOR_WIN2008R2 |
| | #define DS_BEHAVIOR_WIN8 DS_BEHAVIOR_WIN2012 |
| | #define DS_BEHAVIOR_WINBLUE DS_BEHAVIOR_WIN2012R2 |
| | |
| #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 758 | | skipping to change at line 767 |
| | |
| // This bit means: | | // This bit means: |
| // 0 - Compression of replication data across this site link enabled | | // 0 - Compression of replication data across this site link enabled |
| // 1 - Compression of replication data across this site link disabled | | // 1 - Compression of replication data across this site link disabled |
| #define NTDSSITELINK_OPT_DISABLE_COMPRESSION ( 1 << 2 ) | | #define NTDSSITELINK_OPT_DISABLE_COMPRESSION ( 1 << 2 ) |
| | |
| // *********************** | | // *********************** |
| // Well Known Object Guids | | // Well Known Object Guids |
| // *********************** | | // *********************** |
| | |
|
| #define GUID_USERS_CONTAINER_A "a9d1ca15768811d1aded00c04fd8d5cd" | | #define GUID_USERS_CONTAINER_A "a9d1ca15768811d1aded00c04fd |
| #define GUID_COMPUTRS_CONTAINER_A "aa312825768811d1aded00c04fd8d5cd" | | 8d5cd" |
| #define GUID_SYSTEMS_CONTAINER_A "ab1d30f3768811d1aded00c04fd8d5cd" | | #define GUID_COMPUTRS_CONTAINER_A "aa312825768811d1aded00c04fd |
| #define GUID_DOMAIN_CONTROLLERS_CONTAINER_A "a361b2ffffd211d1aa4b00c04fd7d83a" | | 8d5cd" |
| #define GUID_INFRASTRUCTURE_CONTAINER_A "2fbac1870ade11d297c400c04fd8d5cd" | | #define GUID_SYSTEMS_CONTAINER_A "ab1d30f3768811d1aded00c04fd |
| #define GUID_DELETED_OBJECTS_CONTAINER_A "18e2ea80684f11d2b9aa00c04f79f805" | | 8d5cd" |
| #define GUID_LOSTANDFOUND_CONTAINER_A "ab8153b7768811d1aded00c04fd8d5cd" | | #define GUID_DOMAIN_CONTROLLERS_CONTAINER_A "a361b2ffffd211d1aa4b00c04fd |
| #define GUID_FOREIGNSECURITYPRINCIPALS_CONTAINER_A "22b70c67d56e4efb91e9300fca3d | | 7d83a" |
| c1aa" | | #define GUID_INFRASTRUCTURE_CONTAINER_A "2fbac1870ade11d297c400c04fd |
| #define GUID_PROGRAM_DATA_CONTAINER_A "09460c08ae1e4a4ea0f64aee7daa1e5a" | | 8d5cd" |
| #define GUID_MICROSOFT_PROGRAM_DATA_CONTAINER_A "f4be92a4c777485e878e9421d53087d | | #define GUID_DELETED_OBJECTS_CONTAINER_A "18e2ea80684f11d2b9aa00c04f7 |
| b" | | 9f805" |
| #define GUID_NTDS_QUOTAS_CONTAINER_A "6227f0af1fc2410d8e3bb10615bb5b0f" | | #define GUID_LOSTANDFOUND_CONTAINER_A "ab8153b7768811d1aded00c04fd |
| | 8d5cd" |
| #define GUID_USERS_CONTAINER_W L"a9d1ca15768811d1aded00c04fd8d5cd" | | #define GUID_FOREIGNSECURITYPRINCIPALS_CONTAINER_A "22b70c67d56e4efb91e9300fca3 |
| #define GUID_COMPUTRS_CONTAINER_W L"aa312825768811d1aded00c04fd8d5cd" | | dc1aa" |
| #define GUID_SYSTEMS_CONTAINER_W L"ab1d30f3768811d1aded00c04fd8d5cd" | | #define GUID_PROGRAM_DATA_CONTAINER_A "09460c08ae1e4a4ea0f64aee7da |
| #define GUID_DOMAIN_CONTROLLERS_CONTAINER_W L"a361b2ffffd211d1aa4b00c04fd7d83a" | | a1e5a" |
| #define GUID_INFRASTRUCTURE_CONTAINER_W L"2fbac1870ade11d297c400c04fd8d5cd" | | #define GUID_MICROSOFT_PROGRAM_DATA_CONTAINER_A "f4be92a4c777485e878e9421d53 |
| #define GUID_DELETED_OBJECTS_CONTAINER_W L"18e2ea80684f11d2b9aa00c04f79f805" | | 087db" |
| #define GUID_LOSTANDFOUND_CONTAINER_W L"ab8153b7768811d1aded00c04fd8d5cd" | | #define GUID_NTDS_QUOTAS_CONTAINER_A "6227f0af1fc2410d8e3bb10615b |
| #define GUID_FOREIGNSECURITYPRINCIPALS_CONTAINER_W L"22b70c67d56e4efb91e9300fca3 | | b5b0f" |
| dc1aa" | | |
| #define GUID_PROGRAM_DATA_CONTAINER_W L"09460c08ae1e4a4ea0f64aee7daa1e5a" | | |
| #define GUID_MICROSOFT_PROGRAM_DATA_CONTAINER_W L"f4be92a4c777485e878e9421d53087 | | |
| db" | | |
| #define GUID_NTDS_QUOTAS_CONTAINER_W L"6227f0af1fc2410d8e3bb10615bb5b0f" | | |
| | |
|
| #define GUID_USERS_CONTAINER_BYTE "\xa9\xd1\xca\x15\x76\x88\x11\xd1 | | #define GUID_USERS_CONTAINER_W L"a9d1ca15768811d1aded00c04f |
| \xad\xed\x00\xc0\x4f\xd8\xd5\xcd" | | d8d5cd" |
| #define GUID_COMPUTRS_CONTAINER_BYTE "\xaa\x31\x28\x25\x76\x88\x11\xd1 | | #define GUID_COMPUTRS_CONTAINER_W L"aa312825768811d1aded00c04f |
| \xad\xed\x00\xc0\x4f\xd8\xd5\xcd" | | d8d5cd" |
| #define GUID_SYSTEMS_CONTAINER_BYTE "\xab\x1d\x30\xf3\x76\x88\x11\xd1 | | #define GUID_SYSTEMS_CONTAINER_W L"ab1d30f3768811d1aded00c04f |
| \xad\xed\x00\xc0\x4f\xd8\xd5\xcd" | | d8d5cd" |
| #define GUID_DOMAIN_CONTROLLERS_CONTAINER_BYTE "\xa3\x61\xb2\xff\xff\xd2\x11\xd1 | | #define GUID_DOMAIN_CONTROLLERS_CONTAINER_W L"a361b2ffffd211d1aa4b00c04f |
| \xaa\x4b\x00\xc0\x4f\xd7\xd8\x3a" | | d7d83a" |
| #define GUID_INFRASTRUCTURE_CONTAINER_BYTE "\x2f\xba\xc1\x87\x0a\xde\x11\xd2 | | #define GUID_INFRASTRUCTURE_CONTAINER_W L"2fbac1870ade11d297c400c04f |
| \x97\xc4\x00\xc0\x4f\xd8\xd5\xcd" | | d8d5cd" |
| #define GUID_DELETED_OBJECTS_CONTAINER_BYTE "\x18\xe2\xea\x80\x68\x4f\x11\xd2 | | #define GUID_DELETED_OBJECTS_CONTAINER_W L"18e2ea80684f11d2b9aa00c04f |
| \xb9\xaa\x00\xc0\x4f\x79\xf8\x05" | | 79f805" |
| #define GUID_LOSTANDFOUND_CONTAINER_BYTE "\xab\x81\x53\xb7\x76\x88\x11\xd1 | | #define GUID_LOSTANDFOUND_CONTAINER_W L"ab8153b7768811d1aded00c04f |
| \xad\xed\x00\xc0\x4f\xd8\xd5\xcd" | | d8d5cd" |
| #define GUID_FOREIGNSECURITYPRINCIPALS_CONTAINER_BYTE "\x22\xb7\x0c\x67\xd5\x6e\ | | #define GUID_FOREIGNSECURITYPRINCIPALS_CONTAINER_W L"22b70c67d56e4efb91e9300fca |
| x4e\xfb\x91\xe9\x30\x0f\xca\x3d\xc1\xaa" | | 3dc1aa" |
| #define GUID_PROGRAM_DATA_CONTAINER_BYTE "\x09\x46\x0c\x08\xae\x1e\x4a\x4e | | #define GUID_PROGRAM_DATA_CONTAINER_W L"09460c08ae1e4a4ea0f64aee7d |
| \xa0\xf6\x4a\xee\x7d\xaa\x1e\x5a" | | aa1e5a" |
| #define GUID_MICROSOFT_PROGRAM_DATA_CONTAINER_BYTE "\xf4\xbe\x92\xa4\xc7\x77\x48 | | #define GUID_MICROSOFT_PROGRAM_DATA_CONTAINER_W L"f4be92a4c777485e878e9421d5 |
| \x5e\x87\x8e\x94\x21\xd5\x30\x87\xdb" | | 3087db" |
| #define GUID_NTDS_QUOTAS_CONTAINER_BYTE "\x62\x27\xf0\xaf\x1f\xc2\x41\x0d | | #define GUID_NTDS_QUOTAS_CONTAINER_W L"6227f0af1fc2410d8e3bb10615 |
| \x8e\x3b\xb1\x06\x15\xbb\x5b\x0f" | | bb5b0f" |
| | #define GUID_MANAGED_SERVICE_ACCOUNTS_CONTAINER_W L"1EB93889E40C45DF9F0C64D23B |
| | BB6237" |
| | |
|
| typedef enum _DS_MANGLE_FOR { | | #define GUID_USERS_CONTAINER_BYTE "\xa9\xd1\xca\x15\x76\x8 |
| DS_MANGLE_UNKNOWN = 0, | | 8\x11\xd1\xad\xed\x00\xc0\x4f\xd8\xd5\xcd" |
| DS_MANGLE_OBJECT_RDN_FOR_DELETION, | | #define GUID_COMPUTRS_CONTAINER_BYTE "\xaa\x31\x28\x25\x76\x8 |
| DS_MANGLE_OBJECT_RDN_FOR_NAME_CONFLICT, | | 8\x11\xd1\xad\xed\x00\xc0\x4f\xd8\xd5\xcd" |
| } DS_MANGLE_FOR; | | #define GUID_SYSTEMS_CONTAINER_BYTE "\xab\x1d\x30\xf3\x76\x8 |
| | 8\x11\xd1\xad\xed\x00\xc0\x4f\xd8\xd5\xcd" |
| | #define GUID_DOMAIN_CONTROLLERS_CONTAINER_BYTE "\xa3\x61\xb2\xff\xff\xd |
| | 2\x11\xd1\xaa\x4b\x00\xc0\x4f\xd7\xd8\x3a" |
| | #define GUID_INFRASTRUCTURE_CONTAINER_BYTE "\x2f\xba\xc1\x87\x0a\xd |
| | e\x11\xd2\x97\xc4\x00\xc0\x4f\xd8\xd5\xcd" |
| | #define GUID_DELETED_OBJECTS_CONTAINER_BYTE "\x18\xe2\xea\x80\x68\x4 |
| | f\x11\xd2\xb9\xaa\x00\xc0\x4f\x79\xf8\x05" |
| | #define GUID_LOSTANDFOUND_CONTAINER_BYTE "\xab\x81\x53\xb7\x76\x8 |
| | 8\x11\xd1\xad\xed\x00\xc0\x4f\xd8\xd5\xcd" |
| | #define GUID_FOREIGNSECURITYPRINCIPALS_CONTAINER_BYTE "\x22\xb7\x0c\x67\xd5\x6 |
| | e\x4e\xfb\x91\xe9\x30\x0f\xca\x3d\xc1\xaa" |
| | #define GUID_PROGRAM_DATA_CONTAINER_BYTE "\x09\x46\x0c\x08\xae\x1 |
| | e\x4a\x4e\xa0\xf6\x4a\xee\x7d\xaa\x1e\x5a" |
| | #define GUID_MICROSOFT_PROGRAM_DATA_CONTAINER_BYTE "\xf4\xbe\x92\xa4\xc7\x7 |
| | 7\x48\x5e\x87\x8e\x94\x21\xd5\x30\x87\xdb" |
| | #define GUID_NTDS_QUOTAS_CONTAINER_BYTE "\x62\x27\xf0\xaf\x1f\xc |
| | 2\x41\x0d\x8e\x3b\xb1\x06\x15\xbb\x5b\x0f" |
| | |
| ////////////////////////////////////////////////////////////////////////// | | ////////////////////////////////////////////////////////////////////////// |
| // // | | // // |
| // Prototypes // | | // Prototypes // |
| // // | | // // |
| ////////////////////////////////////////////////////////////////////////// | | ////////////////////////////////////////////////////////////////////////// |
| | |
| // DSBind takes two optional input parameters which identify whether the | | // DSBind takes two optional input parameters which identify whether the |
| // caller found a domain controller themselves via DsGetDcName or whether | | // caller found a domain controller themselves via DsGetDcName or whether |
| // a domain controller should be found using default parameters. | | // a domain controller should be found using default parameters. |
| | |
| skipping to change at line 869 | | skipping to change at line 873 |
| // | | // |
| // 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 | | _Check_return_ |
| NTDSAPI | | NTDSAPI |
| DWORD | | DWORD |
| WINAPI | | WINAPI |
| DsBindW( | | DsBindW( |
|
| __in_opt LPCWSTR DomainControllerName, // in, optional | | _In_opt_ LPCWSTR DomainControllerName, // in, optional |
| __in_opt LPCWSTR DnsDomainName, // in, optional | | _In_opt_ LPCWSTR DnsDomainName, // in, optional |
| __out HANDLE *phDS); | | _Out_ HANDLE *phDS); |
| | |
|
| __checkReturn | | _Check_return_ |
| NTDSAPI | | NTDSAPI |
| DWORD | | DWORD |
| WINAPI | | WINAPI |
| DsBindA( | | DsBindA( |
|
| __in_opt LPCSTR DomainControllerName, // in, optional | | _In_opt_ LPCSTR DomainControllerName, // in, optional |
| __in_opt LPCSTR DnsDomainName, // in, optional | | _In_opt_ LPCSTR DnsDomainName, // in, optional |
| __out 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 | | _Check_return_ |
| NTDSAPI | | NTDSAPI |
| DWORD | | DWORD |
| WINAPI | | WINAPI |
| DsBindWithCredW( | | DsBindWithCredW( |
|
| __in_opt LPCWSTR DomainControllerName, // in, optional | | _In_opt_ LPCWSTR DomainControllerName, // in, optional |
| __in_opt LPCWSTR DnsDomainName, // in, optional | | _In_opt_ LPCWSTR DnsDomainName, // in, optional |
| __in_opt RPC_AUTH_IDENTITY_HANDLE AuthIdentity, // in, optional | | _In_opt_ RPC_AUTH_IDENTITY_HANDLE AuthIdentity, // in, optional |
| __out HANDLE *phDS); | | _Out_ HANDLE *phDS); |
| | |
|
| __checkReturn | | _Check_return_ |
| NTDSAPI | | NTDSAPI |
| DWORD | | DWORD |
| WINAPI | | WINAPI |
| DsBindWithCredA( | | DsBindWithCredA( |
|
| __in_opt LPCSTR DomainControllerName, // in, optional | | _In_opt_ LPCSTR DomainControllerName, // in, optional |
| __in_opt LPCSTR DnsDomainName, // in, optional | | _In_opt_ LPCSTR DnsDomainName, // in, optional |
| __in_opt RPC_AUTH_IDENTITY_HANDLE AuthIdentity, // in, optional | | _In_opt_ RPC_AUTH_IDENTITY_HANDLE AuthIdentity, // in, optional |
| __out 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 | | _Check_return_ |
| NTDSAPI | | NTDSAPI |
| DWORD | | DWORD |
| WINAPI | | WINAPI |
| DsBindWithSpnW( | | DsBindWithSpnW( |
|
| __in_opt LPCWSTR DomainControllerName, // in, optional | | _In_opt_ LPCWSTR DomainControllerName, // in, optional |
| __in_opt LPCWSTR DnsDomainName, // in, optional | | _In_opt_ LPCWSTR DnsDomainName, // in, optional |
| __in_opt RPC_AUTH_IDENTITY_HANDLE AuthIdentity, // in, optional | | _In_opt_ RPC_AUTH_IDENTITY_HANDLE AuthIdentity, // in, optional |
| __in_opt LPCWSTR ServicePrincipalName, // in, optional | | _In_opt_ LPCWSTR ServicePrincipalName, // in, optional |
| __out HANDLE *phDS); | | _Out_ HANDLE *phDS); |
| | |
|
| __checkReturn | | _Check_return_ |
| NTDSAPI | | NTDSAPI |
| DWORD | | DWORD |
| WINAPI | | WINAPI |
| DsBindWithSpnA( | | DsBindWithSpnA( |
|
| __in_opt LPCSTR DomainControllerName, // in, optional | | _In_opt_ LPCSTR DomainControllerName, // in, optional |
| __in_opt LPCSTR DnsDomainName, // in, optional | | _In_opt_ LPCSTR DnsDomainName, // in, optional |
| __in_opt RPC_AUTH_IDENTITY_HANDLE AuthIdentity, // in, optional | | _In_opt_ RPC_AUTH_IDENTITY_HANDLE AuthIdentity, // in, optional |
| __in_opt LPCSTR ServicePrincipalName, // in, optional | | _In_opt_ LPCSTR ServicePrincipalName, // in, optional |
| __out 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 | | _Check_return_ |
| NTDSAPI_POSTXP | | NTDSAPI_POSTXP |
| DWORD | | DWORD |
| WINAPI | | WINAPI |
| DsBindWithSpnExW( | | DsBindWithSpnExW( |
|
| __in_opt LPCWSTR DomainControllerName, // in, optional | | _In_opt_ LPCWSTR DomainControllerName, // in, optional |
| __in_opt LPCWSTR DnsDomainName, // in, optional | | _In_opt_ LPCWSTR DnsDomainName, // in, optional |
| __in_opt RPC_AUTH_IDENTITY_HANDLE AuthIdentity, // in, optional | | _In_opt_ RPC_AUTH_IDENTITY_HANDLE AuthIdentity, // in, optional |
| __in_opt LPCWSTR ServicePrincipalName, // in, optional | | _In_opt_ LPCWSTR ServicePrincipalName, // in, optional |
| __in_opt DWORD BindFlags, // in, optional | | _In_opt_ DWORD BindFlags, // in, optional |
| __out HANDLE *phDS); | | _Out_ HANDLE *phDS); |
| | |
|
| __checkReturn | | _Check_return_ |
| NTDSAPI_POSTXP | | NTDSAPI_POSTXP |
| DWORD | | DWORD |
| WINAPI | | WINAPI |
| DsBindWithSpnExA( | | DsBindWithSpnExA( |
|
| __in_opt LPCSTR DomainControllerName, // in, optional | | _In_opt_ LPCSTR DomainControllerName, // in, optional |
| __in_opt LPCSTR DnsDomainName, // in, optional | | _In_opt_ LPCSTR DnsDomainName, // in, optional |
| __in_opt RPC_AUTH_IDENTITY_HANDLE AuthIdentity, // in, optional | | _In_opt_ RPC_AUTH_IDENTITY_HANDLE AuthIdentity, // in, optional |
| __in_opt LPCSTR ServicePrincipalName, // in, optional | | _In_opt_ LPCSTR ServicePrincipalName, // in, optional |
| __in_opt DWORD BindFlags, // in, optional | | _In_opt_ DWORD BindFlags, // in, optional |
| __out 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 | | _Check_return_ |
| NTDSAPI_POSTXP | | NTDSAPI_POSTXP |
| DWORD | | DWORD |
| WINAPI | | WINAPI |
| DsBindByInstanceW( | | DsBindByInstanceW( |
|
| __in_opt LPCWSTR ServerName, // in, optional | | _In_opt_ LPCWSTR ServerName, // in, optional |
| __in_opt LPCWSTR Annotation, // in, optional | | _In_opt_ LPCWSTR Annotation, // in, optional |
| __in_opt GUID * InstanceGuid, // in, optional | | _In_opt_ GUID * InstanceGuid, // in, optional |
| __in_opt LPCWSTR DnsDomainName, // in, optional | | _In_opt_ LPCWSTR DnsDomainName, // in, optional |
| __in_opt RPC_AUTH_IDENTITY_HANDLE AuthIdentity, // in, optional | | _In_opt_ RPC_AUTH_IDENTITY_HANDLE AuthIdentity, // in, optional |
| __in_opt LPCWSTR ServicePrincipalName, // in, optional | | _In_opt_ LPCWSTR ServicePrincipalName, // in, optional |
| __in_opt DWORD BindFlags, // in, optional | | _In_opt_ DWORD BindFlags, // in, optional |
| __out HANDLE *phDS); | | _Out_ HANDLE *phDS); |
| | |
|
| __checkReturn | | _Check_return_ |
| NTDSAPI_POSTXP | | NTDSAPI_POSTXP |
| DWORD | | DWORD |
| WINAPI | | WINAPI |
| DsBindByInstanceA( | | DsBindByInstanceA( |
|
| __in_opt LPCSTR ServerName, // in, optional | | _In_opt_ LPCSTR ServerName, // in, optional |
| __in_opt LPCSTR Annotation, // in, optional | | _In_opt_ LPCSTR Annotation, // in, optional |
| __in_opt GUID * InstanceGuid, // in, optional | | _In_opt_ GUID * InstanceGuid, // in, optional |
| __in_opt LPCSTR DnsDomainName, // in, optional | | _In_opt_ LPCSTR DnsDomainName, // in, optional |
| __in_opt RPC_AUTH_IDENTITY_HANDLE AuthIdentity, // in, optional | | _In_opt_ RPC_AUTH_IDENTITY_HANDLE AuthIdentity, // in, optional |
| __in_opt LPCSTR ServicePrincipalName, // in, optional | | _In_opt_ LPCSTR ServicePrincipalName, // in, optional |
| __in_opt DWORD BindFlags, // in, optional | | _In_opt_ DWORD BindFlags, // in, optional |
| __out 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 | | _Check_return_ |
| NTDSAPI_POSTXP | | NTDSAPI_POSTXP |
| DWORD | | DWORD |
| WINAPI | | WINAPI |
| DsBindToISTGW( | | DsBindToISTGW( |
|
| __in_opt LPCWSTR SiteName, // in, optional | | _In_opt_ LPCWSTR SiteName, // in, optional |
| __out HANDLE *phDS); | | _Out_ HANDLE *phDS); |
| | |
|
| __checkReturn | | _Check_return_ |
| NTDSAPI_POSTXP | | NTDSAPI_POSTXP |
| DWORD | | DWORD |
| WINAPI | | WINAPI |
| DsBindToISTGA( | | DsBindToISTGA( |
|
| __in_opt LPCSTR SiteName, // in, optional | | _In_opt_ LPCSTR SiteName, // in, optional |
| __out 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 | | _Check_return_ |
| NTDSAPI_POSTXP | | NTDSAPI_POSTXP |
| DWORD | | DWORD |
| WINAPI | | WINAPI |
| DsBindingSetTimeout( | | DsBindingSetTimeout( |
|
| __in HANDLE hDS, // in | | _In_ HANDLE hDS, // in |
| __in ULONG cTimeoutSecs // in | | _In_ ULONG cTimeoutSecs // in |
| ); | | ); |
| | |
| // | | // |
| // DsUnBind | | // DsUnBind |
| // | | // |
| | |
| NTDSAPI | | NTDSAPI |
| DWORD | | DWORD |
| WINAPI | | WINAPI |
| DsUnBindW( | | DsUnBindW( |
|
| __in HANDLE *phDS); // in | | _In_ HANDLE *phDS); // in |
| | |
| NTDSAPI | | NTDSAPI |
| DWORD | | DWORD |
| WINAPI | | WINAPI |
| DsUnBindA( | | DsUnBindA( |
|
| __in 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 | | _Check_return_ |
| NTDSAPI | | NTDSAPI |
| DWORD | | DWORD |
| WINAPI | | WINAPI |
| DsMakePasswordCredentialsW( | | DsMakePasswordCredentialsW( |
|
| __in_opt LPCWSTR User, | | _In_opt_ LPCWSTR User, |
| __in_opt LPCWSTR Domain, | | _In_opt_ LPCWSTR Domain, |
| __in_opt LPCWSTR Password, | | _In_opt_ LPCWSTR Password, |
| __out RPC_AUTH_IDENTITY_HANDLE *pAuthIdentity | | _Out_ RPC_AUTH_IDENTITY_HANDLE *pAuthIdentity |
| ); | | ); |
| | |
|
| __checkReturn | | _Check_return_ |
| NTDSAPI | | NTDSAPI |
| DWORD | | DWORD |
| WINAPI | | WINAPI |
| DsMakePasswordCredentialsA( | | DsMakePasswordCredentialsA( |
|
| __in_opt LPCSTR User, | | _In_opt_ LPCSTR User, |
| __in_opt LPCSTR Domain, | | _In_opt_ LPCSTR Domain, |
| __in_opt LPCSTR Password, | | _In_opt_ LPCSTR Password, |
| __out 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( |
|
| __in 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 | | _Check_return_ |
| NTDSAPI | | NTDSAPI |
| DWORD | | DWORD |
| WINAPI | | WINAPI |
| DsCrackNamesW( | | DsCrackNamesW( |
|
| __in_opt HANDLE hDS, // in | | _In_opt_ HANDLE hDS, // in |
| __in DS_NAME_FLAGS flags, // in | | _In_ DS_NAME_FLAGS flags, // in |
| __in DS_NAME_FORMAT formatOffered, // in | | _In_ DS_NAME_FORMAT formatOffered, // in |
| __in DS_NAME_FORMAT formatDesired, // in | | _In_ DS_NAME_FORMAT formatDesired, // in |
| __in DWORD cNames, // in | | _In_ DWORD cNames, // in |
| __in_ecount(cNames) const LPCWSTR *rpNames, // in | | _In_reads_(cNames) const LPCWSTR *rpNames, // in |
| __deref_out PDS_NAME_RESULTW *ppResult); // out | | _Outptr_ PDS_NAME_RESULTW *ppResult); // out |
| | |
|
| __checkReturn | | _Check_return_ |
| NTDSAPI | | NTDSAPI |
| DWORD | | DWORD |
| WINAPI | | WINAPI |
| DsCrackNamesA( | | DsCrackNamesA( |
|
| __in_opt HANDLE hDS, // in | | _In_opt_ HANDLE hDS, // in |
| __in DS_NAME_FLAGS flags, // in | | _In_ DS_NAME_FLAGS flags, // in |
| __in DS_NAME_FORMAT formatOffered, // in | | _In_ DS_NAME_FORMAT formatOffered, // in |
| __in DS_NAME_FORMAT formatDesired, // in | | _In_ DS_NAME_FORMAT formatDesired, // in |
| __in DWORD cNames, // in | | _In_ DWORD cNames, // in |
| __in_ecount(cNames) const LPCSTR *rpNames, // in | | _In_reads_(cNames) const LPCSTR *rpNames, // in |
| __deref_out PDS_NAME_RESULTA *ppResult); // out | | _Outptr_ 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( |
|
| __in DS_NAME_RESULTW *pResult); // in | | _In_ DS_NAME_RESULTW *pResult); // in |
| | |
| NTDSAPI | | NTDSAPI |
| void | | void |
| WINAPI | | WINAPI |
| DsFreeNameResultA( | | DsFreeNameResultA( |
|
| __in 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 | | |
| // authenticate. | | |
| // This name is then passed to "pszTargetName" of InitializeSecurityContext(). | | |
| // | | |
| // Notes: | | |
| // If the service name is a DNS host name, or canonical DNS service name | | |
| // e.g. "www.ms.com", i.e., caller resolved with gethostbyname, then instance | | |
| // name should be NULL. | | |
| // Realm is host name minus first component, unless it is in the exception list | | |
| // | | |
| // If the service name is NetBIOS machine name, then instance name should be | | |
| // NULL | | |
| // Form must be <domain>\<machine> | | |
| // Realm will be <domain> | | |
| // | | |
| // If the service name is that of a replicated service, where each replica has | | |
| // its own account (e.g., with SRV records) then the caller must supply the | | |
| // instance name then realm name is same as ServiceName | | |
| // | | |
| // If the service name is a DN, then must also supply instance name | | |
| // (DN could be name of service object (incl RPC or Winsock), name of machine | | |
| // account, name of domain object) | | |
| // then realm name is domain part of the DN | | |
| // | | |
| // If the service name is NetBIOS domain name, then must also supply instance | | |
| // name; realm name is domain name | | |
| // | | |
| // If the service is named by an IP address -- then use referring service name | | |
| // as service name | | |
| // | | |
| // ServiceClass - e.g. "http", "ftp", "ldap", GUID | | |
| // ServiceName - DNS or DN; assumes we can compute domain from service name | | |
| // InstanceName OPTIONAL- DNS name of host for instance of service | | |
| // InstancePort - port number for instance (0 if default) | | |
| // Referrer OPTIONAL- DNS name of host that gave this referral | | |
| // pcSpnLength - in -- max length IN CHARACTERS of principal name; | | |
| // out -- actual | | |
| // Length includes terminator | | |
| // pszSPN - server principal name | | |
| // | | |
| // If buffer is not large enough, ERROR_BUFFER_OVERFLOW is returned and the | | |
| // needed length is returned in pcSpnLength. | | |
| // | | |
| // | | |
| | |
| __checkReturn | | |
| NTDSAPI | | |
| DWORD | | |
| WINAPI | | |
| DsMakeSpnW( | | |
| __in LPCWSTR ServiceClass, | | |
| __in LPCWSTR ServiceName, | | |
| __in_opt LPCWSTR InstanceName, | | |
| __in USHORT InstancePort, | | |
| __in_opt LPCWSTR Referrer, | | |
| __inout DWORD *pcSpnLength, | | |
| __out_ecount_part_opt(*pcSpnLength, *pcSpnLength) LPWSTR pszSpn | | |
| ); | | |
| | |
| __checkReturn | | |
| NTDSAPI | | |
| DWORD | | |
| WINAPI | | |
| DsMakeSpnA( | | |
| __in LPCSTR ServiceClass, | | |
| __in LPCSTR ServiceName, | | |
| __in_opt LPCSTR InstanceName, | | |
| __in USHORT InstancePort, | | |
| __in_opt LPCSTR Referrer, | | |
| __inout DWORD *pcSpnLength, | | |
| __out_ecount_part (*pcSpnLength, *pcSpnLength) LPSTR pszSpn | | |
| ); | | |
| | |
| #ifdef UNICODE | | |
| #define DsMakeSpn DsMakeSpnW | | |
| #else | | |
| #define DsMakeSpn DsMakeSpnA | | |
| #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 |
| // known to clients. N.B.: there may be more than one name by which clients | | // known to clients. N.B.: there may be more than one name by which clients |
| // know it the SPNs are then passed to DsAddAccountSpn to register them in | | // know it the SPNs are then passed to DsAddAccountSpn to register them in |
| // the DS | | // the DS |
| // | | // |
| // IN SpnNameType eType, | | // IN SpnNameType eType, |
| // IN LPCTSTR ServiceClass, | | // IN LPCTSTR ServiceClass, |
| // kind of service -- "http", "ldap", "ftp", etc. | | // kind of service -- "http", "ldap", "ftp", etc. |
| // IN LPCTSTR ServiceName OPTIONAL, | | // IN LPCTSTR ServiceName OPTIONAL, |
| // name of service -- DN or DNS; not needed for host-based | | // name of service -- DN or DNS; not needed for host-based |
| | |
| skipping to change at line 1315 | | skipping to change at line 1239 |
| // 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 | | _Check_return_ |
| 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_opt LPCSTR ServiceName, | | _In_opt_ LPCSTR ServiceName, |
| __in USHORT InstancePort, | | _In_ USHORT InstancePort, |
| __in USHORT cInstanceNames, | | _In_ USHORT cInstanceNames, |
| __in_ecount_opt(cInstanceNames) LPCSTR *pInstanceNames, | | _In_reads_opt_(cInstanceNames) LPCSTR *pInstanceNames, |
| __in_opt const USHORT *pInstancePorts, | | _In_reads_opt_(cInstanceNames) const USHORT *pInstancePorts, |
| __out DWORD *pcSpn, | | _Out_ DWORD *pcSpn, |
| __deref_out_ecount (*pcSpn) LPSTR **prpszSpn | | _Outptr_result_buffer_ (*pcSpn) LPSTR **prpszSpn |
| ); | | ); |
| | |
|
| __checkReturn | | _Check_return_ |
| 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_opt_ LPCWSTR ServiceName, |
| __in USHORT InstancePort, | | _In_ USHORT InstancePort, |
| __in USHORT cInstanceNames, | | _In_ USHORT cInstanceNames, |
| __in_ecount(cInstanceNames) LPCWSTR *pInstanceNames, | | _In_reads_opt_(cInstanceNames) LPCWSTR *pInstanceNames, |
| __in_opt const USHORT *pInstancePorts, | | _In_reads_opt_(cInstanceNames) const USHORT *pInstancePorts, |
| __out DWORD *pcSpn, | | _Out_ DWORD *pcSpn, |
| __deref_out_ecount(*pcSpn) LPWSTR **prpszSpn | | _Outptr_result_buffer_(*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 DWORD cSpn, | | _In_ DWORD cSpn, |
| __deref_in_ecount(cSpn) LPSTR *rpszSpn | | _Inout_updates_to_(cSpn, 0) LPSTR *rpszSpn |
| ); | | ); |
| | |
| NTDSAPI | | NTDSAPI |
| void | | void |
| WINAPI | | WINAPI |
| DsFreeSpnArrayW( | | DsFreeSpnArrayW( |
|
| __in DWORD cSpn, | | _In_ DWORD cSpn, |
| __deref_inout_ecount(cSpn) LPWSTR *rpszSpn | | _Inout_updates_to_(cSpn, 0) 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, | | |
| // ServiceName, and InstanceName (and InstancePort) pieces. | | |
| // An SPN is passed in, along with a pointer to the maximum length | | |
| // for each piece and a pointer to a buffer where each piece should go. | | |
| // On exit, the maximum lengths are updated to the actual length for each piece | | |
| // and the buffer contain the appropriate piece. The InstancePort is 0 if not | | |
| // present. | | |
| // | | |
| // DWORD DsCrackSpn( | | |
| // IN LPTSTR pszSPN, // the SPN to parse | | |
| // IN OUT PUSHORT pcServiceClass, // input -- max length of ServiceClass; | | |
| // output -- actual length | | |
| // OUT LPCTSTR ServiceClass, // the ServiceClass part of the SPN | | |
| // IN OUT PUSHORT pcServiceName, // input -- max length of ServiceName; | | |
| // output -- actual length | | |
| // OUT LPCTSTR ServiceName, // the ServiceName part of the SPN | | |
| // IN OUT PUSHORT pcInstance, // input -- max length of ServiceClass; | | |
| // output -- actual length | | |
| // OUT LPCTSTR InstanceName, // the InstanceName part of the SPN | | |
| // OUT PUSHORT InstancePort // instance port | | |
| // | | |
| // Note: lengths are in characters; all string lengths include terminators | | |
| // All arguments except pszSpn are optional. | | |
| // | | |
| | |
| __checkReturn | | |
| NTDSAPI | | |
| DWORD | | |
| WINAPI | | |
| DsCrackSpnA( | | |
| __in LPCSTR pszSpn, | | |
| __inout_opt LPDWORD pcServiceClass, | | |
| __out_ecount_part_opt (*pcServiceClass, *pcServiceClass) LPSTR ServiceClass, | | |
| __inout_opt LPDWORD pcServiceName, | | |
| __out_ecount_part_opt (*pcServiceName, *pcServiceName) LPSTR ServiceName, | | |
| __inout_opt LPDWORD pcInstanceName, | | |
| __out_ecount_part_opt (*pcInstanceName, *pcInstanceName) LPSTR InstanceName, | | |
| __out_opt USHORT *pInstancePort | | |
| ); | | |
| | |
| __checkReturn | | |
| NTDSAPI | | |
| DWORD | | |
| WINAPI | | |
| DsCrackSpnW( | | |
| __in LPCWSTR pszSpn, | | |
| __inout_opt DWORD *pcServiceClass, | | |
| __out_ecount_part_opt (*pcServiceClass, *pcServiceClass) LPWSTR ServiceClass | | |
| , | | |
| __inout_opt DWORD *pcServiceName, | | |
| __out_ecount_part_opt (*pcServiceName, *pcServiceName) LPWSTR ServiceName, | | |
| __inout_opt DWORD *pcInstanceName, | | |
| __out_ecount_part_opt (*pcInstanceName, *pcInstanceName) LPWSTR InstanceName | | |
| , | | |
| __out_opt USHORT *pInstancePort | | |
| ); | | |
| | |
| #ifdef UNICODE | | |
| #define DsCrackSpn DsCrackSpnW | | |
| #else | | |
| #define DsCrackSpn DsCrackSpnA | | |
| #endif | | |
| | |
| // ========================================================== | | |
| // DsWriteAccountSpn -- set or add SPNs for an account object | | // DsWriteAccountSpn -- set or add SPNs for an account object |
| // Usually done by service itself, or perhaps by an admin. | | // Usually done by service itself, or perhaps by an admin. |
| // | | // |
| // This call is RPC'd to the DC where the account object is stored, so it can | | // This call is RPC'd to the DC where the account object is stored, so it can |
| // securely enforce policy on what SPNs are allowed on the account. Direct LDAP | | // securely enforce policy on what SPNs are allowed on the account. Direct LDAP |
| // writes to the SPN property are not allowed -- all writes must come through | | // writes to the SPN property are not allowed -- all writes must come through |
| // this RPC call. (Reads via // LDAP are OK.) | | // this RPC call. (Reads via // LDAP are OK.) |
| // | | // |
| // The account object can be a machine accout, or a service (user) account. | | // The account object can be a machine accout, or a service (user) account. |
| // | | // |
| // 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 | | _Check_return_ |
| 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_ecount(cSpn) LPCSTR *rpszSpn | | _In_reads_(cSpn) LPCSTR *rpszSpn |
| ); | | ); |
| | |
|
| __checkReturn | | _Check_return_ |
| 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_ecount(cSpn) LPCWSTR *rpszSpn | | _In_reads_(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 1532 | | skipping to change at line 1394 |
| 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 | | _Check_return_ |
| NTDSAPI | | NTDSAPI |
| DWORD | | DWORD |
| WINAPI | | WINAPI |
| DsClientMakeSpnForTargetServerW( | | DsClientMakeSpnForTargetServerW( |
|
| __in LPCWSTR ServiceClass, | | _In_ LPCWSTR ServiceClass, |
| __in LPCWSTR ServiceName, | | _In_ LPCWSTR ServiceName, |
| __inout DWORD *pcSpnLength, | | _Inout_ DWORD *pcSpnLength, |
| __out_ecount_part (*pcSpnLength, *pcSpnLength) LPWSTR pszSpn | | _Out_writes_to_ (*pcSpnLength, *pcSpnLength) LPWSTR pszSpn |
| ); | | ); |
| | |
|
| __checkReturn | | _Check_return_ |
| NTDSAPI | | NTDSAPI |
| DWORD | | DWORD |
| WINAPI | | WINAPI |
| DsClientMakeSpnForTargetServerA( | | DsClientMakeSpnForTargetServerA( |
|
| __in LPCSTR ServiceClass, | | _In_ LPCSTR ServiceClass, |
| __in LPCSTR ServiceName, | | _In_ LPCSTR ServiceName, |
| __inout DWORD *pcSpnLength, | | _Inout_ DWORD *pcSpnLength, |
| __out_ecount_part(*pcSpnLength, *pcSpnLength) LPSTR pszSpn | | _Out_writes_to_(*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 1598 | | skipping to change at line 1460 |
| 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 | | _Check_return_ |
| NTDSAPI | | NTDSAPI |
| DWORD | | DWORD |
| WINAPI | | WINAPI |
| DsServerRegisterSpnA( | | DsServerRegisterSpnA( |
| DS_SPN_WRITE_OP Operation, | | DS_SPN_WRITE_OP Operation, |
|
| __in LPCSTR ServiceClass, | | _In_ LPCSTR ServiceClass, |
| __in_opt LPCSTR UserObjectDN | | _In_opt_ LPCSTR UserObjectDN |
| ); | | ); |
| | |
|
| __checkReturn | | _Check_return_ |
| NTDSAPI | | NTDSAPI |
| DWORD | | DWORD |
| WINAPI | | WINAPI |
| DsServerRegisterSpnW( | | DsServerRegisterSpnW( |
| DS_SPN_WRITE_OP Operation, | | DS_SPN_WRITE_OP Operation, |
|
| __in LPCWSTR ServiceClass, | | _In_ LPCWSTR ServiceClass, |
| __in_opt 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 1641 | | skipping to change at line 1503 |
| // | | // |
| // 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 | | _Check_return_ |
| 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, |
| ULONG Options | | ULONG Options |
| ); | | ); |
| | |
|
| __checkReturn | | _Check_return_ |
| 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, |
| 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 1700 | | skipping to change at line 1562 |
| | |
| 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 | | _Check_return_ |
| 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_opt const PSCHEDULE pSchedule, | | _In_opt_ const PSCHEDULE pSchedule, |
| DWORD Options | | DWORD Options |
| ); | | ); |
| | |
|
| __checkReturn | | _Check_return_ |
| 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_opt const PSCHEDULE pSchedule, | | _In_opt_ const PSCHEDULE pSchedule, |
| 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 1757 | | skipping to change at line 1619 |
| // 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 | | _Check_return_ |
| 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, |
| ULONG Options | | ULONG Options |
| ); | | ); |
| | |
|
| __checkReturn | | _Check_return_ |
| 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, |
| 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 1834 | | skipping to change at line 1696 |
| // 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 | | _Check_return_ |
| NTDSAPI | | NTDSAPI |
| DWORD | | DWORD |
| WINAPI | | WINAPI |
| DsReplicaModifyA( | | DsReplicaModifyA( |
|
| __in HANDLE hDS, | | _In_ HANDLE hDS, |
| __in LPCSTR NameContext, | | _In_ LPCSTR NameContext, |
| __in_opt const UUID *pUuidSourceDsa, | | _In_opt_ const UUID *pUuidSourceDsa, |
| __reserved LPCSTR TransportDn, | | _Reserved_ LPCSTR TransportDn, |
| __in LPCSTR SourceDsaAddress, | | _In_ LPCSTR SourceDsaAddress, |
| __in_opt const PSCHEDULE pSchedule, | | _In_opt_ const PSCHEDULE pSchedule, |
| __reserved DWORD ReplicaFlags, | | _Reserved_ DWORD ReplicaFlags, |
| DWORD ModifyFields, | | DWORD ModifyFields, |
| DWORD Options | | DWORD Options |
| ); | | ); |
| | |
|
| __checkReturn | | _Check_return_ |
| NTDSAPI | | NTDSAPI |
| DWORD | | DWORD |
| WINAPI | | WINAPI |
| DsReplicaModifyW( | | DsReplicaModifyW( |
|
| __in HANDLE hDS, | | _In_ HANDLE hDS, |
| __in LPCWSTR NameContext, | | _In_ LPCWSTR NameContext, |
| __in_opt const UUID *pUuidSourceDsa, | | _In_opt_ const UUID *pUuidSourceDsa, |
| __reserved LPCWSTR TransportDn, | | _Reserved_ LPCWSTR TransportDn, |
| __in LPCWSTR SourceDsaAddress, | | _In_ LPCWSTR SourceDsaAddress, |
| __in_opt const PSCHEDULE pSchedule, | | _In_opt_ const PSCHEDULE pSchedule, |
| DWORD ReplicaFlags, | | DWORD ReplicaFlags, |
| DWORD ModifyFields, | | DWORD ModifyFields, |
| DWORD Options | | DWORD Options |
| ); | | ); |
| | |
| #ifdef UNICODE | | #ifdef UNICODE |
| #define DsReplicaModify DsReplicaModifyW | | #define DsReplicaModify DsReplicaModifyW |
| #else | | #else |
| #define DsReplicaModify DsReplicaModifyA | | #define DsReplicaModify DsReplicaModifyA |
| #endif | | #endif |
| | |
| skipping to change at line 1903 | | skipping to change at line 1765 |
| // 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 | | _Check_return_ |
| 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, |
| ULONG Options | | ULONG Options |
| ); | | ); |
| | |
|
| __checkReturn | | _Check_return_ |
| 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, |
| 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 |
| | |
| typedef enum { | | typedef enum { |
| | |
|
| DS_REPSYNCALL_WIN32_ERROR_CONTACTING_SERVER = 0, | | DS_REPSYNCALL_WIN32_ERROR_CONTACTING_SERVER = 0, |
| DS_REPSYNCALL_WIN32_ERROR_REPLICATING = 1, | | DS_REPSYNCALL_WIN32_ERROR_REPLICATING = 1, |
| DS_REPSYNCALL_SERVER_UNREACHABLE = 2 | | DS_REPSYNCALL_SERVER_UNREACHABLE = 2 |
| | |
| } DS_REPSYNCALL_ERROR; | | } DS_REPSYNCALL_ERROR; |
| | |
| typedef enum { | | typedef enum { |
| | |
|
| DS_REPSYNCALL_EVENT_ERROR = 0, | | DS_REPSYNCALL_EVENT_ERROR = 0, |
| DS_REPSYNCALL_EVENT_SYNC_STARTED = 1, | | DS_REPSYNCALL_EVENT_SYNC_STARTED = 1, |
| DS_REPSYNCALL_EVENT_SYNC_COMPLETED = 2, | | DS_REPSYNCALL_EVENT_SYNC_COMPLETED = 2, |
| DS_REPSYNCALL_EVENT_FINISHED = 3 | | DS_REPSYNCALL_EVENT_FINISHED = 3 |
| | |
| } DS_REPSYNCALL_EVENT; | | } DS_REPSYNCALL_EVENT; |
| | |
| // Friends of DsReplicaSyncAll | | // Friends of DsReplicaSyncAll |
| | |
| typedef struct { | | typedef struct { |
| LPSTR pszSrcId; | | LPSTR pszSrcId; |
| LPSTR pszDstId; | | LPSTR pszDstId; |
| LPSTR pszNC; | | LPSTR pszNC; |
| GUID * pguidSrc; | | GUID * pguidSrc; |
| | |
| skipping to change at line 2073 | | skipping to change at line 1935 |
| // 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 | | _Check_return_ |
| NTDSAPI | | NTDSAPI |
| DWORD | | DWORD |
| WINAPI | | WINAPI |
| DsReplicaSyncAllA ( | | DsReplicaSyncAllA ( |
|
| __in HANDLE hDS, | | _In_ HANDLE hDS, |
| __in LPCSTR pszNameContext, | | _In_ LPCSTR pszNameContext, |
| ULONG ulFlags, | | ULONG ulFlags, |
| __callback BOOL (__stdcall * pFnCallBack) (LPVOID, PDS
_REPSYNCALL_UPDATEA), | | __callback BOOL (__stdcall * pFnCallBack) (LPVOID, PDS
_REPSYNCALL_UPDATEA), |
|
| __in_opt LPVOID pCallbackData, | | _In_opt_ LPVOID pCallbackData, |
| __deref_out_opt PDS_REPSYNCALL_ERRINFOA ** pErrors | | _Outptr_result_maybenull_z_ PDS_REPSYNCALL_ERRINFOA ** pErrors |
| ); | | ); |
| | |
|
| __checkReturn | | _Check_return_ |
| NTDSAPI | | NTDSAPI |
| DWORD | | DWORD |
| WINAPI | | WINAPI |
| DsReplicaSyncAllW ( | | DsReplicaSyncAllW ( |
|
| __in HANDLE hDS, | | _In_ HANDLE hDS, |
| __in LPCWSTR pszNameContext, | | _In_ LPCWSTR pszNameContext, |
| ULONG ulFlags, | | ULONG ulFlags, |
| __callback BOOL (__stdcall * pFnCallBack) (LPVOID, PDS
_REPSYNCALL_UPDATEW), | | __callback BOOL (__stdcall * pFnCallBack) (LPVOID, PDS
_REPSYNCALL_UPDATEW), |
|
| __in_opt LPVOID pCallbackData, | | _In_opt_ LPVOID pCallbackData, |
| __deref_out_opt PDS_REPSYNCALL_ERRINFOW ** pErrors | | _Outptr_result_maybenull_z_ 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 | | _Check_return_ |
| NTDSAPI | | NTDSAPI |
| DWORD | | DWORD |
| WINAPI | | WINAPI |
| DsRemoveDsServerW( | | DsRemoveDsServerW( |
|
| __in 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 |
| __out_opt BOOL *fLastDcInDomain, // out, optional | | _Out_opt_ BOOL *fLastDcInDomain, // out, optional |
| BOOL fCommit // in | | BOOL fCommit // in |
| ); | | ); |
| | |
|
| __checkReturn | | _Check_return_ |
| NTDSAPI | | NTDSAPI |
| DWORD | | DWORD |
| WINAPI | | WINAPI |
| DsRemoveDsServerA( | | DsRemoveDsServerA( |
|
| __in 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 |
| __out_opt 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 | | _Check_return_ |
| NTDSAPI | | NTDSAPI |
| DWORD | | DWORD |
| WINAPI | | WINAPI |
| DsRemoveDsDomainW( | | DsRemoveDsDomainW( |
|
| __in HANDLE hDs, // in | | _In_ HANDLE hDs, // in |
| __in LPWSTR DomainDN // in | | _In_ LPWSTR DomainDN // in |
| ); | | ); |
| | |
|
| __checkReturn | | _Check_return_ |
| NTDSAPI | | NTDSAPI |
| DWORD | | DWORD |
| WINAPI | | WINAPI |
| DsRemoveDsDomainA( | | DsRemoveDsDomainA( |
|
| __in 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 | | _Check_return_ |
| NTDSAPI | | NTDSAPI |
| DWORD | | DWORD |
| WINAPI | | WINAPI |
| DsListSitesA( | | DsListSitesA( |
|
| __in HANDLE hDs, // in | | _In_ HANDLE hDs, // in |
| __deref_out PDS_NAME_RESULTA *ppSites); // out | | _Outptr_ PDS_NAME_RESULTA *ppSites); // out |
| | |
|
| __checkReturn | | _Check_return_ |
| NTDSAPI | | NTDSAPI |
| DWORD | | DWORD |
| WINAPI | | WINAPI |
| DsListSitesW( | | DsListSitesW( |
|
| __in HANDLE hDs, // in | | _In_ HANDLE hDs, // in |
| __deref_out PDS_NAME_RESULTW *ppSites); // out | | _Outptr_ 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 | | _Check_return_ |
| NTDSAPI | | NTDSAPI |
| DWORD | | DWORD |
| WINAPI | | WINAPI |
| DsListServersInSiteA( | | DsListServersInSiteA( |
|
| __in HANDLE hDs, // in | | _In_ HANDLE hDs, // in |
| __in LPCSTR site, // in | | _In_ LPCSTR site, // in |
| __deref_out PDS_NAME_RESULTA *ppServers); // out | | _Outptr_ PDS_NAME_RESULTA *ppServers); // out |
| | |
|
| __checkReturn | | _Check_return_ |
| NTDSAPI | | NTDSAPI |
| DWORD | | DWORD |
| WINAPI | | WINAPI |
| DsListServersInSiteW( | | DsListServersInSiteW( |
|
| __in HANDLE hDs, // in | | _In_ HANDLE hDs, // in |
| __in LPCWSTR site, // in | | _In_ LPCWSTR site, // in |
| __deref_out PDS_NAME_RESULTW *ppServers); // out | | _Outptr_ 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 | | _Check_return_ |
| NTDSAPI | | NTDSAPI |
| DWORD | | DWORD |
| WINAPI | | WINAPI |
| DsListDomainsInSiteA( | | DsListDomainsInSiteA( |
|
| __in HANDLE hDs, // in | | _In_ HANDLE hDs, // in |
| __in LPCSTR site, // in | | _In_ LPCSTR site, // in |
| __deref_out PDS_NAME_RESULTA *ppDomains); // out | | _Outptr_ PDS_NAME_RESULTA *ppDomains); // out |
| | |
|
| __checkReturn | | _Check_return_ |
| NTDSAPI | | NTDSAPI |
| DWORD | | DWORD |
| WINAPI | | WINAPI |
| DsListDomainsInSiteW( | | DsListDomainsInSiteW( |
|
| __in HANDLE hDs, // in | | _In_ HANDLE hDs, // in |
| __in LPCWSTR site, // in | | _In_ LPCWSTR site, // in |
| __deref_out PDS_NAME_RESULTW *ppDomains); // out | | _Outptr_ 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 | | _Check_return_ |
| NTDSAPI | | NTDSAPI |
| DWORD | | DWORD |
| WINAPI | | WINAPI |
| DsListServersForDomainInSiteA( | | DsListServersForDomainInSiteA( |
|
| __in HANDLE hDs, // in | | _In_ HANDLE hDs, // in |
| __in LPCSTR domain, // in | | _In_ LPCSTR domain, // in |
| __in LPCSTR site, // in | | _In_ LPCSTR site, // in |
| __deref_out PDS_NAME_RESULTA *ppServers); // out | | _Outptr_ PDS_NAME_RESULTA *ppServers); // out |
| | |
|
| __checkReturn | | _Check_return_ |
| NTDSAPI | | NTDSAPI |
| DWORD | | DWORD |
| WINAPI | | WINAPI |
| DsListServersForDomainInSiteW( | | DsListServersForDomainInSiteW( |
|
| __in HANDLE hDs, // in | | _In_ HANDLE hDs, // in |
| __in LPCWSTR domain, // in | | _In_ LPCWSTR domain, // in |
| __in LPCWSTR site, // in | | _In_ LPCWSTR site, // in |
| __deref_out PDS_NAME_RESULTW *ppServers); // out | | _Outptr_ 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 | | _Check_return_ |
| NTDSAPI | | NTDSAPI |
| DWORD | | DWORD |
| WINAPI | | WINAPI |
| DsListInfoForServerA( | | DsListInfoForServerA( |
|
| __in HANDLE hDs, // in | | _In_ HANDLE hDs, // in |
| __in LPCSTR server, // in | | _In_ LPCSTR server, // in |
| __deref_out PDS_NAME_RESULTA *ppInfo); // out | | _Outptr_ PDS_NAME_RESULTA *ppInfo); // out |
| | |
|
| __checkReturn | | _Check_return_ |
| NTDSAPI | | NTDSAPI |
| DWORD | | DWORD |
| WINAPI | | WINAPI |
| DsListInfoForServerW( | | DsListInfoForServerW( |
|
| __in HANDLE hDs, // in | | _In_ HANDLE hDs, // in |
| __in LPCWSTR server, // in | | _In_ LPCWSTR server, // in |
| __deref_out PDS_NAME_RESULTW *ppInfo); // out | | _Outptr_ 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 | | _Check_return_ |
| NTDSAPI | | NTDSAPI |
| DWORD | | DWORD |
| WINAPI | | WINAPI |
| DsListRolesA( | | DsListRolesA( |
|
| __in HANDLE hDs, // in | | _In_ HANDLE hDs, // in |
| __deref_out PDS_NAME_RESULTA *ppRoles); // out | | _Outptr_ PDS_NAME_RESULTA *ppRoles); // out |
| | |
|
| __checkReturn | | _Check_return_ |
| NTDSAPI | | NTDSAPI |
| DWORD | | DWORD |
| WINAPI | | WINAPI |
| DsListRolesW( | | DsListRolesW( |
|
| __in HANDLE hDs, // in | | _In_ HANDLE hDs, // in |
| __deref_out PDS_NAME_RESULTW *ppRoles); // out | | _Outptr_ 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 2333 | | skipping to change at line 2195 |
| // 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 | | _Check_return_ |
| NTDSAPI_POSTXP | | NTDSAPI_POSTXP |
| DWORD | | DWORD |
| WINAPI | | WINAPI |
| DsQuerySitesByCostW( | | DsQuerySitesByCostW( |
|
| __in HANDLE hDS, // in | | _In_ HANDLE hDS, // in |
| __in LPWSTR pwszFromSite, // in | | _In_ LPWSTR pwszFromSite, // in |
| __deref_in_ecount (cToSites) LPWSTR *rgwszToSites, // in | | _In_reads_ (cToSites) LPWSTR *rgwszToSites, // in |
| __in DWORD cToSites, // in | | _In_ DWORD cToSites, // in |
| __reserved DWORD dwFlags, // in | | _Reserved_ DWORD dwFlags, // in |
| __deref_out PDS_SITE_COST_INFO *prgSiteInfo // out | | _Outptr_ PDS_SITE_COST_INFO *prgSiteInfo // out |
| ); | | ); |
| | |
|
| __checkReturn | | _Check_return_ |
| NTDSAPI_POSTXP | | NTDSAPI_POSTXP |
| DWORD | | DWORD |
| WINAPI | | WINAPI |
| DsQuerySitesByCostA( | | DsQuerySitesByCostA( |
|
| __in HANDLE hDS, // in | | _In_ HANDLE hDS, // in |
| __in LPSTR pszFromSite, // in | | _In_ LPSTR pszFromSite, // in |
| __deref_in_ecount (cToSites) LPSTR *rgszToSites, // in | | _In_reads_ (cToSites) LPSTR *rgszToSites, // in |
| DWORD cToSites, // in | | DWORD cToSites, // in |
|
| __reserved DWORD dwFlags, // in | | _Reserved_ DWORD dwFlags, // in |
| __deref_out PDS_SITE_COST_INFO *prgSiteInfo // out | | _Outptr_ 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( |
|
| __in 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 2407 | | skipping to change at line 2269 |
| 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 | | _Check_return_ |
| NTDSAPI | | NTDSAPI |
| DWORD | | DWORD |
| WINAPI | | WINAPI |
| DsMapSchemaGuidsA( | | DsMapSchemaGuidsA( |
|
| __in HANDLE hDs, // in | | _In_ HANDLE hDs, // in |
| DWORD cGuids, // in | | DWORD cGuids, // in |
|
| __in_ecount(cGuids) GUID *rGuids, // in | | _In_reads_(cGuids) GUID *rGuids, // in |
| __deref_out DS_SCHEMA_GUID_MAPA **ppGuidMap); // out | | _Outptr_ DS_SCHEMA_GUID_MAPA **ppGuidMap); // out |
| | |
| NTDSAPI | | NTDSAPI |
| VOID | | VOID |
| WINAPI | | WINAPI |
| DsFreeSchemaGuidMapA( | | DsFreeSchemaGuidMapA( |
|
| __in PDS_SCHEMA_GUID_MAPA pGuidMap); // in | | _In_ PDS_SCHEMA_GUID_MAPA pGuidMap); // in |
| | |
|
| __checkReturn | | _Check_return_ |
| NTDSAPI | | NTDSAPI |
| DWORD | | DWORD |
| WINAPI | | WINAPI |
| DsMapSchemaGuidsW( | | DsMapSchemaGuidsW( |
|
| __in HANDLE hDs, // in | | _In_ HANDLE hDs, // in |
| DWORD cGuids, // in | | DWORD cGuids, // in |
|
| __in_ecount(cGuids) GUID *rGuids, // in | | _In_reads_(cGuids) GUID *rGuids, // in |
| __deref_out DS_SCHEMA_GUID_MAPW **ppGuidMap); // out | | _Outptr_ DS_SCHEMA_GUID_MAPW **ppGuidMap); // out |
| | |
| NTDSAPI | | NTDSAPI |
| VOID | | VOID |
| WINAPI | | WINAPI |
| DsFreeSchemaGuidMapW( | | DsFreeSchemaGuidMapW( |
|
| __in 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 2636 | | skipping to change at line 2498 |
| | |
| } 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 | | _Check_return_ |
| | _When_(InfoLevel == 1, _At_(ppInfo, _Outptr_result_bytebuffer_(*pcOut * sizeof(D |
| | S_DOMAIN_CONTROLLER_INFO_1A)))) |
| | _When_(InfoLevel == 2, _At_(ppInfo, _Outptr_result_bytebuffer_(*pcOut * sizeof(D |
| | S_DOMAIN_CONTROLLER_INFO_2A)))) |
| | _When_(InfoLevel == 3, _At_(ppInfo, _Outptr_result_bytebuffer_(*pcOut * sizeof(D |
| | S_DOMAIN_CONTROLLER_INFO_3A)))) |
| NTDSAPI | | NTDSAPI |
| DWORD | | DWORD |
| WINAPI | | WINAPI |
| DsGetDomainControllerInfoA( | | DsGetDomainControllerInfoA( |
|
| __in HANDLE hDs, // in | | _In_ HANDLE hDs, // in |
| __in LPCSTR DomainName, // in | | _In_ LPCSTR DomainName, // in |
| DWORD InfoLevel, // in | | _In_ DWORD InfoLevel, // in |
| __out DWORD *pcOut, // out | | _Out_ DWORD *pcOut, // out |
| __deref_out_ecount(*pcOut) VOID **ppInfo); / | | _Outptr_ VOID **ppInfo); // out |
| / out | | |
| | |
|
| __checkReturn | | _Check_return_ |
| | _When_(InfoLevel == 1, _At_(ppInfo, _Outptr_result_bytebuffer_(*pcOut * sizeof(D |
| | S_DOMAIN_CONTROLLER_INFO_1W)))) |
| | _When_(InfoLevel == 2, _At_(ppInfo, _Outptr_result_bytebuffer_(*pcOut * sizeof(D |
| | S_DOMAIN_CONTROLLER_INFO_2W)))) |
| | _When_(InfoLevel == 3, _At_(ppInfo, _Outptr_result_bytebuffer_(*pcOut * sizeof(D |
| | S_DOMAIN_CONTROLLER_INFO_3W)))) |
| NTDSAPI | | NTDSAPI |
| DWORD | | DWORD |
| WINAPI | | WINAPI |
| DsGetDomainControllerInfoW( | | DsGetDomainControllerInfoW( |
|
| __in HANDLE hDs, // in | | _In_ HANDLE hDs, // in |
| __in LPCWSTR DomainName, // in | | _In_ LPCWSTR DomainName, // in |
| DWORD InfoLevel, // in | | _In_ DWORD InfoLevel, // in |
| __out DWORD *pcOut, // out | | _Out_ DWORD *pcOut, // out |
| __deref_out_ecount(*pcOut) VOID **ppInfo); / | | _Outptr_ VOID **ppInfo); // out |
| / out | | |
| | |
| NTDSAPI | | NTDSAPI |
| VOID | | VOID |
| WINAPI | | WINAPI |
| DsFreeDomainControllerInfoA( | | DsFreeDomainControllerInfoA( |
| DWORD InfoLevel, // in | | DWORD InfoLevel, // in |
| DWORD cInfo, // in | | DWORD cInfo, // in |
|
| __in_ecount(cInfo) VOID *pInfo); // in | | _In_reads_(cInfo) VOID *pInfo); // in |
| | |
| NTDSAPI | | NTDSAPI |
| VOID | | VOID |
| WINAPI | | WINAPI |
| DsFreeDomainControllerInfoW( | | DsFreeDomainControllerInfoW( |
| DWORD InfoLevel, // in | | DWORD InfoLevel, // in |
| DWORD cInfo, // in | | DWORD cInfo, // in |
|
| __in_ecount(cInfo) VOID *pInfo); // in | | _In_reads_(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 2705 | | skipping to change at line 2573 |
| 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 | | _Check_return_ |
| NTDSAPI | | NTDSAPI |
| DWORD | | DWORD |
| WINAPI | | WINAPI |
| DsReplicaConsistencyCheck( | | DsReplicaConsistencyCheck( |
|
| __in HANDLE hDS, // in | | _In_ HANDLE hDS, // in |
| DS_KCC_TASKID TaskID, // in | | DS_KCC_TASKID TaskID, // in |
| DWORD dwFlags); // in | | DWORD dwFlags); // in |
| | |
|
| __checkReturn | | _Check_return_ |
| NTDSAPI | | NTDSAPI |
| DWORD | | DWORD |
| WINAPI | | WINAPI |
| DsReplicaVerifyObjectsW( | | DsReplicaVerifyObjectsW( |
|
| __in HANDLE hDS, // in | | _In_ HANDLE hDS, // in |
| __in LPCWSTR NameContext,// in | | _In_ LPCWSTR NameContext,// in |
| __in const UUID * pUuidDsaSrc,// in | | _In_ const UUID * pUuidDsaSrc,// in |
| ULONG ulOptions); // in | | ULONG ulOptions); // in |
| | |
|
| __checkReturn | | _Check_return_ |
| NTDSAPI | | NTDSAPI |
| DWORD | | DWORD |
| WINAPI | | WINAPI |
| DsReplicaVerifyObjectsA( | | DsReplicaVerifyObjectsA( |
|
| __in HANDLE hDS, // in | | _In_ HANDLE hDS, // in |
| __in LPCSTR NameContext,// in | | _In_ LPCSTR NameContext,// in |
| __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 2766 | | skipping to change at line 2634 |
| // ERROR_NOT_SUPPORTED. | | // ERROR_NOT_SUPPORTED. |
| // | | // |
| | |
| DS_REPL_INFO_METADATA_FOR_ATTR_VALUE = 6, // returns DS_REPL_ATTR_VALUE_ME
TA_DATA * | | DS_REPL_INFO_METADATA_FOR_ATTR_VALUE = 6, // returns DS_REPL_ATTR_VALUE_ME
TA_DATA * |
| DS_REPL_INFO_CURSORS_2_FOR_NC = 7, // returns DS_REPL_CURSORS_2 * | | DS_REPL_INFO_CURSORS_2_FOR_NC = 7, // returns DS_REPL_CURSORS_2 * |
| DS_REPL_INFO_CURSORS_3_FOR_NC = 8, // returns DS_REPL_CURSORS_3 * | | DS_REPL_INFO_CURSORS_3_FOR_NC = 8, // returns DS_REPL_CURSORS_3 * |
| DS_REPL_INFO_METADATA_2_FOR_OBJ = 9, // returns DS_REPL_OBJECT_META_D
ATA_2 * | | DS_REPL_INFO_METADATA_2_FOR_OBJ = 9, // returns DS_REPL_OBJECT_META_D
ATA_2 * |
| DS_REPL_INFO_METADATA_2_FOR_ATTR_VALUE = 10,// returns DS_REPL_ATTR_VALUE_ME
TA_DATA_2 * | | DS_REPL_INFO_METADATA_2_FOR_ATTR_VALUE = 10,// returns DS_REPL_ATTR_VALUE_ME
TA_DATA_2 * |
| | |
| // <- insert new DS_REPL_INFO_* types here. | | // <- insert new DS_REPL_INFO_* types here. |
|
| | DS_REPL_INFO_METADATA_EXT_FOR_ATTR_VALUE = 11, // returns DS_REPL_ATTR_VAL
UE_META_DATA_EXT * |
| DS_REPL_INFO_TYPE_MAX | | DS_REPL_INFO_TYPE_MAX |
| } DS_REPL_INFO_TYPE; | | } DS_REPL_INFO_TYPE; |
| | |
| // 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) |
| | |
| skipping to change at line 3090 | | skipping to change at line 2959 |
| FILETIME ftimeDeleted; | | FILETIME ftimeDeleted; |
| FILETIME ftimeCreated; | | FILETIME ftimeCreated; |
| DWORD dwVersion; | | DWORD dwVersion; |
| FILETIME ftimeLastOriginatingChange; | | FILETIME ftimeLastOriginatingChange; |
| UUID uuidLastOriginatingDsaInvocationID; | | UUID uuidLastOriginatingDsaInvocationID; |
| USN usnOriginatingChange; // in the originating DSA's USN space | | USN usnOriginatingChange; // in the originating DSA's USN space |
| USN usnLocalChange; // in the local DSA's USN space | | USN usnLocalChange; // in the local DSA's USN space |
| LPWSTR pszLastOriginatingDsaDN; | | LPWSTR pszLastOriginatingDsaDN; |
| } DS_REPL_VALUE_META_DATA_2; | | } DS_REPL_VALUE_META_DATA_2; |
| | |
|
| | typedef struct _DS_REPL_VALUE_META_DATA_EXT { |
| | LPWSTR pszAttributeName; |
| | LPWSTR pszObjectDn; |
| | DWORD cbData; |
| | #ifdef MIDL_PASS |
| | [size_is(cbData), ptr] BYTE *pbData; |
| | #else |
| | BYTE *pbData; |
| | #endif |
| | FILETIME ftimeDeleted; |
| | FILETIME ftimeCreated; |
| | DWORD dwVersion; |
| | FILETIME ftimeLastOriginatingChange; |
| | UUID uuidLastOriginatingDsaInvocationID; |
| | USN usnOriginatingChange; // in the originating DSA's USN space |
| | USN usnLocalChange; // in the local DSA's USN space |
| | LPWSTR pszLastOriginatingDsaDN; |
| | DWORD dwUserIdentifier; |
| | DWORD dwPriorLinkState; |
| | DWORD dwCurrentLinkState; |
| | } DS_REPL_VALUE_META_DATA_EXT; |
| | |
| // 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_VALUE_META_DATA_BLOB { | | typedef struct _DS_REPL_VALUE_META_DATA_BLOB { |
| DWORD oszAttributeName; | | DWORD oszAttributeName; |
| DWORD oszObjectDn; | | DWORD oszObjectDn; |
| DWORD cbData; | | DWORD cbData; |
| DWORD obData; | | DWORD obData; |
| FILETIME ftimeDeleted; | | FILETIME ftimeDeleted; |
| FILETIME ftimeCreated; | | FILETIME ftimeCreated; |
| DWORD dwVersion; | | DWORD dwVersion; |
| FILETIME ftimeLastOriginatingChange; | | FILETIME ftimeLastOriginatingChange; |
| UUID uuidLastOriginatingDsaInvocationID; | | UUID uuidLastOriginatingDsaInvocationID; |
| USN usnOriginatingChange; // in the originating DSA's USN space | | USN usnOriginatingChange; // in the originating DSA's USN space |
| USN usnLocalChange; // in the local DSA's USN space | | USN usnLocalChange; // in the local DSA's USN space |
| DWORD oszLastOriginatingDsaDN; | | DWORD oszLastOriginatingDsaDN; |
| } DS_REPL_VALUE_META_DATA_BLOB; | | } DS_REPL_VALUE_META_DATA_BLOB; |
| | |
|
| | // Fields can be added only to the end of this structure. |
| | typedef struct _DS_REPL_VALUE_META_DATA_BLOB_EXT { |
| | DWORD oszAttributeName; |
| | DWORD oszObjectDn; |
| | DWORD cbData; |
| | DWORD obData; |
| | FILETIME ftimeDeleted; |
| | FILETIME ftimeCreated; |
| | DWORD dwVersion; |
| | FILETIME ftimeLastOriginatingChange; |
| | UUID uuidLastOriginatingDsaInvocationID; |
| | USN usnOriginatingChange; // in the originating DSA's USN space |
| | USN usnLocalChange; // in the local DSA's USN space |
| | DWORD oszLastOriginatingDsaDN; |
| | DWORD dwUserIdentifier; |
| | DWORD dwPriorLinkState; |
| | DWORD dwCurrentLinkState; |
| | } DS_REPL_VALUE_META_DATA_BLOB_EXT; |
| | |
| typedef struct _DS_REPL_ATTR_VALUE_META_DATA { | | typedef struct _DS_REPL_ATTR_VALUE_META_DATA { |
| DWORD cNumEntries; | | DWORD cNumEntries; |
| DWORD dwEnumerationContext; | | DWORD dwEnumerationContext; |
| #ifdef MIDL_PASS | | #ifdef MIDL_PASS |
| [size_is(cNumEntries)] DS_REPL_VALUE_META_DATA rgMetaData[]; | | [size_is(cNumEntries)] DS_REPL_VALUE_META_DATA rgMetaData[]; |
| #else | | #else |
| DS_REPL_VALUE_META_DATA rgMetaData[1]; | | DS_REPL_VALUE_META_DATA rgMetaData[1]; |
| #endif | | #endif |
| } DS_REPL_ATTR_VALUE_META_DATA; | | } DS_REPL_ATTR_VALUE_META_DATA; |
| | |
| typedef struct _DS_REPL_ATTR_VALUE_META_DATA_2 { | | typedef struct _DS_REPL_ATTR_VALUE_META_DATA_2 { |
| DWORD cNumEntries; | | DWORD cNumEntries; |
| DWORD dwEnumerationContext; | | DWORD dwEnumerationContext; |
| #ifdef MIDL_PASS | | #ifdef MIDL_PASS |
| [size_is(cNumEntries)] DS_REPL_VALUE_META_DATA_2 rgMetaData[]; | | [size_is(cNumEntries)] DS_REPL_VALUE_META_DATA_2 rgMetaData[]; |
| #else | | #else |
| DS_REPL_VALUE_META_DATA_2 rgMetaData[1]; | | DS_REPL_VALUE_META_DATA_2 rgMetaData[1]; |
| #endif | | #endif |
| } DS_REPL_ATTR_VALUE_META_DATA_2; | | } DS_REPL_ATTR_VALUE_META_DATA_2; |
| | |
|
| | typedef struct _DS_REPL_ATTR_VALUE_META_DATA_EXT { |
| | DWORD cNumEntries; |
| | DWORD dwEnumerationContext; |
| | #ifdef MIDL_PASS |
| | [size_is(cNumEntries)] DS_REPL_VALUE_META_DATA_EXT rgMetaData[]; |
| | #else |
| | DS_REPL_VALUE_META_DATA_EXT rgMetaData[1]; |
| | #endif |
| | } DS_REPL_ATTR_VALUE_META_DATA_EXT; |
| | |
| typedef struct _DS_REPL_QUEUE_STATISTICSW | | typedef struct _DS_REPL_QUEUE_STATISTICSW |
| { | | { |
| FILETIME ftimeCurrentOpStarted; | | FILETIME ftimeCurrentOpStarted; |
| DWORD cNumPendingOps; | | DWORD cNumPendingOps; |
| 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 | | _Check_return_ |
| NTDSAPI | | NTDSAPI |
| DWORD | | DWORD |
| WINAPI | | WINAPI |
| DsReplicaGetInfoW( | | DsReplicaGetInfoW( |
|
| __in HANDLE hDS, // in | | _In_ HANDLE hDS, // in |
| DS_REPL_INFO_TYPE InfoType, // in | | DS_REPL_INFO_TYPE InfoType, // in |
|
| __in_opt LPCWSTR pszObject, // in | | _In_opt_ LPCWSTR pszObject, // in |
| __in_opt UUID * puuidForSourceDsaObjGuid, // in | | _In_opt_ UUID * puuidForSourceDsaObjGuid, // in |
| __deref_out VOID ** ppInfo); // out | | _Outptr_ 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 | | _Check_return_ |
| NTDSAPI | | NTDSAPI |
| DWORD | | DWORD |
| WINAPI | | WINAPI |
| DsReplicaGetInfo2W( | | DsReplicaGetInfo2W( |
|
| __in HANDLE hDS, // in | | _In_ HANDLE hDS, // in |
| DS_REPL_INFO_TYPE InfoType, // in | | DS_REPL_INFO_TYPE InfoType, // in |
|
| __in_opt LPCWSTR pszObject, // in | | _In_opt_ LPCWSTR pszObject, // in |
| __in_opt UUID * puuidForSourceDsaObjGuid, // in | | _In_opt_ UUID * puuidForSourceDsaObjGuid, // in |
| __in_opt LPCWSTR pszAttributeName, // in | | _In_opt_ LPCWSTR pszAttributeName, // in |
| __in_opt LPCWSTR pszValue, // in | | _In_opt_ LPCWSTR pszValue, // in |
| DWORD dwFlags, // in | | DWORD dwFlags, // in |
| DWORD dwEnumerationContext, // in | | DWORD dwEnumerationContext, // in |
|
| __deref_out VOID ** ppInfo); // out | | _Outptr_ VOID ** ppInfo); // out |
| | |
| NTDSAPI | | NTDSAPI |
| void | | void |
| WINAPI | | WINAPI |
| DsReplicaFreeInfo( | | DsReplicaFreeInfo( |
| DS_REPL_INFO_TYPE InfoType, // in | | DS_REPL_INFO_TYPE InfoType, // in |
|
| __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 | | _Check_return_ |
| NTDSAPI | | NTDSAPI |
| DWORD | | DWORD |
| WINAPI | | WINAPI |
| DsAddSidHistoryW( | | DsAddSidHistoryW( |
|
| __in HANDLE hDS, // in | | _In_ HANDLE hDS, // in |
| __reserved DWORD Flags, // in - sbz for n | | _Reserved_ DWORD Flags, // in - sbz for n |
| ow | | ow |
| __in LPCWSTR SrcDomain, // in - DNS or NetBIOS | | _In_ LPCWSTR SrcDomain, // in - DNS or NetBIOS |
| __in LPCWSTR SrcPrincipal, // in - SAM account nam | | _In_ LPCWSTR SrcPrincipal, // in - SAM account nam |
| e | | e |
| __in_opt LPCWSTR SrcDomainController, // in, optional | | _In_opt_ LPCWSTR SrcDomainController, // in, optional |
| __in_opt RPC_AUTH_IDENTITY_HANDLE SrcDomainCreds, // in - creds for s | | _In_opt_ RPC_AUTH_IDENTITY_HANDLE SrcDomainCreds, // in - creds for s |
| rc domain | | rc domain |
| __in LPCWSTR DstDomain, // in - DNS or NetBIOS | | _In_ LPCWSTR DstDomain, // in - DNS or NetBIOS |
| __in LPCWSTR DstPrincipal); // in - SAM account nam | | _In_ LPCWSTR DstPrincipal); // in - SAM account nam |
| e | | e |
| | |
|
| __checkReturn | | _Check_return_ |
| NTDSAPI | | NTDSAPI |
| DWORD | | DWORD |
| WINAPI | | WINAPI |
| DsAddSidHistoryA( | | DsAddSidHistoryA( |
|
| __in HANDLE hDS, // in | | _In_ HANDLE hDS, // in |
| __reserved DWORD Flags, // in - sbz for n | | _Reserved_ DWORD Flags, // in - sbz for n |
| ow | | ow |
| __in LPCSTR SrcDomain, // in - DNS or NetBIOS | | _In_ LPCSTR SrcDomain, // in - DNS or NetBIOS |
| __in LPCSTR SrcPrincipal, // in - SAM account nam | | _In_ LPCSTR SrcPrincipal, // in - SAM account nam |
| e | | e |
| __in_opt LPCSTR SrcDomainController, // in, optional | | _In_opt_ LPCSTR SrcDomainController, // in, optional |
| __in_opt RPC_AUTH_IDENTITY_HANDLE SrcDomainCreds, // in - creds for s | | _In_opt_ RPC_AUTH_IDENTITY_HANDLE SrcDomainCreds, // in - creds for s |
| rc domain | | rc domain |
| __in LPCSTR DstDomain, // in - DNS or NetBIOS | | _In_ LPCSTR DstDomain, // in - DNS or NetBIOS |
| __in LPCSTR DstPrincipal); // in - SAM account nam | | _In_ LPCSTR DstPrincipal); // in - SAM account nam |
| e | | 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 | | _Check_return_ |
| NTDSAPI | | NTDSAPI |
| DWORD | | DWORD |
| WINAPI | | WINAPI |
| DsInheritSecurityIdentityW( | | DsInheritSecurityIdentityW( |
|
| __in HANDLE hDS, // in | | _In_ HANDLE hDS, // in |
| __reserved DWORD Flags, // in - sbz for n | | _Reserved_ DWORD Flags, // in - sbz for n |
| ow | | ow |
| __in LPCWSTR SrcPrincipal, // in - distinguished n | | _In_ LPCWSTR SrcPrincipal, // in - distinguished n |
| ame | | ame |
| __in LPCWSTR DstPrincipal); // in - distinguished n | | _In_ LPCWSTR DstPrincipal); // in - distinguished n |
| ame | | ame |
| | |
|
| __checkReturn | | _Check_return_ |
| NTDSAPI | | NTDSAPI |
| DWORD | | DWORD |
| WINAPI | | WINAPI |
| DsInheritSecurityIdentityA( | | DsInheritSecurityIdentityA( |
|
| __in HANDLE hDS, // in | | _In_ HANDLE hDS, // in |
| __reserved DWORD Flags, // in - sbz for n | | _Reserved_ DWORD Flags, // in - sbz for n |
| ow | | ow |
| __in LPCSTR SrcPrincipal, // in - distinguished n | | _In_ LPCSTR SrcPrincipal, // in - distinguished n |
| ame | | ame |
| __in LPCSTR DstPrincipal); // in - distinguished n | | _In_ LPCSTR DstPrincipal); // in - distinguished n |
| ame | | 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 | | |
| DWORD | | |
| WINAPI | | |
| DsQuoteRdnValue( | | |
| DWORD cUnquotedRdnValueLength, | | |
| __in_ecount(cUnquotedRdnValueLength) LPCTCH psUnquotedRdnValue, | | |
| __inout DWORD *pcQuotedRdnValueLength, | | |
| __out_ecount_part(*pcQuotedRdnValueLength, *pcQuotedRdnValueLength) LPTCH | | |
| psQuotedRdnValue | | |
| ) | | |
| /*++ | | |
| | |
| Description | | |
| | |
| This client call converts an RDN value into a quoted RDN value if | | |
| 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 | | |
| such as LDAP. | | |
| | |
| No quotes are added if none are needed. In this case, the | | |
| output RDN value will be the same as the input RDN value. | | |
| | |
| The RDN is quoted in accordance with the specification "Lightweight | | |
| Directory Access Protocol (v3): UTF-8 String Representation of | | |
| Distinguished Names", RFC 2253. | | |
| | |
| The input and output RDN values are *NOT* NULL terminated. | | |
| | |
| The changes made by this call can be undone by calling | | |
| DsUnquoteRdnValue(). | | |
| | |
| Arguments: | | |
| | |
| cUnquotedRdnValueLength - The length of psUnquotedRdnValue in chars. | | |
| | |
| psUnquotedRdnValue - Unquoted RDN value. | | |
| | |
| pcQuotedRdnValueeLength - IN, maximum length of psQuotedRdnValue, in chars | | |
| OUT ERROR_SUCCESS, chars utilized in psQuotedRdnValue | | |
| OUT ERROR_BUFFER_OVERFLOW, chars needed in psQuotedRdnVa | | |
| lue | | |
| | |
| psQuotedRdnValue - The resultant and perhaps quoted RDN value | | |
| | |
| Return Value: | | |
| ERROR_SUCCESS | | |
| If quotes or escapes were needed, then psQuotedRdnValue contains | | |
| the quoted, escaped version of psUnquotedRdnValue. Otherwise, | | |
| psQuotedRdnValue contains a copy of psUnquotedRdnValue. In either | | |
| case, pcQuotedRdnValueLength contains the space utilized, in chars. | | |
| | |
| ERROR_BUFFER_OVERFLOW | | |
| psQuotedRdnValueLength contains the space needed, in chars, | | |
| to hold psQuotedRdnValue. | | |
| | |
| ERROR_INVALID_PARAMETER | | |
| Invalid parameter. | | |
| | |
| ERROR_NOT_ENOUGH_MEMORY | | |
| Allocation error. | | |
| | |
| | |
| __checkReturn | | |
| NTDSAPI | | |
| DWORD | | |
| WINAPI | | |
| DsQuoteRdnValueW( | | |
| DWORD cUnquotedRdnValueLength, | | |
| __in_ecount(cUnquotedRdnValueLength) IN LPCWCH psUnquotedRdnValue, | | |
| __inout DWORD *pcQuotedRdnValueLength, | | |
| __out_ecount_part(*pcQuotedRdnValueLength, *pcQuotedRdnValueLength) LPWCH | | |
| psQuotedRdnValue | | |
| ); | | |
| | |
| __checkReturn | | |
| NTDSAPI | | |
| DWORD | | |
| WINAPI | | |
| DsQuoteRdnValueA( | | |
| DWORD cUnquotedRdnValueLength, | | |
| __in_ecount (cUnquotedRdnValueLength) IN LPCCH psUnquotedRdnValue, | | |
| __inout DWORD *pcQuotedRdnValueLength, | | |
| __out_ecount_part (*pcQuotedRdnValueLength, *pcQuotedRdnValueLength) LPCH | | |
| psQuotedRdnValue | | |
| ); | | |
| | |
| #ifdef UNICODE | | |
| #define DsQuoteRdnValue DsQuoteRdnValueW | | |
| #else | | |
| #define DsQuoteRdnValue DsQuoteRdnValueA | | |
| #endif | | |
| | |
| /*++ | | |
| ========================================================== | | |
| __checkReturn | | |
| NTDSAPI | | |
| DWORD | | |
| WINAPI | | |
| DsUnquoteRdnValue( | | |
| DWORD cQuotedRdnValueLength, | | |
| __in_ecount(cQuotedRdnValueLength) LPCTCH psQuotedRdnValue, | | |
| __inout DWORD *pcUnquotedRdnValueLength, | | |
| __out_ecount_part(*pcUnquotedRdnValueLength,*pcUnquotedRdnValueLength) LP | | |
| TCH psUnquotedRdnValue | | |
| ) | | |
| | |
| Description | | |
| | |
| This client call converts a quoted RDN Value into an unquoted RDN | | |
| Value. The resultant RDN value should *NOT* be submitted as part | | |
| of a DN to the DS using various APIs such as LDAP. | | |
| | |
| When psQuotedRdnValue is quoted: | | |
| The leading and trailing quote are removed. | | |
| | |
| Whitespace before the first quote is discarded. | | |
| | |
| Whitespace trailing the last quote is discarded. | | |
| | |
| Escapes are removed and the char following the escape is kept. | | |
| | |
| The following actions are taken when psQuotedRdnValue is unquoted: | | |
| | |
| Leading whitespace is discarded. | | |
| | |
| Trailing whitespace is kept. | | |
| | |
| Escaped non-special chars return an error. | | |
| | |
| Unescaped special chars return an error. | | |
| | |
| RDN values beginning with # (ignoring leading whitespace) are | | |
| treated as a stringized BER value and converted accordingly. | | |
| | |
| Escaped hex digits (\89) are converted into a binary byte (0x89). | | |
| | |
| Escapes are removed from escaped special chars. | | |
| | |
| The following actions are always taken: | | |
| Escaped special chars are unescaped. | | |
| | |
| The input and output RDN values are not NULL terminated. | | |
| | |
| Arguments: | | |
| | |
| cQuotedRdnValueLength - The length of psQuotedRdnValue in chars. | | |
| | |
| psQuotedRdnValue - RDN value that may be quoted and may be escaped. | | |
| | |
| pcUnquotedRdnValueLength - IN, maximum length of psUnquotedRdnValue, in char | | |
| s | | |
| OUT ERROR_SUCCESS, chars used in psUnquotedRdnValue | | |
| OUT ERROR_BUFFER_OVERFLOW, chars needed for psUnquoted | | |
| RdnValue | | |
| | |
| psUnquotedRdnValue - The resultant unquoted RDN value. | | |
| | |
| Return Value: | | |
| ERROR_SUCCESS | | |
| psUnquotedRdnValue contains the unquoted and unescaped version | | |
| of psQuotedRdnValue. pcUnquotedRdnValueLength contains the space | | |
| used, in chars. | | |
| | |
| ERROR_BUFFER_OVERFLOW | | |
| psUnquotedRdnValueLength contains the space needed, in chars, | | |
| to hold psUnquotedRdnValue. | | |
| | |
| ERROR_INVALID_PARAMETER | | |
| Invalid parameter. | | |
| | |
| ERROR_NOT_ENOUGH_MEMORY | | |
| Allocation error. | | |
| | |
| | |
| __checkReturn | | |
| NTDSAPI | | |
| DWORD | | |
| WINAPI | | |
| DsUnquoteRdnValueW( | | |
| DWORD cQuotedRdnValueLength, | | |
| __in_ecount (cQuotedRdnValueLength) LPCWCH psQuotedRdnValue, | | |
| __inout DWORD *pcUnquotedRdnValueLength, | | |
| __out_ecount_part (*pcUnquotedRdnValueLength, *pcUnquotedRdnValueLength) LPW | | |
| CH psUnquotedRdnValue | | |
| ); | | |
| | |
| __checkReturn | | |
| NTDSAPI | | |
| DWORD | | |
| WINAPI | | |
| DsUnquoteRdnValueA( | | |
| DWORD cQuotedRdnValueLength, | | |
| __in_ecount (cQuotedRdnValueLength) LPCCH psQuotedRdnValue, | | |
| __inout DWORD *pcUnquotedRdnValueLength, | | |
| __out_ecount_part (*pcUnquotedRdnValueLength, *pcUnquotedRdnValueLength) LPC | | |
| H psUnquotedRdnValue | | |
| ); | | |
| | |
| #ifdef UNICODE | | |
| #define DsUnquoteRdnValue DsUnquoteRdnValueW | | |
| #else | | |
| #define DsUnquoteRdnValue DsUnquoteRdnValueA | | |
| #endif | | |
| | |
| /*++ | | |
| ========================================================== | | |
| __checkReturn | | |
| NTDSAPI | | |
| DWORD | | |
| WINAPI | | |
| DsGetRdnW( | | |
| IN OUT LPCWCH *ppDN, | | |
| IN OUT DWORD *pcDN, | | |
| OUT LPCWCH *ppKey, | | |
| OUT DWORD *pcKey, | | |
| OUT LPCWCH *ppVal, | | |
| OUT DWORD *pcVal | | |
| ) | | |
| | |
| Description | | |
| | |
| This client call accepts a DN with quoted RDNs and returns the address | | |
| and length, in chars, of the key and value for the first RDN in the DN. | | |
| The RDN value returned is still quoted. Use DsUnquoteRdnValue to unquote | | |
| the value for display. | | |
| | |
| This client call also returns the address and length of the rest of the | | |
| DN. A subsequent call using the returned DN address and length will | | |
| return information about the next RDN. | | |
| | |
| The following loop processes each RDN in pDN: | | |
| ccDN = wcslen(pDN) | | |
| while (ccDN) { | | |
| error = DsGetRdn(&pDN, | | |
| &ccDN, | | |
| &pKey, | | |
| &ccKey, | | |
| &pVal, | | |
| &ccVal); | | |
| if (error != ERROR_SUCCESS) { | | |
| process error; | | |
| return; | | |
| } | | |
| if (ccKey) { | | |
| process pKey; | | |
| } | | |
| if (ccVal) { | | |
| process pVal; | | |
| } | | |
| } | | |
| | |
| For example, given the DN "cn=bob,dc=com", the first call to DsGetRdnW | | |
| returns the addresses for ",dc=com", "cn", and "bob" with respective | | |
| lengths of 7, 2, and 3. A subsequent call with ",dc=com" returns "", | | |
| "dc", and "com" with respective lengths 0, 2, and 3. | | |
| | |
| Arguments: | | |
| ppDN | | |
| IN : *ppDN points to a DN | | |
| OUT: *ppDN points to the rest of the DN following the first RDN | | |
| pcDN | | |
| IN : *pcDN is the count of chars in the input *ppDN, not including | | |
| any terminating NULL | | |
| OUT: *pcDN is the count of chars in the output *ppDN, not including | | |
| any terminating NULL | | |
| ppKey | | |
| OUT: Undefined if *pcKey is 0. Otherwise, *ppKey points to the first | | |
| key in the DN | | |
| pcKey | | |
| OUT: *pcKey is the count of chars in *ppKey. | | |
| | |
| ppVal | | |
| OUT: Undefined if *pcVal is 0. Otherwise, *ppVal points to the first | | |
| value in the DN | | |
| pcVal | | |
| OUT: *pcVal is the count of chars in *ppVal | | |
| | |
| Return Value: | | |
| ERROR_SUCCESS | | |
| If *pccDN is not 0, then *ppDN points to the rest of the DN following | | |
| the first RDN. If *pccDN is 0, then *ppDN is undefined. | | |
| | |
| If *pccKey is not 0, then *ppKey points to the first key in DN. If | | |
| *pccKey is 0, then *ppKey is undefined. | | |
| | |
| If *pccVal is not 0, then *ppVal points to the first value in DN. If | | |
| *pccVal is 0, then *ppVal is undefined. | | |
| | |
| ERROR_DS_NAME_UNPARSEABLE | | |
| The first RDN in *ppDN could not be parsed. All output parameters | | |
| are undefined. | | |
| | |
| Any other error | | |
| All output parameters are undefined. | | |
| | |
| __checkReturn | | |
| NTDSAPI | | |
| DWORD | | |
| WINAPI | | |
| DsGetRdnW( | | |
| __deref_inout_ecount_part(*pcDN,*pcDN) LPCWCH *ppDN, | | |
| __inout DWORD *pcDN, | | |
| __deref_out_ecount(*pcKey) LPCWCH *ppKey, | | |
| __out DWORD *pcKey, | | |
| __deref_out_ecount(*pcVal) LPCWCH *ppVal, | | |
| __out DWORD *pcVal | | |
| ); | | |
| | |
| /*++ | | |
| ========================================================== | | |
| | |
| __checkReturn | | |
| NTDSAPI | | |
| BOOL | | |
| WINAPI | | |
| DsCrackUnquotedMangledRdnW( | | |
| IN LPCWSTR pszRDN, | | |
| IN DWORD cchRDN, | | |
| OUT OPTIONAL GUID *pGuid, | | |
| OUT OPTIONAL DS_MANGLE_FOR *peDsMangleFor | | |
| ); | | |
| | |
| Description | | |
| | |
| Determine whether the given RDN is in mangled form. If so, the mangled RDN | | |
| is decoded, and the guid and mangle type are returned. | | |
| | |
| The RDN should already be in unquoted form. See DsUnquoteRdnValue. | | |
| | |
| Arguments: | | |
| | |
| pszRDN (IN) - Character string containing RDN. Termination is optional. | | |
| | |
| cchRDN (IN) - Length of RDN excluding termination, if any | | |
| | |
| pGuid (OUT, OPTIONAL) - Pointer to storage to receive decoded guid. | | |
| Only returned if RDN is mangled. | | |
| | |
| peDsMangleFor (OUT, OPTIONAL) - Pointer to storage to receive mangle type. | | |
| Only returned if RDN is mangled | | |
| | |
| Return Value: | | |
| | |
| BOOL - Whether the RDN is mangled or not | | |
| | |
| | |
| NTDSAPI | | |
| BOOL | | |
| WINAPI | | |
| DsCrackUnquotedMangledRdnW( | | |
| __in_ecount(cchRDN) LPCWSTR pszRDN, | | |
| DWORD cchRDN, | | |
| __out_opt GUID *pGuid, | | |
| __out_opt DS_MANGLE_FOR *peDsMangleFor | | |
| ); | | |
| | |
| NTDSAPI | | |
| BOOL | | |
| WINAPI | | |
| DsCrackUnquotedMangledRdnA( | | |
| __in_ecount(cchRDN) LPCSTR pszRDN, | | |
| DWORD cchRDN, | | |
| __out_opt GUID *pGuid, | | |
| __out_opt DS_MANGLE_FOR *peDsMangleFor | | |
| ); | | |
| | |
| #ifdef UNICODE | | |
| #define DsCrackUnquotedMangledRdn DsCrackUnquotedMangledRdnW | | |
| #else | | |
| #define DsCrackUnquotedMangledRdn DsCrackUnquotedMangledRdnA | | |
| #endif | | |
| | |
| /*++ | | |
| ========================================================== | | |
| | |
| __checkReturn | | |
| NTDSAPI | | |
| BOOL | | |
| WINAPI | | |
| DsIsMangledRdnValueW( | | |
| LPCWSTR pszRdn, | | |
| DWORD cRdn, | | |
| DS_MANGLE_FOR eDsMangleForDesired | | |
| ); | | |
| | |
| Description | | |
| | |
| Determine if the given RDN Value is mangled, and of the given type. Note tha | | |
| t | | |
| the key portion of an RDN should not be supplied. | | |
| | |
| The name may be quoted or unquoted. This routine tries to unquote the value | | |
| . If | | |
| the unquote operation fails, the routine proceeds to attempt the unmangle. | | |
| | |
| A change was made in the default quoting behavior of DNs returned from the D | | |
| S | | |
| between Windows 2000 and Windows XP. This routine transparently handles RDNs | | |
| with | | |
| special characters in either form. | | |
| | |
| The routine expects the value part of the RDN. | | |
| | |
| If you have full DN, use DsIsMangledDn() below. | | |
| | |
| To check for deleted name: | | |
| DsIsMangledRdnValueW( rdn, rdnlen, DS_MANGLE_OBJECT_FOR_DELETION ) | | |
| To check for a conflicted name: | | |
| DsIsMangledRdnValueW( rdn, rdnlen, DS_MANGLE_OBJECT_FOR_NAME_CONFLICT ) | | |
| | |
| Arguments: | | |
| | |
| pszRdn (IN) - RDN value character string. Termination is not required and | | |
| is ignored. | | |
| | |
| cRdn (IN) - Length of RDN value in characters excluding termination | | |
| | |
| eDsMangleForDesired (IN) - Type of mangling to check for | | |
| | |
| Return Value: | | |
| | |
| BOOL - True if the Rdn is mangled and is of the required type | | |
| | |
| | |
| NTDSAPI | | |
| BOOL | | |
| WINAPI | | |
| DsIsMangledRdnValueW( | | |
| __in_ecount(cRdn) LPCWSTR pszRdn, | | |
| DWORD cRdn, | | |
| DS_MANGLE_FOR eDsMangleForDesired | | |
| ); | | |
| | |
| NTDSAPI | | |
| BOOL | | |
| WINAPI | | |
| DsIsMangledRdnValueA( | | |
| __in_ecount(cRdn) LPCSTR pszRdn, | | |
| DWORD cRdn, | | |
| DS_MANGLE_FOR eDsMangleForDesired | | |
| ); | | |
| | |
| #ifdef UNICODE | | |
| #define DsIsMangledRdnValue DsIsMangledRdnValueW | | |
| #else | | |
| #define DsIsMangledRdnValue DsIsMangledRdnValueA | | |
| #endif | | |
| | |
| /*++ | | |
| ========================================================== | | |
| | |
| NTDSAPI | | |
| BOOL | | |
| WINAPI | | |
| DsIsMangledDnW( | | |
| LPCWSTR pszDn, | | |
| DS_MANGLE_FOR eDsMangleFor | | |
| ); | | |
| | |
| Description | | |
| | |
| Determine if the first RDN in a quoted DN is a mangled name of given type. | | |
| | |
| The DN must be suitable for input to DsGetRdn(). | | |
| | |
| To check for deleted name: | | |
| DsIsMangledDnW( dn, DS_MANGLE_OBJECT_FOR_DELETION ) | | |
| To check for a conflicted name: | | |
| DsIsMangledDnW( Dn, DS_MANGLE_OBJECT_FOR_NAME_CONFLICT ) | | |
| | |
| Arguments: | | |
| | |
| pszDn (IN) - Quoted Distinguished Name as returned by DS functions | | |
| | |
| eDsMangleFor (IN) - Type of mangling to check for | | |
| | |
| Return Value: | | |
| | |
| BOOL - True if first RDN is mangled and is of the given mangle type | | |
| | |
| | |
| NTDSAPI | | |
| BOOL | | |
| WINAPI | | |
| DsIsMangledDnA( | | |
| __in LPCSTR pszDn, | | |
| DS_MANGLE_FOR eDsMangleFor | | |
| ); | | |
| | |
| NTDSAPI | | |
| BOOL | | |
| WINAPI | | |
| DsIsMangledDnW( | | |
| __in LPCWSTR pszDn, | | |
| DS_MANGLE_FOR eDsMangleFor | | |
| ); | | |
| | |
| #ifdef UNICODE | | |
| #define DsIsMangledDn DsIsMangledDnW | | |
| #else | | |
| #define DsIsMangledDn DsIsMangledDnA | | |
| #endif | | |
| | | |
| // ------------------------------------------------------------------------- | | // ------------------------------------------------------------------------- |
| // strings used by ADAM for constructing keywords values for SCP publication | | // strings used by ADAM for constructing keywords values for SCP publication |
| // ------------------------------------------------------------------------- | | // ------------------------------------------------------------------------- |
| | |
| // Site name, e.g. "site:Default-First-Site-Name" | | // Site name, e.g. "site:Default-First-Site-Name" |
| #define ADAM_SCP_SITE_NAME_STRING "site:" | | #define ADAM_SCP_SITE_NAME_STRING "site:" |
| #define ADAM_SCP_SITE_NAME_STRING_W L"site:" | | #define ADAM_SCP_SITE_NAME_STRING_W L"site:" |
| | |
| // Partition DN, e.g. "partition:O=MSFT,L=WA,C=US" | | // Partition DN, e.g. "partition:O=MSFT,L=WA,C=US" |
| #define ADAM_SCP_PARTITION_STRING "partition:" | | #define ADAM_SCP_PARTITION_STRING "partition:" |
| | |
| skipping to change at line 3805 | | skipping to change at line 3226 |
| #define ADAM_REPL_AUTHENTICATION_MODE_MUTUAL_AUTH_REQUIRED 2 | | #define ADAM_REPL_AUTHENTICATION_MODE_MUTUAL_AUTH_REQUIRED 2 |
| | |
| // ------------------------------------------------------------------------- | | // ------------------------------------------------------------------------- |
| // Optional Feature values: | | // Optional Feature values: |
| // ------------------------------------------------------------------------- | | // ------------------------------------------------------------------------- |
| | |
| // Flags for the msDS-OptionalFeatureFlags attribute of the FeatureConfiguration
object. | | // 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_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_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. | | #define FLAG_DISABLABLE_OPTIONAL_FEATURE (0x00000004) // The optional feature ma
y be turned off. |
|
| | #define FLAG_SERVER_OPTIONAL_FEATURE (0x00000008) // The optional feature is
a server level feature.. |
| | |
| // GUID of the Recycle Bin optional feature | | // GUID of the Recycle Bin optional feature |
| #define GUID_RECYCLE_BIN_OPTIONAL_FEATURE_A "d8dc6d76d0ac5e44f3b9a7f9b6744f2
a" | | #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_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" | | #define GUID_RECYCLE_BIN_OPTIONAL_FEATURE_BYTE "\xd8\xdc\x6d\x76\xd0\xac\x5e\x4
4\xf3\xb9\xa7\xf9\xb6\x74\x4f\x2a" |
| | |
|
| | // GUID of the Link History Support optional feature |
| | #define GUID_LINK_HISTORY_OPTIONAL_FEATURE_A "76b9ec0aca58e11195301dba472401 |
| | 9b" |
| | #define GUID_LINK_HISTORY_OPTIONAL_FEATURE_W L"76b9ec0aca58e11195301dba472401 |
| | 9b" |
| | #define GUID_LINK_HISTORY_OPTIONAL_FEATURE_BYTE "\x76\xb9\xec\x0a\xca\x58\xe1\x |
| | 11\x95\x30\x1d\xba\x47\x24\x01\x9b" |
| | |
| | // GUID of the Alternate Link Data Storage Support optional feature |
| | #define GUID_ALTERNATE_LINK_DATA_STORAGE_OPTIONAL_FEATURE_A "3c29dc65f8e04f4 |
| | 58b1a98dc1848978f" |
| | #define GUID_ALTERNATE_LINK_DATA_STORAGE_OPTIONAL_FEATURE_W L"3c29dc65f8e04f4 |
| | 58b1a98dc1848978f" |
| | #define GUID_ALTERNATE_LINK_DATA_STORAGE_OPTIONAL_FEATURE_BYTE "\x3c\x29\xdc\x6 |
| | 5\xf8\xe0\x4f\x45\x8b\x1a\x98\xdc\x18\x48\x97\x8f" |
| | |
| | // GUID of Link Quota feature |
| | #define GUID_LINK_QUOTA_OPTIONAL_FEATURE_A "5b0ab0d503ec4d8196f1533f42602 |
| | 36f" |
| | #define GUID_LINK_QUOTA_OPTIONAL_FEATURE_W L"5b0ab0d503ec4d8196f1533f42602 |
| | 36f" |
| | #define GUID_LINK_QUOTA_OPTIONAL_FEATURE_BYTE "\x5b\x0a\xb0\xd5\x03\xec\x4d\ |
| | x81\x96\xf1\x53\x3f\x42\x60\x23\x6f" |
| | |
| #ifdef __cplusplus | | #ifdef __cplusplus |
| } | | } |
| #endif | | #endif |
| #endif !MIDL_PASS | | #endif !MIDL_PASS |
| | |
|
| | #endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */ |
| | #pragma endregion |
| | |
| #endif // _NTDSAPI_H_ | | #endif // _NTDSAPI_H_ |
| | |
| End of changes. 176 change blocks. |
| 1099 lines changed or deleted | | 562 lines changed or added |
|