widl: Try to import typedefs instead of redefining them.
[wine.git] / include / dsgetdc.h
blobc53fcc299a7a3ed34047c4c133b50435d354494a
1 /*
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
22 #ifdef __cplusplus
23 extern "C" {
24 #endif
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 | \
51 DS_PDC_REQUIRED | \
52 DS_BACKGROUND_ONLY | \
53 DS_IP_REQUIRED | \
54 DS_KDC_REQUIRED | \
55 DS_TIMESERV_REQUIRED | \
56 DS_WRITABLE_REQUIRED | \
57 DS_GOOD_TIMESERV_PREFERRED | \
58 DS_AVOID_SELF | \
59 DS_ONLY_LDAP_NEEDED | \
60 DS_IS_FLAT_NAME | \
61 DS_IS_DNS_NAME | \
62 DS_RETURN_FLAT_NAME | \
63 DS_RETURN_DNS_NAME )
65 typedef struct _DOMAIN_CONTROLLER_INFOA {
66 LPSTR DomainControllerName;
67 LPSTR DomainControllerAddress;
68 ULONG DomainControllerAddressType;
69 GUID DomainGuid;
70 LPSTR DomainName;
71 LPSTR DnsForestName;
72 ULONG Flags;
73 LPSTR DcSiteName;
74 LPSTR ClientSiteName;
75 } DOMAIN_CONTROLLER_INFOA, *PDOMAIN_CONTROLLER_INFOA;
77 typedef struct _DOMAIN_CONTROLLER_INFOW {
78 LPWSTR DomainControllerName;
79 LPWSTR DomainControllerAddress;
80 ULONG DomainControllerAddressType;
81 GUID DomainGuid;
82 LPWSTR DomainName;
83 LPWSTR DnsForestName;
84 ULONG Flags;
85 LPWSTR DcSiteName;
86 LPWSTR ClientSiteName;
87 } DOMAIN_CONTROLLER_INFOW, *PDOMAIN_CONTROLLER_INFOW;
89 typedef struct _DS_DOMAIN_TRUSTSA {
90 LPSTR NetbiosDomainName;
91 LPSTR DnsDomainName;
92 ULONG Flags;
93 ULONG ParentIndex;
94 ULONG TrustType;
95 ULONG TrustAttributes;
96 PSID DomainSid;
97 GUID DomainGuid;
98 } DS_DOMAIN_TRUSTSA, *PDS_DOMAIN_TRUSTSA;
100 typedef struct _DS_DOMAIN_TRUSTSW {
101 LPWSTR NetbiosDomainName;
102 LPWSTR DnsDomainName;
103 ULONG Flags;
104 ULONG ParentIndex;
105 ULONG TrustType;
106 ULONG TrustAttributes;
107 PSID DomainSid;
108 GUID DomainGuid;
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)
125 #ifdef __cplusplus
127 #endif
129 #endif /* __WINE_DSGETDC_H */