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_FORCE_REDISCOVERY 0x00000001
27 #define DS_DIRECTORY_SERVICE_REQUIRED 0x00000010
28 #define DS_DIRECTORY_SERVICE_PREFERRED 0x00000020
29 #define DS_GC_SERVER_REQUIRED 0x00000040
30 #define DS_PDC_REQUIRED 0x00000080
31 #define DS_BACKGROUND_ONLY 0x00000100
32 #define DS_IP_REQUIRED 0x00000200
33 #define DS_KDC_REQUIRED 0x00000400
34 #define DS_TIMESERV_REQUIRED 0x00000800
35 #define DS_WRITABLE_REQUIRED 0x00001000
36 #define DS_GOOD_TIMESERV_PREFERRED 0x00002000
37 #define DS_AVOID_SELF 0x00004000
38 #define DS_ONLY_LDAP_NEEDED 0x00008000
40 #define DS_IS_FLAT_NAME 0x00010000
41 #define DS_IS_DNS_NAME 0x00020000
43 #define DS_RETURN_DNS_NAME 0x40000000
44 #define DS_RETURN_FLAT_NAME 0x80000000
46 #define DSGETDC_VALID_FLAGS ( \
47 DS_FORCE_REDISCOVERY | \
48 DS_DIRECTORY_SERVICE_REQUIRED | \
49 DS_DIRECTORY_SERVICE_PREFERRED | \
50 DS_GC_SERVER_REQUIRED | \
52 DS_BACKGROUND_ONLY | \
55 DS_TIMESERV_REQUIRED | \
56 DS_WRITABLE_REQUIRED | \
57 DS_GOOD_TIMESERV_PREFERRED | \
59 DS_ONLY_LDAP_NEEDED | \
62 DS_RETURN_FLAT_NAME | \
65 typedef struct _DOMAIN_CONTROLLER_INFOA
{
66 LPSTR DomainControllerName
;
67 LPSTR DomainControllerAddress
;
68 ULONG DomainControllerAddressType
;
75 } DOMAIN_CONTROLLER_INFOA
, *PDOMAIN_CONTROLLER_INFOA
;
77 typedef struct _DOMAIN_CONTROLLER_INFOW
{
78 LPWSTR DomainControllerName
;
79 LPWSTR DomainControllerAddress
;
80 ULONG DomainControllerAddressType
;
86 LPWSTR ClientSiteName
;
87 } DOMAIN_CONTROLLER_INFOW
, *PDOMAIN_CONTROLLER_INFOW
;
89 typedef struct _DS_DOMAIN_TRUSTSA
{
90 LPSTR NetbiosDomainName
;
95 ULONG TrustAttributes
;
98 } DS_DOMAIN_TRUSTSA
, *PDS_DOMAIN_TRUSTSA
;
100 typedef struct _DS_DOMAIN_TRUSTSW
{
101 LPWSTR NetbiosDomainName
;
102 LPWSTR DnsDomainName
;
106 ULONG TrustAttributes
;
109 } DS_DOMAIN_TRUSTSW
, *PDS_DOMAIN_TRUSTSW
;
111 DECL_WINELIB_TYPE_AW(DOMAIN_CONTROLLER_INFO
)
113 DWORD WINAPI
DsGetDcNameA(LPCSTR
,LPCSTR
,GUID
*,LPCSTR
,ULONG
,PDOMAIN_CONTROLLER_INFOA
*);
114 DWORD WINAPI
DsGetDcNameW(LPCWSTR
,LPCWSTR
,GUID
*,LPCWSTR
,ULONG
,PDOMAIN_CONTROLLER_INFOW
*);
115 #define DsGetDcName WINELIB_NAME_AW(DsGetDcName)
117 DWORD WINAPI
DsGetSiteNameA(LPCSTR ComputerName
, LPSTR
*SiteName
);
118 DWORD WINAPI
DsGetSiteNameW(LPCWSTR ComputerName
, LPWSTR
*SiteName
);
119 #define DsGetSiteName WINELIB_NAME_AW(DsGetSiteName)
121 DWORD WINAPI
DsEnumerateDomainTrustsA(LPSTR
, ULONG
, PDS_DOMAIN_TRUSTSA
*, PULONG
);
122 DWORD WINAPI
DsEnumerateDomainTrustsW(LPWSTR
, ULONG
, PDS_DOMAIN_TRUSTSW
*, PULONG
);
123 #define DsEnumerateDomainTrusts WINELIB_NAME_AW(DsEnumerateDomainTrusts)
129 #endif /* __WINE_DSGETDC_H */