3 * Copyright 2012, 2013 MinGW.org project
5 * Permission is hereby granted, free of charge, to any person obtaining a
6 * copy of this software and associated documentation files (the "Software"),
7 * to deal in the Software without restriction, including without limitation
8 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
9 * and/or sell copies of the Software, and to permit persons to whom the
10 * Software is furnished to do so, subject to the following conditions:
12 * The above copyright notice and this permission notice (including the next
13 * paragraph) shall be included in all copies or substantial portions of the
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22 * DEALINGS IN THE SOFTWARE.
26 #pragma GCC system_header
33 /*--- Active Directory Reference - Active Directory Structures - Directory Service Structures */
34 #if (_WIN32_WINNT >= _WIN32_WINNT_WIN2K)
35 #define DS_FORCE_REDISCOVERY 0x00000001
36 #define DS_DIRECTORY_SERVICE_REQUIRED 0x00000010
37 #define DS_DIRECTORY_SERVICE_PREFERRED 0x00000020
38 #define DS_GC_SERVER_REQUIRED 0x00000040
39 #define DS_PDC_REQUIRED 0x00000080
40 #define DS_BACKGROUND_ONLY 0x00000100
41 #define DS_IP_REQUIRED 0x00000200
42 #define DS_KDC_REQUIRED 0x00000400
43 #define DS_TIMESERV_REQUIRED 0x00000800
44 #define DS_WRITABLE_REQUIRED 0x00001000
45 #define DS_GOOD_TIMESERV_PREFERRED 0x00002000
46 #define DS_AVOID_SELF 0x00004000
47 #define DS_ONLY_LDAP_NEEDED 0x00008000
48 #define DS_IS_FLAT_NAME 0x00010000
49 #define DS_IS_DNS_NAME 0x00020000
50 #define DS_RETURN_DNS_NAME 0x40000000
51 #define DS_RETURN_FLAT_NAME 0x80000000
52 typedef struct _DOMAIN_CONTROLLER_INFOA {
53 LPSTR DomainControllerName;
54 LPSTR DomainControllerAddress;
55 ULONG DomainControllerAddressType;
62 } DOMAIN_CONTROLLER_INFOA,*PDOMAIN_CONTROLLER_INFOA;
63 typedef struct _DOMAIN_CONTROLLER_INFOW {
64 LPWSTR DomainControllerName;
65 LPWSTR DomainControllerAddress;
66 ULONG DomainControllerAddressType;
72 LPWSTR ClientSiteName;
73 } DOMAIN_CONTROLLER_INFOW,*PDOMAIN_CONTROLLER_INFOW;
74 #define DS_INET_ADDRESS 0x0001
75 #define DS_NETBIOS_ADDRESS 0x0002
76 #define DS_PDC_FLAG 0x00000001
77 #define DS_GC_FLAG 0x00000004
78 #define DS_DS_FLAG 0x00000010
79 #define DS_KDC_FLAG 0x00000020
80 #define DS_TIMESERV_FLAG 0x00000040
81 #define DS_WRITABLE_FLAG 0x00000100
82 #define DS_DNS_CONTROLLER_FLAG 0x20000000
83 #define DS_DNS_DOMAIN_FLAG 0x40000000
84 #define DS_DNS_FOREST_FLAG 0x80000000
85 typedef struct _DS_DOMAIN_TRUSTSA {
86 LPSTR NetbiosDomainName;
91 ULONG TrustAttributes;
94 } DS_DOMAIN_TRUSTSA,*PDS_DOMAIN_TRUSTSA;
95 typedef struct _DS_DOMAIN_TRUSTSW {
96 LPWSTR NetbiosDomainName;
101 ULONG TrustAttributes;
104 } DS_DOMAIN_TRUSTSW,*PDS_DOMAIN_TRUSTSW;
105 #define DS_DOMAIN_IN_FOREST 0x0001
106 #define DS_DOMAIN_DIRECT_OUTBOUND 0x0002
107 #define DS_DOMAIN_TREE_ROOT 0x0004
108 #define DS_DOMAIN_PRIMARY 0x0008
109 #define DS_DOMAIN_NATIVE_MODE 0x0010
110 #define DS_DOMAIN_DIRECT_INBOUND 0x0020
112 DWORD WINAPI DsGetDcNameW(LPCWSTR, LPCWSTR, GUID*, LPCWSTR, ULONG, PDOMAIN_CONTROLLER_INFOW*);
113 DWORD WINAPI DsGetDcNameA(LPCSTR, LPCSTR, GUID*, LPCSTR, ULONG, PDOMAIN_CONTROLLER_INFOA*);
115 typedef __AW(DOMAIN_CONTROLLER_INFO) DOMAIN_CONTROLLER_INFO,*PDOMAIN_CONTROLLER_INFO;
116 typedef __AW(DS_DOMAIN_TRUSTS) DS_DOMAIN_TRUSTS,*PDS_DOMAIN_TRUSTS;
117 #define DsGetDcName __AW(DsGetDcName)
118 #endif /* (_WIN32_WINNT >= _WIN32_WINNT_WIN2K) */