2 * Copyright (C) 2006 Robert Reif
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 #ifndef __WINE_DSGETDC_H
20 #define __WINE_DSGETDC_H
26 #define DS_INET_ADDRESS 1
27 #define DS_NETBIOS_ADDRESS 2
29 #define DS_DNS_CONTROLLER_FLAG 0x20000000
30 #define DS_DNS_DOMAIN_FLAG 0x40000000
31 #define DS_DNS_FOREST_FLAG 0x80000000
33 #define DS_FORCE_REDISCOVERY 0x00000001
34 #define DS_DIRECTORY_SERVICE_REQUIRED 0x00000010
35 #define DS_DIRECTORY_SERVICE_PREFERRED 0x00000020
36 #define DS_GC_SERVER_REQUIRED 0x00000040
37 #define DS_PDC_REQUIRED 0x00000080
38 #define DS_BACKGROUND_ONLY 0x00000100
39 #define DS_IP_REQUIRED 0x00000200
40 #define DS_KDC_REQUIRED 0x00000400
41 #define DS_TIMESERV_REQUIRED 0x00000800
42 #define DS_WRITABLE_REQUIRED 0x00001000
43 #define DS_GOOD_TIMESERV_PREFERRED 0x00002000
44 #define DS_AVOID_SELF 0x00004000
45 #define DS_ONLY_LDAP_NEEDED 0x00008000
47 #define DS_IS_FLAT_NAME 0x00010000
48 #define DS_IS_DNS_NAME 0x00020000
50 #define DS_RETURN_DNS_NAME 0x40000000
51 #define DS_RETURN_FLAT_NAME 0x80000000
53 #define DSGETDC_VALID_FLAGS ( \
54 DS_FORCE_REDISCOVERY | \
55 DS_DIRECTORY_SERVICE_REQUIRED | \
56 DS_DIRECTORY_SERVICE_PREFERRED | \
57 DS_GC_SERVER_REQUIRED | \
59 DS_BACKGROUND_ONLY | \
62 DS_TIMESERV_REQUIRED | \
63 DS_WRITABLE_REQUIRED | \
64 DS_GOOD_TIMESERV_PREFERRED | \
66 DS_ONLY_LDAP_NEEDED | \
69 DS_RETURN_FLAT_NAME | \
72 typedef struct _DOMAIN_CONTROLLER_INFOA
{
73 LPSTR DomainControllerName
;
74 LPSTR DomainControllerAddress
;
75 ULONG DomainControllerAddressType
;
82 } DOMAIN_CONTROLLER_INFOA
, *PDOMAIN_CONTROLLER_INFOA
;
84 typedef struct _DOMAIN_CONTROLLER_INFOW
{
85 LPWSTR DomainControllerName
;
86 LPWSTR DomainControllerAddress
;
87 ULONG DomainControllerAddressType
;
93 LPWSTR ClientSiteName
;
94 } DOMAIN_CONTROLLER_INFOW
, *PDOMAIN_CONTROLLER_INFOW
;
96 typedef struct _DS_DOMAIN_TRUSTSA
{
97 LPSTR NetbiosDomainName
;
102 ULONG TrustAttributes
;
105 } DS_DOMAIN_TRUSTSA
, *PDS_DOMAIN_TRUSTSA
;
107 typedef struct _DS_DOMAIN_TRUSTSW
{
108 LPWSTR NetbiosDomainName
;
109 LPWSTR DnsDomainName
;
113 ULONG TrustAttributes
;
116 } DS_DOMAIN_TRUSTSW
, *PDS_DOMAIN_TRUSTSW
;
118 DECL_WINELIB_TYPE_AW(DOMAIN_CONTROLLER_INFO
)
120 DWORD WINAPI
DsGetDcNameA(LPCSTR
,LPCSTR
,GUID
*,LPCSTR
,ULONG
,PDOMAIN_CONTROLLER_INFOA
*);
121 DWORD WINAPI
DsGetDcNameW(LPCWSTR
,LPCWSTR
,GUID
*,LPCWSTR
,ULONG
,PDOMAIN_CONTROLLER_INFOW
*);
122 #define DsGetDcName WINELIB_NAME_AW(DsGetDcName)
124 DWORD WINAPI
DsGetSiteNameA(LPCSTR ComputerName
, LPSTR
*SiteName
);
125 DWORD WINAPI
DsGetSiteNameW(LPCWSTR ComputerName
, LPWSTR
*SiteName
);
126 #define DsGetSiteName WINELIB_NAME_AW(DsGetSiteName)
128 DWORD WINAPI
DsEnumerateDomainTrustsA(LPSTR
, ULONG
, PDS_DOMAIN_TRUSTSA
*, PULONG
);
129 DWORD WINAPI
DsEnumerateDomainTrustsW(LPWSTR
, ULONG
, PDS_DOMAIN_TRUSTSW
*, PULONG
);
130 #define DsEnumerateDomainTrusts WINELIB_NAME_AW(DsEnumerateDomainTrusts)
136 #endif /* __WINE_DSGETDC_H */