Implement ldap_control_free*, ldap_controls_free* and
[wine] / dlls / wldap32 / winldap_private.h
1 /*
2  * WLDAP32 - LDAP support for Wine
3  *
4  * Copyright 2005 Hans Leidekker
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
19  *
20  * This is an internal version of winldap.h where constants, types and
21  * functions are prefixed with WLDAP32_ whenever they conflict with
22  * native headers.
23  */
24
25 typedef enum {
26     WLDAP32_LDAP_SERVER_DOWN             =   0x51,
27     WLDAP32_LDAP_LOCAL_ERROR             =   0x52,
28     WLDAP32_LDAP_ENCODING_ERROR          =   0x53,
29     WLDAP32_LDAP_DECODING_ERROR          =   0x54,
30     WLDAP32_LDAP_TIMEOUT                 =   0x55,
31     WLDAP32_LDAP_AUTH_UNKNOWN            =   0x56,
32     WLDAP32_LDAP_FILTER_ERROR            =   0x57,
33     WLDAP32_LDAP_USER_CANCELLED          =   0x58,
34     WLDAP32_LDAP_PARAM_ERROR             =   0x59,
35     WLDAP32_LDAP_NO_MEMORY               =   0x5a,
36     WLDAP32_LDAP_CONNECT_ERROR           =   0x5b,
37     WLDAP32_LDAP_NOT_SUPPORTED           =   0x5c,
38     WLDAP32_LDAP_NO_RESULTS_RETURNED     =   0x5e,
39     WLDAP32_LDAP_CONTROL_NOT_FOUND       =   0x5d,
40     WLDAP32_LDAP_MORE_RESULTS_TO_RETURN  =   0x5f,
41
42     WLDAP32_LDAP_CLIENT_LOOP             =   0x60,
43     WLDAP32_LDAP_REFERRAL_LIMIT_EXCEEDED =   0x61
44 } LDAP_RETCODE;
45
46 typedef struct berelement
47 {
48     PCHAR opaque;
49 } WLDAP32_BerElement;
50
51 #define LDAP_OPT_THREAD_FN_PTRS         0x05
52 #define LDAP_OPT_REBIND_FN              0x06
53 #define LDAP_OPT_REBIND_ARG             0x07
54 #define LDAP_OPT_SSL                    0x0a
55 #define LDAP_OPT_IO_FN_PTRS             0x0b
56 #define LDAP_OPT_CACHE_FN_PTRS          0x0d
57 #define LDAP_OPT_CACHE_STRATEGY         0x0e
58 #define LDAP_OPT_CACHE_ENABLE           0x0f
59 #define LDAP_OPT_REFERRAL_HOP_LIMIT     0x10
60 #define LDAP_OPT_VERSION                0x11
61 #define LDAP_OPT_SERVER_ERROR           0x33
62 #define LDAP_OPT_SERVER_EXT_ERROR       0x34
63 #define LDAP_OPT_PING_KEEP_ALIVE        0x36
64 #define LDAP_OPT_PING_WAIT_TIME         0x37
65 #define LDAP_OPT_PING_LIMIT             0x38
66 #define LDAP_OPT_DNSDOMAIN_NAME         0x3b
67 #define LDAP_OPT_GETDSNAME_FLAGS        0x3d
68 #define LDAP_OPT_HOST_REACHABLE         0x3e
69 #define LDAP_OPT_PROMPT_CREDENTIALS     0x3f
70 #define LDAP_OPT_TCP_KEEPALIVE          0x40
71 #define LDAP_OPT_FAST_CONCURRENT_BIND   0x41
72 #define LDAP_OPT_SEND_TIMEOUT           0x42
73 #define LDAP_OPT_REFERRAL_CALLBACK      0x70
74 #define LDAP_OPT_CLIENT_CERTIFICATE     0x80
75 #define LDAP_OPT_SERVER_CERTIFICATE     0x81
76 #define LDAP_OPT_AUTO_RECONNECT         0x91
77 #define LDAP_OPT_SSPI_FLAGS             0x92
78 #define LDAP_OPT_SSL_INFO               0x93
79 #define LDAP_OPT_REF_DEREF_CONN_PER_MSG 0x94
80 #define LDAP_OPT_TLS                    LDAP_OPT_SSL
81 #define LDAP_OPT_TLS_INFO               LDAP_OPT_SSL_INFO
82 #define LDAP_OPT_SIGN                   0x95
83 #define LDAP_OPT_ENCRYPT                0x96
84 #define LDAP_OPT_SASL_METHOD            0x97
85 #define LDAP_OPT_AREC_EXCLUSIVE         0x98
86 #define LDAP_OPT_SECURITY_CONTEXT       0x99
87 #define LDAP_OPT_ROOTDSE_CACHE          0x9a
88
89 typedef struct ldap
90 {
91     struct
92     {
93         UINT_PTR sb_sd;
94         UCHAR Reserved1[41];
95         ULONG_PTR sb_naddr;
96         UCHAR Reserved2[24];
97     } ld_sb;
98
99     PCHAR ld_host;
100     ULONG ld_version;
101     UCHAR ld_lberoptions;
102     ULONG ld_deref;
103     ULONG ld_timelimit;
104     ULONG ld_sizelimit;
105     ULONG ld_errno;
106     PCHAR ld_matched;
107     PCHAR ld_error;
108     ULONG ld_msgid;
109     UCHAR Reserved3[25];
110     ULONG ld_cldaptries;
111     ULONG ld_cldaptimeout;
112     ULONG ld_refhoplimit;
113     ULONG ld_options;
114 } WLDAP32_LDAP, *WLDAP32_PLDAP;
115
116 typedef struct ldapmodA {
117     ULONG mod_op;
118     PCHAR mod_type;
119     union {
120         PCHAR *modv_strvals;
121         struct berval **modv_bvals;
122     } mod_vals;
123 } LDAPModA, *PLDAPModA;
124
125 typedef struct ldapmodW {
126     ULONG mod_op;
127     PWCHAR mod_type;
128     union {
129         PWCHAR *modv_strvals;
130         struct berval **modv_bvals;
131     } mod_vals;
132 } LDAPModW, *PLDAPModW;
133
134 typedef struct l_timeval
135 {
136     LONG tv_sec;
137     LONG tv_usec;
138 } LDAP_TIMEVAL, *PLDAP_TIMEVAL;
139
140 typedef struct ldapmsg
141 {
142     ULONG lm_msgid;
143     ULONG lm_msgtype;
144
145     PVOID lm_ber;
146
147     struct ldapmsg *lm_chain;
148     struct ldapmsg *lm_next;
149     ULONG lm_time;
150
151     WLDAP32_PLDAP Connection;
152     PVOID Request;
153     ULONG lm_returncode;
154     USHORT lm_referral;
155     BOOLEAN lm_chased;
156     BOOLEAN lm_eom;
157     BOOLEAN ConnectionReferenced;
158 } WLDAP32_LDAPMessage, *WLDAP32_PLDAPMessage;
159
160 #define LAPI_MAJOR_VER1     1
161 #define LAPI_MINOR_VER1     1
162
163 typedef struct ldap_version_info
164 {
165     ULONG lv_size;
166     ULONG lv_major;
167     ULONG lv_minor;
168 } LDAP_VERSION_INFO, *PLDAP_VERSION_INFO;
169
170 typedef struct WLDAP32_berval
171 {
172     ULONG bv_len;
173     PCHAR bv_val;
174 } LDAP_BERVAL, *PLDAP_BERVAL, BERVAL, *PBERVAL, WLDAP32_BerValue;
175
176 typedef struct ldapcontrolA
177 {
178     PCHAR ldctl_oid;
179     struct WLDAP32_berval ldctl_value;
180     BOOLEAN ldctl_iscritical;
181 } LDAPControlA, *PLDAPControlA;
182
183 typedef struct ldapcontrolW
184 {
185     PWCHAR ldctl_oid;
186     struct WLDAP32_berval ldctl_value;
187     BOOLEAN ldctl_iscritical;
188 } LDAPControlW, *PLDAPControlW;
189
190 typedef struct ldapsearch LDAPSearch, *PLDAPSearch;
191
192 typedef struct ldapsortkeyA
193 {
194     PCHAR sk_attrtype;
195     PCHAR sk_matchruleoid;
196     BOOLEAN sk_reverseorder;
197 } LDAPSortKeyA, *PLDAPSortKeyA;
198
199 typedef struct ldapsortkeyW
200 {
201     PWCHAR sk_attrtype;
202     PWCHAR sk_matchruleoid;
203     BOOLEAN sk_reverseorder;
204 } LDAPSortKeyW, *PLDAPSortKeyW;
205
206 typedef struct ldapapiinfoA
207 {
208     int ldapai_info_version;
209     int ldapai_api_version;
210     int ldapai_protocol_version;
211     char **ldapai_extensions;
212     char *ldapai_vendor_name;
213     int ldapai_vendor_version;
214 } LDAPAPIInfoA;
215
216 typedef struct ldapapiinfoW
217 {
218     int ldapai_info_version;
219     int ldapai_api_version;
220     int ldapai_protocol_version;
221     PWCHAR *ldapai_extensions;
222     PWCHAR ldapai_vendor_name;
223     int ldapai_vendor_version;
224 } LDAPAPIInfoW;
225
226 typedef struct ldap_apifeature_infoA
227 {
228     int ldapaif_info_version;
229     char *ldapaif_name;
230     int ldapaif_version;
231 } LDAPAPIFeatureInfoA;
232
233 typedef struct ldap_apifeature_infoW
234 {
235     int ldapaif_info_version;
236     PWCHAR ldapaif_name;
237     int ldapaif_version;
238 } LDAPAPIFeatureInfoW;
239
240 WLDAP32_LDAP *cldap_openA(PCHAR,ULONG);
241 WLDAP32_LDAP *cldap_openW(PWCHAR,ULONG);
242 ULONG WLDAP32_ldap_abandon(WLDAP32_LDAP*,ULONG);
243 ULONG ldap_addA(WLDAP32_LDAP*,PCHAR,LDAPModA*[]);
244 ULONG ldap_addW(WLDAP32_LDAP*,PWCHAR,LDAPModW*[]);
245 ULONG ldap_add_extA(WLDAP32_LDAP*,PCHAR,LDAPModA*[],PLDAPControlA*,PLDAPControlA*,ULONG*);
246 ULONG ldap_add_extW(WLDAP32_LDAP*,PWCHAR,LDAPModW*[],PLDAPControlW*,PLDAPControlW*,ULONG*);
247 ULONG ldap_add_ext_sA(WLDAP32_LDAP*,PCHAR,LDAPModA*[],PLDAPControlA*,PLDAPControlA*);
248 ULONG ldap_add_ext_sW(WLDAP32_LDAP*,PWCHAR,LDAPModW*[],PLDAPControlW*,PLDAPControlW*);
249 ULONG ldap_add_sA(WLDAP32_LDAP*,PCHAR,LDAPModA*[]);
250 ULONG ldap_add_sW(WLDAP32_LDAP*,PWCHAR,LDAPModW*[]);
251 ULONG ldap_bindA(WLDAP32_LDAP*,PCHAR,PCHAR,ULONG);
252 ULONG ldap_bindW(WLDAP32_LDAP*,PWCHAR,PWCHAR,ULONG);
253 ULONG ldap_bind_sA(WLDAP32_LDAP*,PCHAR,PCHAR,ULONG);
254 ULONG ldap_bind_sW(WLDAP32_LDAP*,PWCHAR,PWCHAR,ULONG);
255 ULONG ldap_check_filterA(WLDAP32_LDAP*,PCHAR);
256 ULONG ldap_check_filterW(WLDAP32_LDAP*,PWCHAR);
257 ULONG ldap_cleanup(HANDLE);
258 ULONG ldap_close_extended_op(WLDAP32_LDAP*,ULONG);
259 ULONG ldap_compareA(WLDAP32_LDAP*,PCHAR,PCHAR,PCHAR);
260 ULONG ldap_compareW(WLDAP32_LDAP*,PWCHAR,PWCHAR,PWCHAR);
261 ULONG ldap_compare_extA(WLDAP32_LDAP*,PCHAR,PCHAR,PCHAR,struct WLDAP32_berval*,PLDAPControlA*,PLDAPControlA*,ULONG*);
262 ULONG ldap_compare_extW(WLDAP32_LDAP*,PWCHAR,PWCHAR,PWCHAR,struct WLDAP32_berval*,PLDAPControlW*,PLDAPControlW*,ULONG*);
263 ULONG ldap_compare_ext_sA(WLDAP32_LDAP*,PCHAR,PCHAR,PCHAR,struct WLDAP32_berval*,PLDAPControlA*,PLDAPControlA*);
264 ULONG ldap_compare_ext_sW(WLDAP32_LDAP*,PWCHAR,PWCHAR,PWCHAR,struct WLDAP32_berval*,PLDAPControlW*,PLDAPControlW*);
265 ULONG ldap_compare_sA(WLDAP32_LDAP*,PCHAR,PCHAR,PCHAR);
266 ULONG ldap_compare_sW(WLDAP32_LDAP*,PWCHAR,PWCHAR,PWCHAR);
267 ULONG ldap_connect(WLDAP32_LDAP*,LDAP_TIMEVAL*);
268 WLDAP32_LDAP *ldap_conn_from_msg(WLDAP32_LDAP*,WLDAP32_LDAPMessage*);
269 ULONG ldap_control_freeA(LDAPControlA*);
270 ULONG ldap_control_freeW(LDAPControlW*);
271 ULONG ldap_controls_freeA(LDAPControlA**);
272 ULONG ldap_controls_freeW(LDAPControlW**);
273 ULONG WLDAP32_ldap_count_entries(WLDAP32_LDAP*,WLDAP32_LDAPMessage*);
274 ULONG WLDAP32_ldap_count_references(WLDAP32_LDAP*,WLDAP32_LDAPMessage*);
275 ULONG ldap_count_valuesA(PCHAR*);
276 ULONG ldap_count_valuesW(PWCHAR*);
277 ULONG WLDAP32_ldap_count_values_len(PBERVAL*);
278 ULONG ldap_deleteA(WLDAP32_LDAP*,PCHAR);
279 ULONG ldap_deleteW(WLDAP32_LDAP*,PWCHAR);
280 ULONG ldap_delete_extA(WLDAP32_LDAP*,PCHAR,PLDAPControlA*,PLDAPControlA*,ULONG*);
281 ULONG ldap_delete_extW(WLDAP32_LDAP*,PWCHAR,PLDAPControlW*,PLDAPControlW*,ULONG*);
282 ULONG ldap_delete_ext_sA(WLDAP32_LDAP*,PCHAR,PLDAPControlA*,PLDAPControlA*);
283 ULONG ldap_delete_ext_sW(WLDAP32_LDAP*,PWCHAR,PLDAPControlW*,PLDAPControlW*);
284 ULONG ldap_delete_sA(WLDAP32_LDAP*,PCHAR);
285 ULONG ldap_delete_sW(WLDAP32_LDAP*,PWCHAR);
286 PCHAR ldap_dn2ufnA(PCHAR);
287 PWCHAR ldap_dn2ufnW(PWCHAR);
288 PCHAR ldap_err2stringA(ULONG);
289 PWCHAR ldap_err2stringW(ULONG);
290 ULONG ldap_escape_filter_elementA(PCHAR,ULONG,PCHAR,ULONG);
291 ULONG ldap_escape_filter_elementW(PCHAR,ULONG,PWCHAR,ULONG);
292 PCHAR *ldap_explode_dnA(PCHAR,ULONG);
293 PWCHAR *ldap_explode_dnW(PWCHAR,ULONG);
294 ULONG ldap_extended_operationA(WLDAP32_LDAP*,PCHAR,struct WLDAP32_berval*,PLDAPControlA*,PLDAPControlA*,ULONG*);
295 ULONG ldap_extended_operationW(WLDAP32_LDAP*,PWCHAR,struct WLDAP32_berval*,PLDAPControlW*,PLDAPControlW*,ULONG*);
296 ULONG ldap_extended_operation_sA(WLDAP32_LDAP*,PCHAR,struct WLDAP32_berval*,PLDAPControlA*, PLDAPControlA*,
297     PCHAR*,struct WLDAP32_berval**);
298 ULONG ldap_extended_operation_sW(WLDAP32_LDAP*,PWCHAR,struct WLDAP32_berval*,PLDAPControlW*, PLDAPControlW*,
299     PWCHAR*,struct WLDAP32_berval**);
300 PCHAR ldap_first_attributeA(WLDAP32_LDAP*,WLDAP32_LDAPMessage*,WLDAP32_BerElement**);
301 PWCHAR ldap_first_attributeW(WLDAP32_LDAP*,WLDAP32_LDAPMessage*,WLDAP32_BerElement**);
302 WLDAP32_LDAPMessage *WLDAP32_ldap_first_entry(WLDAP32_LDAP*,WLDAP32_LDAPMessage*);
303 WLDAP32_LDAPMessage *WLDAP32_ldap_first_reference(WLDAP32_LDAP*,WLDAP32_LDAPMessage*);
304 ULONG ldap_free_controlsA(LDAPControlA**);
305 ULONG ldap_free_controlsW(LDAPControlW**);
306 PCHAR ldap_get_dnA(WLDAP32_LDAP*,WLDAP32_LDAPMessage*);
307 PWCHAR ldap_get_dnW(WLDAP32_LDAP*,WLDAP32_LDAPMessage*);
308 ULONG ldap_get_optionA(WLDAP32_LDAP*,int,void*);
309 ULONG ldap_get_optionW(WLDAP32_LDAP*,int,void*);
310 PCHAR *ldap_get_valuesA(WLDAP32_LDAP*,WLDAP32_LDAPMessage*,PCHAR);
311 PWCHAR *ldap_get_valuesW(WLDAP32_LDAP*,WLDAP32_LDAPMessage*,PWCHAR);
312 PBERVAL *ldap_get_values_lenA(WLDAP32_LDAP*,WLDAP32_LDAPMessage*,PCHAR);
313 PBERVAL *ldap_get_values_lenW(WLDAP32_LDAP*,WLDAP32_LDAPMessage*,PWCHAR);
314 WLDAP32_LDAP *ldap_initA(const PCHAR,ULONG);
315 WLDAP32_LDAP *ldap_initW(const PWCHAR,ULONG);
316 void ldap_memfreeA(PCHAR);
317 void ldap_memfreeW(PWCHAR);
318 ULONG ldap_modifyA(WLDAP32_LDAP*,PCHAR,LDAPModA*[]);
319 ULONG ldap_modifyW(WLDAP32_LDAP*,PWCHAR,LDAPModW*[]);
320 ULONG ldap_modify_extA(WLDAP32_LDAP*,PCHAR,LDAPModA*[],PLDAPControlA*,PLDAPControlA*,ULONG*);
321 ULONG ldap_modify_extW(WLDAP32_LDAP*,PWCHAR,LDAPModW*[],PLDAPControlW*,PLDAPControlW*,ULONG*);
322 ULONG ldap_modify_ext_sA(WLDAP32_LDAP*,PCHAR,LDAPModA*[],PLDAPControlA*,PLDAPControlA*);
323 ULONG ldap_modify_ext_sW(WLDAP32_LDAP*,PWCHAR,LDAPModW*[],PLDAPControlW*,PLDAPControlW*);
324 ULONG ldap_modify_sA(WLDAP32_LDAP*,PCHAR,LDAPModA*[]);
325 ULONG ldap_modify_sW(WLDAP32_LDAP*,PWCHAR,LDAPModW*[]);
326 ULONG ldap_modrdnA(WLDAP32_LDAP*,PCHAR,PCHAR);
327 ULONG ldap_modrdnW(WLDAP32_LDAP*,PWCHAR,PWCHAR);
328 ULONG ldap_modrdn2A(WLDAP32_LDAP*,PCHAR,PCHAR,INT);
329 ULONG ldap_modrdn2W(WLDAP32_LDAP*,PWCHAR,PWCHAR,INT);
330 ULONG ldap_modrdn2_sA(WLDAP32_LDAP*,PCHAR,PCHAR,INT);
331 ULONG ldap_modrdn2_sW(WLDAP32_LDAP*,PWCHAR,PWCHAR,INT);
332 ULONG ldap_modrdn_sA(WLDAP32_LDAP*,PCHAR,PCHAR);
333 ULONG ldap_modrdn_sW(WLDAP32_LDAP*,PWCHAR,PWCHAR);
334 ULONG WLDAP32_ldap_msgfree(WLDAP32_LDAPMessage*);
335 PCHAR ldap_next_attributeA(WLDAP32_LDAP*,WLDAP32_LDAPMessage*,WLDAP32_BerElement*);
336 PWCHAR ldap_next_attributeW(WLDAP32_LDAP*,WLDAP32_LDAPMessage*,WLDAP32_BerElement*);
337 WLDAP32_LDAPMessage *WLDAP32_ldap_next_entry(WLDAP32_LDAP*,WLDAP32_LDAPMessage*);
338 WLDAP32_LDAPMessage *WLDAP32_ldap_next_reference(WLDAP32_LDAP*,WLDAP32_LDAPMessage*);
339 WLDAP32_LDAP *ldap_openA(PCHAR,ULONG);
340 WLDAP32_LDAP *ldap_openW(PWCHAR,ULONG);
341 void WLDAP32_ldap_perror(WLDAP32_LDAP*,const PCHAR);
342 ULONG ldap_rename_extA(WLDAP32_LDAP*,PCHAR,PCHAR,PCHAR,INT,PLDAPControlA*,PLDAPControlA*,ULONG*);
343 ULONG ldap_rename_extW(WLDAP32_LDAP*,PWCHAR,PWCHAR,PWCHAR,INT,PLDAPControlW*,PLDAPControlW*,ULONG*);
344 ULONG ldap_rename_ext_sA(WLDAP32_LDAP*,PCHAR,PCHAR,PCHAR,INT,PLDAPControlA*,PLDAPControlA*);
345 ULONG ldap_rename_ext_sW(WLDAP32_LDAP*,PWCHAR,PWCHAR,PWCHAR,INT,PLDAPControlW*,PLDAPControlW*);
346 ULONG WLDAP32_ldap_result(WLDAP32_LDAP*,ULONG,ULONG,struct l_timeval*,WLDAP32_LDAPMessage**);
347 ULONG WLDAP32_ldap_result2error(WLDAP32_LDAP*,WLDAP32_LDAPMessage*,ULONG);
348 ULONG ldap_sasl_bindA(WLDAP32_LDAP*,const PCHAR,const PCHAR,const BERVAL*,PLDAPControlA*,PLDAPControlA*,int*);
349 ULONG ldap_sasl_bindW(WLDAP32_LDAP*,const PWCHAR,const PWCHAR,const BERVAL*,PLDAPControlW*,PLDAPControlW*,int*);
350 ULONG ldap_sasl_bind_sA(WLDAP32_LDAP*,const PCHAR,const PCHAR,const BERVAL*,PLDAPControlA*,PLDAPControlA*,PBERVAL*);
351 ULONG ldap_sasl_bind_sW(WLDAP32_LDAP*,const PWCHAR,const PWCHAR,const BERVAL*,PLDAPControlW*,PLDAPControlW*,PBERVAL*);
352 ULONG ldap_searchA(WLDAP32_LDAP*,PCHAR,ULONG,PCHAR,PCHAR[],ULONG);
353 ULONG ldap_searchW(WLDAP32_LDAP*,PWCHAR,ULONG,PWCHAR,PWCHAR[],ULONG);
354 ULONG ldap_search_extA(WLDAP32_LDAP*,PCHAR,ULONG,PCHAR,PCHAR[],ULONG,PLDAPControlA*,
355     PLDAPControlA*,ULONG,ULONG,ULONG*);
356 ULONG ldap_search_extW(WLDAP32_LDAP*,PWCHAR,ULONG,PWCHAR,PWCHAR[],ULONG,PLDAPControlW*,
357     PLDAPControlW*,ULONG,ULONG,ULONG*);
358 ULONG ldap_search_ext_sA(WLDAP32_LDAP*,PCHAR,ULONG,PCHAR,PCHAR[],ULONG,PLDAPControlA*,
359     PLDAPControlA*,struct l_timeval*,ULONG,WLDAP32_LDAPMessage**);
360 ULONG ldap_search_ext_sW(WLDAP32_LDAP*,PWCHAR,ULONG,PWCHAR,PWCHAR[],ULONG,PLDAPControlW*,
361     PLDAPControlW*,struct l_timeval*,ULONG,WLDAP32_LDAPMessage**);
362 ULONG ldap_search_sA(WLDAP32_LDAP*,PCHAR,ULONG,PCHAR,PCHAR[],ULONG,WLDAP32_LDAPMessage**);
363 ULONG ldap_search_sW(WLDAP32_LDAP*,PWCHAR,ULONG,PWCHAR,PWCHAR[],ULONG,WLDAP32_LDAPMessage**);
364 ULONG ldap_search_stA(WLDAP32_LDAP*,const PCHAR,ULONG,const PCHAR,PCHAR[],ULONG,
365     struct l_timeval*,WLDAP32_LDAPMessage**);
366 ULONG ldap_search_stW(WLDAP32_LDAP*,const PWCHAR,ULONG,const PWCHAR,PWCHAR[],ULONG,
367     struct l_timeval*,WLDAP32_LDAPMessage**);
368 ULONG ldap_set_optionA(WLDAP32_LDAP*,int,void*);
369 ULONG ldap_set_optionW(WLDAP32_LDAP*,int,void*);
370 ULONG ldap_simple_bindA(WLDAP32_LDAP*,PCHAR,PCHAR);
371 ULONG ldap_simple_bindW(WLDAP32_LDAP*,PWCHAR,PWCHAR);
372 ULONG ldap_simple_bind_sA(WLDAP32_LDAP*,PCHAR,PCHAR);
373 ULONG ldap_simple_bind_sW(WLDAP32_LDAP*,PWCHAR,PWCHAR);
374 ULONG ldap_start_tls_sA(WLDAP32_PLDAP,PULONG,WLDAP32_LDAPMessage**,PLDAPControlA*,PLDAPControlA*);
375 ULONG ldap_start_tls_sW(WLDAP32_PLDAP,PULONG,WLDAP32_LDAPMessage**,PLDAPControlW*,PLDAPControlW*);
376 ULONG ldap_ufn2dnA(PCHAR,PCHAR*);
377 ULONG ldap_ufn2dnW(PWCHAR,PWCHAR*);
378 ULONG WLDAP32_ldap_unbind(WLDAP32_LDAP*);
379 ULONG WLDAP32_ldap_unbind_s(WLDAP32_LDAP*);
380 ULONG ldap_value_freeA(PCHAR*);
381 ULONG ldap_value_freeW(PWCHAR*);
382 ULONG WLDAP32_ldap_value_free_len(struct WLDAP32_berval**);
383
384 ULONG LdapGetLastError(void);
385 ULONG LdapMapErrorToWin32(ULONG);
386 int LdapUnicodeToUTF8(LPCWSTR,int,LPSTR,int);
387 int LdapUTF8ToUnicode(LPCSTR,int,LPWSTR,int);