source: Daodan/MSYS2/mingw32/i686-w64-mingw32/include/dsgetdc.h@ 1166

Last change on this file since 1166 was 1166, checked in by rossy, 3 years ago

Daodan: Replace MinGW build env with an up-to-date MSYS2 env

File size: 8.0 KB
Line 
1/**
2 * This file has no copyright assigned and is placed in the Public Domain.
3 * This file is part of the mingw-w64 runtime package.
4 * No warranty is given; refer to the file DISCLAIMER.PD within this package.
5 */
6#ifndef _DSGETDC_
7#define _DSGETDC_
8
9#include <_mingw_unicode.h>
10
11#ifndef _DSGETDCAPI_
12#define DSGETDCAPI DECLSPEC_IMPORT
13#else
14#define DSGETDCAPI
15#endif
16
17#ifdef __cplusplus
18extern "C" {
19#endif
20
21#define DS_FORCE_REDISCOVERY 0x00000001
22
23#define DS_DIRECTORY_SERVICE_REQUIRED 0x00000010
24#define DS_DIRECTORY_SERVICE_PREFERRED 0x00000020
25#define DS_GC_SERVER_REQUIRED 0x00000040
26#define DS_PDC_REQUIRED 0x00000080
27#define DS_BACKGROUND_ONLY 0x00000100
28#define DS_IP_REQUIRED 0x00000200
29#define DS_KDC_REQUIRED 0x00000400
30#define DS_TIMESERV_REQUIRED 0x00000800
31#define DS_WRITABLE_REQUIRED 0x00001000
32#define DS_GOOD_TIMESERV_PREFERRED 0x00002000
33#define DS_AVOID_SELF 0x00004000
34#define DS_ONLY_LDAP_NEEDED 0x00008000
35
36#define DS_IS_FLAT_NAME 0x00010000
37#define DS_IS_DNS_NAME 0x00020000
38
39#define DS_RETURN_DNS_NAME 0x40000000
40#define DS_RETURN_FLAT_NAME 0x80000000
41
42#define DSGETDC_VALID_FLAGS (DS_FORCE_REDISCOVERY | DS_DIRECTORY_SERVICE_REQUIRED | DS_DIRECTORY_SERVICE_PREFERRED | DS_GC_SERVER_REQUIRED | DS_PDC_REQUIRED | DS_BACKGROUND_ONLY | DS_IP_REQUIRED | DS_KDC_REQUIRED | DS_TIMESERV_REQUIRED | DS_WRITABLE_REQUIRED | DS_GOOD_TIMESERV_PREFERRED | DS_AVOID_SELF | DS_ONLY_LDAP_NEEDED | DS_IS_FLAT_NAME | DS_IS_DNS_NAME | DS_RETURN_FLAT_NAME | DS_RETURN_DNS_NAME)
43
44 typedef struct _DOMAIN_CONTROLLER_INFOA {
45 LPSTR DomainControllerName;
46 LPSTR DomainControllerAddress;
47 ULONG DomainControllerAddressType;
48 GUID DomainGuid;
49 LPSTR DomainName;
50 LPSTR DnsForestName;
51 ULONG Flags;
52 LPSTR DcSiteName;
53 LPSTR ClientSiteName;
54 } DOMAIN_CONTROLLER_INFOA,*PDOMAIN_CONTROLLER_INFOA;
55
56 typedef struct _DOMAIN_CONTROLLER_INFOW {
57 LPWSTR DomainControllerName;
58 LPWSTR DomainControllerAddress;
59 ULONG DomainControllerAddressType;
60 GUID DomainGuid;
61 LPWSTR DomainName;
62 LPWSTR DnsForestName;
63 ULONG Flags;
64 LPWSTR DcSiteName;
65 LPWSTR ClientSiteName;
66 } DOMAIN_CONTROLLER_INFOW,*PDOMAIN_CONTROLLER_INFOW;
67
68#define DOMAIN_CONTROLLER_INFO __MINGW_NAME_AW(DOMAIN_CONTROLLER_INFO)
69#define PDOMAIN_CONTROLLER_INFO __MINGW_NAME_AW(PDOMAIN_CONTROLLER_INFO)
70
71#define DS_INET_ADDRESS 1
72#define DS_NETBIOS_ADDRESS 2
73
74#define DS_PDC_FLAG 0x00000001
75#define DS_GC_FLAG 0x00000004
76#define DS_LDAP_FLAG 0x00000008
77#define DS_DS_FLAG 0x00000010
78#define DS_KDC_FLAG 0x00000020
79#define DS_TIMESERV_FLAG 0x00000040
80#define DS_CLOSEST_FLAG 0x00000080
81#define DS_WRITABLE_FLAG 0x00000100
82#define DS_GOOD_TIMESERV_FLAG 0x00000200
83#define DS_NDNC_FLAG 0x00000400
84#define DS_PING_FLAGS 0x0000FFFF
85
86#define DS_DNS_CONTROLLER_FLAG 0x20000000
87#define DS_DNS_DOMAIN_FLAG 0x40000000
88#define DS_DNS_FOREST_FLAG 0x80000000
89
90#define DsGetDcName __MINGW_NAME_AW(DsGetDcName)
91#define DsGetSiteName __MINGW_NAME_AW(DsGetSiteName)
92#define DsValidateSubnetName __MINGW_NAME_AW(DsValidateSubnetName)
93
94 DSGETDCAPI DWORD WINAPI DsGetDcNameA(LPCSTR ComputerName,LPCSTR DomainName,GUID *DomainGuid,LPCSTR SiteName,ULONG Flags,PDOMAIN_CONTROLLER_INFOA *DomainControllerInfo);
95 DSGETDCAPI DWORD WINAPI DsGetDcNameW(LPCWSTR ComputerName,LPCWSTR DomainName,GUID *DomainGuid,LPCWSTR SiteName,ULONG Flags,PDOMAIN_CONTROLLER_INFOW *DomainControllerInfo);
96 DSGETDCAPI DWORD WINAPI DsGetSiteNameA(LPCSTR ComputerName,LPSTR *SiteName);
97 DSGETDCAPI DWORD WINAPI DsGetSiteNameW(LPCWSTR ComputerName,LPWSTR *SiteName);
98 DSGETDCAPI DWORD WINAPI DsValidateSubnetNameW(LPCWSTR SubnetName);
99 DSGETDCAPI DWORD WINAPI DsValidateSubnetNameA(LPCSTR SubnetName);
100
101#ifdef _WINSOCK2API_
102
103#define DsAddressToSiteNames __MINGW_NAME_AW(DsAddressToSiteNames)
104#define DsAddressToSiteNamesEx __MINGW_NAME_AW(DsAddressToSiteNamesEx)
105
106 DSGETDCAPI DWORD WINAPI DsAddressToSiteNamesW(LPCWSTR ComputerName,DWORD EntryCount,PSOCKET_ADDRESS SocketAddresses,LPWSTR **SiteNames);
107 DSGETDCAPI DWORD WINAPI DsAddressToSiteNamesA(LPCSTR ComputerName,DWORD EntryCount,PSOCKET_ADDRESS SocketAddresses,LPSTR **SiteNames);
108 DSGETDCAPI DWORD WINAPI DsAddressToSiteNamesExW(LPCWSTR ComputerName,DWORD EntryCount,PSOCKET_ADDRESS SocketAddresses,LPWSTR **SiteNames,LPWSTR **SubnetNames);
109 DSGETDCAPI DWORD WINAPI DsAddressToSiteNamesExA(LPCSTR ComputerName,DWORD EntryCount,PSOCKET_ADDRESS SocketAddresses,LPSTR **SiteNames,LPSTR **SubnetNames);
110#endif
111
112#define DS_DOMAIN_IN_FOREST 0x0001
113#define DS_DOMAIN_DIRECT_OUTBOUND 0x0002
114#define DS_DOMAIN_TREE_ROOT 0x0004
115#define DS_DOMAIN_PRIMARY 0x0008
116#define DS_DOMAIN_NATIVE_MODE 0x0010
117#define DS_DOMAIN_DIRECT_INBOUND 0x0020
118#define DS_DOMAIN_VALID_FLAGS (DS_DOMAIN_IN_FOREST | DS_DOMAIN_DIRECT_OUTBOUND | DS_DOMAIN_TREE_ROOT | DS_DOMAIN_PRIMARY | DS_DOMAIN_NATIVE_MODE | DS_DOMAIN_DIRECT_INBOUND)
119
120 typedef struct _DS_DOMAIN_TRUSTSW {
121 LPWSTR NetbiosDomainName;
122 LPWSTR DnsDomainName;
123 ULONG Flags;
124 ULONG ParentIndex;
125 ULONG TrustType;
126 ULONG TrustAttributes;
127 PSID DomainSid;
128 GUID DomainGuid;
129 } DS_DOMAIN_TRUSTSW,*PDS_DOMAIN_TRUSTSW;
130
131 typedef struct _DS_DOMAIN_TRUSTSA {
132 LPSTR NetbiosDomainName;
133 LPSTR DnsDomainName;
134 ULONG Flags;
135 ULONG ParentIndex;
136 ULONG TrustType;
137 ULONG TrustAttributes;
138 PSID DomainSid;
139 GUID DomainGuid;
140 } DS_DOMAIN_TRUSTSA,*PDS_DOMAIN_TRUSTSA;
141
142#define DS_DOMAIN_TRUSTS __MINGW_NAME_AW(DS_DOMAIN_TRUSTS)
143#define PDS_DOMAIN_TRUSTS __MINGW_NAME_AW(PDS_DOMAIN_TRUSTS)
144
145#define DsEnumerateDomainTrusts __MINGW_NAME_AW(DsEnumerateDomainTrusts)
146#define DsGetDcSiteCoverage __MINGW_NAME_AW(DsGetDcSiteCoverage)
147#define DsDeregisterDnsHostRecords __MINGW_NAME_AW(DsDeregisterDnsHostRecords)
148
149 DSGETDCAPI DWORD WINAPI DsEnumerateDomainTrustsW (LPWSTR ServerName,ULONG Flags,PDS_DOMAIN_TRUSTSW *Domains,PULONG DomainCount);
150 DSGETDCAPI DWORD WINAPI DsEnumerateDomainTrustsA (LPSTR ServerName,ULONG Flags,PDS_DOMAIN_TRUSTSA *Domains,PULONG DomainCount);
151
152#if defined(_NTLSA_) || defined(_NTSECAPI_)
153 DSGETDCAPI DWORD WINAPI DsGetForestTrustInformationW (LPCWSTR ServerName,LPCWSTR TrustedDomainName,DWORD Flags,PLSA_FOREST_TRUST_INFORMATION *ForestTrustInfo);
154 DSGETDCAPI DWORD WINAPI DsMergeForestTrustInformationW(LPCWSTR DomainName,PLSA_FOREST_TRUST_INFORMATION NewForestTrustInfo,PLSA_FOREST_TRUST_INFORMATION OldForestTrustInfo,PLSA_FOREST_TRUST_INFORMATION *MergedForestTrustInfo);
155
156#define DS_GFTI_UPDATE_TDO 0x1
157#define DS_GFTI_VALID_FLAGS 0x1
158#endif
159
160 DSGETDCAPI DWORD WINAPI DsGetDcSiteCoverageW(LPCWSTR ServerName,PULONG EntryCount,LPWSTR **SiteNames);
161 DSGETDCAPI DWORD WINAPI DsGetDcSiteCoverageA(LPCSTR ServerName,PULONG EntryCount,LPSTR **SiteNames);
162 DSGETDCAPI DWORD WINAPI DsDeregisterDnsHostRecordsW (LPWSTR ServerName,LPWSTR DnsDomainName,GUID *DomainGuid,GUID *DsaGuid,LPWSTR DnsHostName);
163 DSGETDCAPI DWORD WINAPI DsDeregisterDnsHostRecordsA (LPSTR ServerName,LPSTR DnsDomainName,GUID *DomainGuid,GUID *DsaGuid,LPSTR DnsHostName);
164
165#ifdef _WINSOCK2API_
166#define DS_ONLY_DO_SITE_NAME 0x01
167#define DS_NOTIFY_AFTER_SITE_RECORDS 0x02
168
169#define DS_OPEN_VALID_OPTION_FLAGS (DS_ONLY_DO_SITE_NAME | DS_NOTIFY_AFTER_SITE_RECORDS)
170
171#define DS_OPEN_VALID_FLAGS (DS_FORCE_REDISCOVERY | DS_ONLY_LDAP_NEEDED | DS_KDC_REQUIRED | DS_PDC_REQUIRED | DS_GC_SERVER_REQUIRED | DS_WRITABLE_REQUIRED)
172
173#define DsGetDcOpen __MINGW_NAME_AW(DsGetDcOpen)
174#define DsGetDcNext __MINGW_NAME_AW(DsGetDcNext)
175#define DsGetDcClose __MINGW_NAME_AW(DsGetDcClose)
176
177 DSGETDCAPI DWORD WINAPI DsGetDcOpenW(LPCWSTR DnsName,ULONG OptionFlags,LPCWSTR SiteName,GUID *DomainGuid,LPCWSTR DnsForestName,ULONG DcFlags,PHANDLE RetGetDcContext);
178 DSGETDCAPI DWORD WINAPI DsGetDcOpenA(LPCSTR DnsName,ULONG OptionFlags,LPCSTR SiteName,GUID *DomainGuid,LPCSTR DnsForestName,ULONG DcFlags,PHANDLE RetGetDcContext);
179 DSGETDCAPI DWORD WINAPI DsGetDcNextW(HANDLE GetDcContextHandle,PULONG SockAddressCount,LPSOCKET_ADDRESS *SockAddresses,LPWSTR *DnsHostName);
180 DSGETDCAPI DWORD WINAPI DsGetDcNextA(HANDLE GetDcContextHandle,PULONG SockAddressCount,LPSOCKET_ADDRESS *SockAddresses,LPSTR *DnsHostName);
181 DSGETDCAPI VOID WINAPI DsGetDcCloseW(HANDLE GetDcContextHandle);
182#endif
183
184#ifdef __cplusplus
185}
186#endif
187#endif
Note: See TracBrowser for help on using the repository browser.