1 #ifndef _DSGETDC_H 2 #define _DSGETDC_H 3 4 #ifdef __cplusplus 5 extern "C" { 6 #endif 7 8 #define DS_DOMAIN_IN_FOREST 0x01 9 #define DS_DOMAIN_DIRECT_OUTBOUND 0x02 10 #define DS_DOMAIN_TREE_ROOT 0x04 11 #define DS_DOMAIN_PRIMARY 0x08 12 #define DS_DOMAIN_NATIVE_MODE 0x10 13 #define DS_DOMAIN_DIRECT_INBOUND 0x20 14 15 typedef struct _DOMAIN_CONTROLLER_INFOA 16 { 17 LPSTR DomainControllerName; 18 LPSTR DomainControllerAddress; 19 ULONG DomainControllerAddressType; 20 GUID DomainGuid; 21 LPSTR DomainName; 22 LPSTR DnsForestName; 23 ULONG Flags; 24 LPSTR DcSiteName; 25 LPSTR ClientSiteName; 26 } DOMAIN_CONTROLLER_INFOA, *PDOMAIN_CONTROLLER_INFOA; 27 28 typedef struct _DOMAIN_CONTROLLER_INFOW 29 { 30 LPWSTR DomainControllerName; 31 LPWSTR DomainControllerAddress; 32 ULONG DomainControllerAddressType; 33 GUID DomainGuid; 34 LPWSTR DomainName; 35 LPWSTR DnsForestName; 36 ULONG Flags; 37 LPWSTR DcSiteName; 38 LPWSTR ClientSiteName; 39 } DOMAIN_CONTROLLER_INFOW, *PDOMAIN_CONTROLLER_INFOW; 40 41 typedef struct _DS_DOMAIN_TRUSTSA 42 { 43 LPSTR NetbiosDomainName; 44 LPSTR DnsDomainName; 45 ULONG Flags; 46 ULONG ParentIndex; 47 ULONG TrustType; 48 ULONG TrustAttributes; 49 PSID DomainSid; 50 GUID DomainGuid; 51 } DS_DOMAIN_TRUSTSA, *PDS_DOMAIN_TRUSTSA; 52 53 typedef struct _DS_DOMAIN_TRUSTSW 54 { 55 LPWSTR NetbiosDomainName; 56 LPWSTR DnsDomainName; 57 ULONG Flags; 58 ULONG ParentIndex; 59 ULONG TrustType; 60 ULONG TrustAttributes; 61 PSID DomainSid; 62 GUID DomainGuid; 63 } DS_DOMAIN_TRUSTSW, *PDS_DOMAIN_TRUSTSW; 64 65 DWORD WINAPI 66 DsAddressToSiteNamesA( 67 LPCSTR ComputerName, 68 DWORD EntryCount, 69 PSOCKET_ADDRESS SocketAddresses, 70 LPSTR **SiteNames); 71 72 DWORD WINAPI 73 DsAddressToSiteNamesW( 74 LPCWSTR ComputerName, 75 DWORD EntryCount, 76 PSOCKET_ADDRESS SocketAddresses, 77 LPWSTR **SiteNames); 78 79 DWORD WINAPI 80 DsAddressToSiteNamesExA( 81 LPCSTR ComputerName, 82 DWORD EntryCount, 83 PSOCKET_ADDRESS SocketAddresses, 84 LPSTR **SiteNames, 85 LPSTR **SubnetNames); 86 87 DWORD WINAPI 88 DsAddressToSiteNamesExW( 89 LPCWSTR ComputerName, 90 DWORD EntryCount, 91 PSOCKET_ADDRESS SocketAddresses, 92 LPWSTR **SiteNames, 93 LPWSTR **SubnetNames); 94 95 DWORD WINAPI 96 DsDeregisterDnsHostRecordsA( 97 LPSTR ServerName, 98 LPSTR DnsDomainName, 99 GUID *DomainGuid, 100 GUID *DsaGuid, 101 LPSTR DnsHostName); 102 103 DWORD WINAPI 104 DsDeregisterDnsHostRecordsW( 105 LPWSTR ServerName, 106 LPWSTR DnsDomainName, 107 GUID *DomainGuid, 108 GUID *DsaGuid, 109 LPWSTR DnsHostName); 110 111 DWORD WINAPI 112 DsEnumerateDomainTrustsA( 113 LPSTR ServerName, 114 ULONG Flags, 115 PDS_DOMAIN_TRUSTSA* Domains, 116 PULONG DomainCount); 117 118 DWORD WINAPI 119 DsEnumerateDomainTrustsW( 120 LPWSTR ServerName, 121 ULONG Flags, 122 PDS_DOMAIN_TRUSTSW* Domains, 123 PULONG DomainCount); 124 125 DWORD WINAPI 126 DsGetDcNameA( 127 LPCSTR ComputerName, 128 LPCSTR DomainName, 129 GUID* DomainGuid, 130 LPCSTR SiteName, 131 ULONG Flags, 132 PDOMAIN_CONTROLLER_INFOA* DomainControllerInfo); 133 134 DWORD WINAPI 135 DsGetDcNameW( 136 LPCWSTR ComputerName, 137 LPCWSTR DomainName, 138 GUID* DomainGuid, 139 LPCWSTR SiteName, 140 ULONG Flags, 141 PDOMAIN_CONTROLLER_INFOW* DomainControllerInfo); 142 143 DWORD WINAPI 144 DsGetDcSiteCoverageA( 145 LPCSTR ServerName, 146 PULONG EntryCount, 147 LPSTR **SiteNames); 148 149 DWORD WINAPI 150 DsGetDcSiteCoverageW( 151 LPCWSTR ServerName, 152 PULONG EntryCount, 153 LPWSTR **SiteNames); 154 155 DWORD WINAPI 156 DsGetForestTrustInformationW( 157 LPCWSTR ServerName, 158 LPCWSTR TrustedDomainName, 159 DWORD Flags, 160 PLSA_FOREST_TRUST_INFORMATION *ForestTrustInfo); 161 162 DWORD WINAPI 163 DsGetSiteNameA( 164 LPCSTR ComputerName, 165 LPSTR *SiteName); 166 167 DWORD WINAPI 168 DsGetSiteNameW( 169 LPCWSTR ComputerName, 170 LPWSTR *SiteName); 171 172 DWORD WINAPI 173 DsMergeForestTrustInformationW( 174 LPCWSTR DomainName, 175 PLSA_FOREST_TRUST_INFORMATION NewForestTrustInfo, 176 PLSA_FOREST_TRUST_INFORMATION OldForestTrustInfo, 177 PLSA_FOREST_TRUST_INFORMATION *ForestTrustInfo); 178 179 DWORD WINAPI 180 DsValidateSubnetNameA( 181 LPCSTR SubnetName); 182 183 DWORD WINAPI 184 DsValidateSubnetNameW( 185 LPCWSTR SubnetName); 186 187 #ifdef UNICODE 188 typedef DOMAIN_CONTROLLER_INFOW DOMAIN_CONTROLLER_INFO, *PDOMAIN_CONTROLLER_INFO; 189 typedef DS_DOMAIN_TRUSTSW DS_DOMAIN_TRUSTS, *PDS_DOMAIN_TRUSTS; 190 #define DsAddressToSiteNames DsAddressToSiteNamesW 191 #define DsAddressToSiteNamesEx DsAddressToSiteNamesExW 192 #define DsEnumerateDomainTrusts DsEnumerateDomainTrustsW 193 #define DsGetDcName DsGetDcNameW 194 #define DsGetDcSiteCoverage DsGetDcSiteCoverageW 195 #define DsGetSiteName DsGetSiteNameW 196 #define DsValidateSubnetName DsValidateSubnetNameW 197 #else 198 typedef DOMAIN_CONTROLLER_INFOA DOMAIN_CONTROLLER_INFO, *PDOMAIN_CONTROLLER_INFO; 199 typedef DS_DOMAIN_TRUSTSA DS_DOMAIN_TRUSTS, *PDS_DOMAIN_TRUSTS; 200 #define DsAddressToSiteNames DsAddressToSiteNamesA 201 #define DsAddressToSiteNamesEx DsAddressToSiteNamesExA 202 #define DsEnumerateDomainTrusts DsEnumerateDomainTrustsA 203 #define DsGetDcName DsGetDcNameA 204 #define DsGetDcSiteCoverage DsGetDcSiteCoverageA 205 #define DsGetSiteName DsGetSiteNameA 206 #define DsValidateSubnetName DsValidateSubnetNameA 207 #endif 208 209 #ifdef __cplusplus 210 } 211 #endif 212 #endif 213