1c2c66affSColin Finck /* 2c2c66affSColin Finck * WLDAP32 - LDAP support for Wine 3c2c66affSColin Finck * 4c2c66affSColin Finck * Copyright 2005 Hans Leidekker 5c2c66affSColin Finck * 6c2c66affSColin Finck * This library is free software; you can redistribute it and/or 7c2c66affSColin Finck * modify it under the terms of the GNU Lesser General Public 8c2c66affSColin Finck * License as published by the Free Software Foundation; either 9c2c66affSColin Finck * version 2.1 of the License, or (at your option) any later version. 10c2c66affSColin Finck * 11c2c66affSColin Finck * This library is distributed in the hope that it will be useful, 12c2c66affSColin Finck * but WITHOUT ANY WARRANTY; without even the implied warranty of 13c2c66affSColin Finck * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14c2c66affSColin Finck * Lesser General Public License for more details. 15c2c66affSColin Finck * 16c2c66affSColin Finck * You should have received a copy of the GNU Lesser General Public 17c2c66affSColin Finck * License along with this library; if not, write to the Free Software 18c2c66affSColin Finck * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA 19c2c66affSColin Finck * 20c2c66affSColin Finck * This is an internal version of winldap.h where constants, types and 21c2c66affSColin Finck * functions are prefixed with WLDAP32_ whenever they conflict with 22c2c66affSColin Finck * native headers. 23c2c66affSColin Finck */ 24c2c66affSColin Finck 25e6368408SAmine Khaldi #pragma once 26c2c66affSColin Finck 27c2c66affSColin Finck typedef enum { 28c2c66affSColin Finck WLDAP32_LDAP_SUCCESS = 0x00, 29c2c66affSColin Finck WLDAP32_LDAP_UNWILLING_TO_PERFORM = 0x35, 30c2c66affSColin Finck WLDAP32_LDAP_SERVER_DOWN = 0x51, 31c2c66affSColin Finck WLDAP32_LDAP_LOCAL_ERROR = 0x52, 32c2c66affSColin Finck WLDAP32_LDAP_ENCODING_ERROR = 0x53, 33c2c66affSColin Finck WLDAP32_LDAP_DECODING_ERROR = 0x54, 34c2c66affSColin Finck WLDAP32_LDAP_TIMEOUT = 0x55, 35c2c66affSColin Finck WLDAP32_LDAP_AUTH_UNKNOWN = 0x56, 36c2c66affSColin Finck WLDAP32_LDAP_FILTER_ERROR = 0x57, 37c2c66affSColin Finck WLDAP32_LDAP_USER_CANCELLED = 0x58, 38c2c66affSColin Finck WLDAP32_LDAP_PARAM_ERROR = 0x59, 39c2c66affSColin Finck WLDAP32_LDAP_NO_MEMORY = 0x5a, 40c2c66affSColin Finck WLDAP32_LDAP_CONNECT_ERROR = 0x5b, 41c2c66affSColin Finck WLDAP32_LDAP_NOT_SUPPORTED = 0x5c, 42c2c66affSColin Finck WLDAP32_LDAP_NO_RESULTS_RETURNED = 0x5e, 43c2c66affSColin Finck WLDAP32_LDAP_CONTROL_NOT_FOUND = 0x5d, 44c2c66affSColin Finck WLDAP32_LDAP_MORE_RESULTS_TO_RETURN = 0x5f, 45c2c66affSColin Finck 46c2c66affSColin Finck WLDAP32_LDAP_CLIENT_LOOP = 0x60, 47c2c66affSColin Finck WLDAP32_LDAP_REFERRAL_LIMIT_EXCEEDED = 0x61 48c2c66affSColin Finck } LDAP_RETCODE; 49c2c66affSColin Finck 50c2c66affSColin Finck typedef struct berelement 51c2c66affSColin Finck { 52c2c66affSColin Finck PCHAR opaque; 53c2c66affSColin Finck } WLDAP32_BerElement; 54c2c66affSColin Finck 55c2c66affSColin Finck #define WLDAP32_LDAP_OPT_API_INFO 0x00 56c2c66affSColin Finck #define WLDAP32_LDAP_OPT_DESC 0x01 57c2c66affSColin Finck #define WLDAP32_LDAP_OPT_DEREF 0x02 58c2c66affSColin Finck #define WLDAP32_LDAP_OPT_SIZELIMIT 0x03 59c2c66affSColin Finck #define WLDAP32_LDAP_OPT_TIMELIMIT 0x04 60c2c66affSColin Finck #define WLDAP32_LDAP_OPT_THREAD_FN_PTRS 0x05 61c2c66affSColin Finck #define WLDAP32_LDAP_OPT_REBIND_FN 0x06 62c2c66affSColin Finck #define WLDAP32_LDAP_OPT_REBIND_ARG 0x07 63c2c66affSColin Finck #define WLDAP32_LDAP_OPT_REFERRALS 0x08 64c2c66affSColin Finck #define WLDAP32_LDAP_OPT_RESTART 0x09 65c2c66affSColin Finck #define WLDAP32_LDAP_OPT_SSL 0x0a 66c2c66affSColin Finck #define WLDAP32_LDAP_OPT_IO_FN_PTRS 0x0b 67c2c66affSColin Finck #define WLDAP32_LDAP_OPT_CACHE_FN_PTRS 0x0d 68c2c66affSColin Finck #define WLDAP32_LDAP_OPT_CACHE_STRATEGY 0x0e 69c2c66affSColin Finck #define WLDAP32_LDAP_OPT_CACHE_ENABLE 0x0f 70c2c66affSColin Finck #define WLDAP32_LDAP_OPT_REFERRAL_HOP_LIMIT 0x10 71c2c66affSColin Finck #define WLDAP32_LDAP_OPT_VERSION 0x11 72c2c66affSColin Finck #define WLDAP32_LDAP_OPT_PROTOCOL_VERSION WLDAP32_LDAP_OPT_VERSION 73c2c66affSColin Finck #define WLDAP32_LDAP_OPT_SERVER_CONTROLS 0x12 74c2c66affSColin Finck #define WLDAP32_LDAP_OPT_API_FEATURE_INFO 0x15 75c2c66affSColin Finck #define WLDAP32_LDAP_OPT_HOST_NAME 0x30 76c2c66affSColin Finck #define WLDAP32_LDAP_OPT_ERROR_NUMBER 0x31 77c2c66affSColin Finck #define WLDAP32_LDAP_OPT_ERROR_STRING 0x32 78c2c66affSColin Finck #define WLDAP32_LDAP_OPT_SERVER_ERROR 0x33 79c2c66affSColin Finck #define WLDAP32_LDAP_OPT_SERVER_EXT_ERROR 0x34 80c2c66affSColin Finck #define WLDAP32_LDAP_OPT_PING_KEEP_ALIVE 0x36 81c2c66affSColin Finck #define WLDAP32_LDAP_OPT_PING_WAIT_TIME 0x37 82c2c66affSColin Finck #define WLDAP32_LDAP_OPT_PING_LIMIT 0x38 83c2c66affSColin Finck #define WLDAP32_LDAP_OPT_DNSDOMAIN_NAME 0x3b 84c2c66affSColin Finck #define WLDAP32_LDAP_OPT_GETDSNAME_FLAGS 0x3d 85c2c66affSColin Finck #define WLDAP32_LDAP_OPT_HOST_REACHABLE 0x3e 86c2c66affSColin Finck #define WLDAP32_LDAP_OPT_PROMPT_CREDENTIALS 0x3f 87c2c66affSColin Finck #define WLDAP32_LDAP_OPT_TCP_KEEPALIVE 0x40 88c2c66affSColin Finck #define WLDAP32_LDAP_OPT_FAST_CONCURRENT_BIND 0x41 89c2c66affSColin Finck #define WLDAP32_LDAP_OPT_SEND_TIMEOUT 0x42 90c2c66affSColin Finck #define WLDAP32_LDAP_OPT_REFERRAL_CALLBACK 0x70 91c2c66affSColin Finck #define WLDAP32_LDAP_OPT_CLIENT_CERTIFICATE 0x80 92c2c66affSColin Finck #define WLDAP32_LDAP_OPT_SERVER_CERTIFICATE 0x81 93c2c66affSColin Finck #define WLDAP32_LDAP_OPT_AUTO_RECONNECT 0x91 94c2c66affSColin Finck #define WLDAP32_LDAP_OPT_SSPI_FLAGS 0x92 95c2c66affSColin Finck #define WLDAP32_LDAP_OPT_SSL_INFO 0x93 96c2c66affSColin Finck #define WLDAP32_LDAP_OPT_REF_DEREF_CONN_PER_MSG 0x94 97c2c66affSColin Finck #define WLDAP32_LDAP_OPT_TLS WLDAP32_LDAP_OPT_SSL 98c2c66affSColin Finck #define WLDAP32_LDAP_OPT_TLS_INFO WLDAP32_LDAP_OPT_SSL_INFO 99c2c66affSColin Finck #define WLDAP32_LDAP_OPT_SIGN 0x95 100c2c66affSColin Finck #define WLDAP32_LDAP_OPT_ENCRYPT 0x96 101c2c66affSColin Finck #define WLDAP32_LDAP_OPT_SASL_METHOD 0x97 102c2c66affSColin Finck #define WLDAP32_LDAP_OPT_AREC_EXCLUSIVE 0x98 103c2c66affSColin Finck #define WLDAP32_LDAP_OPT_SECURITY_CONTEXT 0x99 104c2c66affSColin Finck #define WLDAP32_LDAP_OPT_ROOTDSE_CACHE 0x9a 105c2c66affSColin Finck 106c2c66affSColin Finck typedef struct ldap 107c2c66affSColin Finck { 108c2c66affSColin Finck struct 109c2c66affSColin Finck { 110c2c66affSColin Finck UINT_PTR sb_sd; 111c2c66affSColin Finck UCHAR Reserved1[41]; 112c2c66affSColin Finck ULONG_PTR sb_naddr; 113c2c66affSColin Finck UCHAR Reserved2[24]; 114c2c66affSColin Finck } ld_sb; 115c2c66affSColin Finck 116c2c66affSColin Finck PCHAR ld_host; 117c2c66affSColin Finck ULONG ld_version; 118c2c66affSColin Finck UCHAR ld_lberoptions; 119c2c66affSColin Finck ULONG ld_deref; 120c2c66affSColin Finck ULONG ld_timelimit; 121c2c66affSColin Finck ULONG ld_sizelimit; 122c2c66affSColin Finck ULONG ld_errno; 123c2c66affSColin Finck PCHAR ld_matched; 124c2c66affSColin Finck PCHAR ld_error; 125c2c66affSColin Finck ULONG ld_msgid; 126c2c66affSColin Finck UCHAR Reserved3[25]; 127c2c66affSColin Finck ULONG ld_cldaptries; 128c2c66affSColin Finck ULONG ld_cldaptimeout; 129c2c66affSColin Finck ULONG ld_refhoplimit; 130c2c66affSColin Finck ULONG ld_options; 131c2c66affSColin Finck } WLDAP32_LDAP, *WLDAP32_PLDAP; 132c2c66affSColin Finck 133c2c66affSColin Finck typedef struct ldapmodA { 134c2c66affSColin Finck ULONG mod_op; 135c2c66affSColin Finck PCHAR mod_type; 136c2c66affSColin Finck union { 137c2c66affSColin Finck PCHAR *modv_strvals; 138c2c66affSColin Finck struct berval **modv_bvals; 139c2c66affSColin Finck } mod_vals; 140c2c66affSColin Finck } LDAPModA, *PLDAPModA; 141c2c66affSColin Finck 142c2c66affSColin Finck typedef struct ldapmodW { 143c2c66affSColin Finck ULONG mod_op; 144c2c66affSColin Finck PWCHAR mod_type; 145c2c66affSColin Finck union { 146c2c66affSColin Finck PWCHAR *modv_strvals; 147c2c66affSColin Finck struct berval **modv_bvals; 148c2c66affSColin Finck } mod_vals; 149c2c66affSColin Finck } LDAPModW, *PLDAPModW; 150c2c66affSColin Finck 151c2c66affSColin Finck typedef struct l_timeval 152c2c66affSColin Finck { 153c2c66affSColin Finck LONG tv_sec; 154c2c66affSColin Finck LONG tv_usec; 155c2c66affSColin Finck } LDAP_TIMEVAL, *PLDAP_TIMEVAL; 156c2c66affSColin Finck 157c2c66affSColin Finck typedef struct ldapmsg 158c2c66affSColin Finck { 159c2c66affSColin Finck ULONG lm_msgid; 160c2c66affSColin Finck ULONG lm_msgtype; 161c2c66affSColin Finck 162c2c66affSColin Finck PVOID lm_ber; 163c2c66affSColin Finck 164c2c66affSColin Finck struct ldapmsg *lm_chain; 165c2c66affSColin Finck struct ldapmsg *lm_next; 166c2c66affSColin Finck ULONG lm_time; 167c2c66affSColin Finck 168c2c66affSColin Finck WLDAP32_PLDAP Connection; 169c2c66affSColin Finck PVOID Request; 170c2c66affSColin Finck ULONG lm_returncode; 171c2c66affSColin Finck USHORT lm_referral; 172c2c66affSColin Finck BOOLEAN lm_chased; 173c2c66affSColin Finck BOOLEAN lm_eom; 174c2c66affSColin Finck BOOLEAN ConnectionReferenced; 175c2c66affSColin Finck } WLDAP32_LDAPMessage, *WLDAP32_PLDAPMessage; 176c2c66affSColin Finck 177c2c66affSColin Finck #define LAPI_MAJOR_VER1 1 178c2c66affSColin Finck #define LAPI_MINOR_VER1 1 179c2c66affSColin Finck 180c2c66affSColin Finck typedef struct ldap_version_info 181c2c66affSColin Finck { 182c2c66affSColin Finck ULONG lv_size; 183c2c66affSColin Finck ULONG lv_major; 184c2c66affSColin Finck ULONG lv_minor; 185c2c66affSColin Finck } LDAP_VERSION_INFO, *PLDAP_VERSION_INFO; 186c2c66affSColin Finck 187c2c66affSColin Finck typedef struct WLDAP32_berval 188c2c66affSColin Finck { 189c2c66affSColin Finck ULONG bv_len; 190c2c66affSColin Finck PCHAR bv_val; 191c2c66affSColin Finck } LDAP_BERVAL, *PLDAP_BERVAL, BERVAL, *PBERVAL, WLDAP32_BerValue; 192c2c66affSColin Finck 193c2c66affSColin Finck #define LDAP_PAGED_RESULT_OID_STRING "1.2.840.113556.1.4.319" 194c2c66affSColin Finck #define LDAP_SERVER_RESP_SORT_OID "1.2.840.113556.1.4.474" 195c2c66affSColin Finck #define LDAP_CONTROL_VLVRESPONSE "2.16.840.1.113730.3.4.10" 196*6b9bd93fSAmine Khaldi 197*6b9bd93fSAmine Khaldi #if defined(_MSC_VER) || defined(__MINGW32__) 198*6b9bd93fSAmine Khaldi #define LDAP_PAGED_RESULT_OID_STRING_W L"1.2.840.113556.1.4.319" 199*6b9bd93fSAmine Khaldi #define LDAP_SERVER_RESP_SORT_OID_W L"1.2.840.113556.1.4.474" 200*6b9bd93fSAmine Khaldi #define LDAP_CONTROL_VLVRESPONSE_W L"2.16.840.1.113730.3.4.10" 201*6b9bd93fSAmine Khaldi #else 202*6b9bd93fSAmine Khaldi static const WCHAR LDAP_PAGED_RESULT_OID_STRING_W[] = {'1','.','2','.','8','4','0','.','1','1','3','5','5','6','.','1','.','4','.','3','1','9',0}; 203*6b9bd93fSAmine Khaldi static const WCHAR LDAP_SERVER_RESP_SORT_OID_W[] = {'1','.','2','.','8','4','0','.','1','1','3','5','5','6','.','1','.','4','.','4','7','4',0}; 204*6b9bd93fSAmine Khaldi static const WCHAR LDAP_CONTROL_VLVRESPONSE_W[] = {'2','.','1','6','.','8','4','0','.','1','.','1','1','3','7','3','0','.','3','.','4','.','1','0',0}; 205*6b9bd93fSAmine Khaldi #endif 206c2c66affSColin Finck 207c2c66affSColin Finck typedef struct ldapcontrolA 208c2c66affSColin Finck { 209c2c66affSColin Finck PCHAR ldctl_oid; 210c2c66affSColin Finck struct WLDAP32_berval ldctl_value; 211c2c66affSColin Finck BOOLEAN ldctl_iscritical; 212c2c66affSColin Finck } LDAPControlA, *PLDAPControlA; 213c2c66affSColin Finck 214c2c66affSColin Finck typedef struct ldapcontrolW 215c2c66affSColin Finck { 216c2c66affSColin Finck PWCHAR ldctl_oid; 217c2c66affSColin Finck struct WLDAP32_berval ldctl_value; 218c2c66affSColin Finck BOOLEAN ldctl_iscritical; 219c2c66affSColin Finck } LDAPControlW, *PLDAPControlW; 220c2c66affSColin Finck 221c2c66affSColin Finck typedef struct WLDAP32_ldapvlvinfo 222c2c66affSColin Finck { 223c2c66affSColin Finck int ldvlv_version; 224c2c66affSColin Finck ULONG ldvlv_before_count; 225c2c66affSColin Finck ULONG ldvlv_after_count; 226c2c66affSColin Finck ULONG ldvlv_offset; 227c2c66affSColin Finck ULONG ldvlv_count; 228c2c66affSColin Finck PBERVAL ldvlv_attrvalue; 229c2c66affSColin Finck PBERVAL ldvlv_context; 230c2c66affSColin Finck VOID *ldvlv_extradata; 231c2c66affSColin Finck } WLDAP32_LDAPVLVInfo, *WLDAP32_PLDAPVLVInfo; 232c2c66affSColin Finck 233c2c66affSColin Finck typedef struct ldapsearch LDAPSearch, *PLDAPSearch; 234c2c66affSColin Finck 235c2c66affSColin Finck typedef struct ldapsortkeyA 236c2c66affSColin Finck { 237c2c66affSColin Finck PCHAR sk_attrtype; 238c2c66affSColin Finck PCHAR sk_matchruleoid; 239c2c66affSColin Finck BOOLEAN sk_reverseorder; 240c2c66affSColin Finck } LDAPSortKeyA, *PLDAPSortKeyA; 241c2c66affSColin Finck 242c2c66affSColin Finck typedef struct ldapsortkeyW 243c2c66affSColin Finck { 244c2c66affSColin Finck PWCHAR sk_attrtype; 245c2c66affSColin Finck PWCHAR sk_matchruleoid; 246c2c66affSColin Finck BOOLEAN sk_reverseorder; 247c2c66affSColin Finck } LDAPSortKeyW, *PLDAPSortKeyW; 248c2c66affSColin Finck 249c2c66affSColin Finck typedef struct ldapapiinfoA 250c2c66affSColin Finck { 251c2c66affSColin Finck int ldapai_info_version; 252c2c66affSColin Finck int ldapai_api_version; 253c2c66affSColin Finck int ldapai_protocol_version; 254c2c66affSColin Finck char **ldapai_extensions; 255c2c66affSColin Finck char *ldapai_vendor_name; 256c2c66affSColin Finck int ldapai_vendor_version; 257c2c66affSColin Finck } LDAPAPIInfoA; 258c2c66affSColin Finck 259c2c66affSColin Finck typedef struct ldapapiinfoW 260c2c66affSColin Finck { 261c2c66affSColin Finck int ldapai_info_version; 262c2c66affSColin Finck int ldapai_api_version; 263c2c66affSColin Finck int ldapai_protocol_version; 264c2c66affSColin Finck PWCHAR *ldapai_extensions; 265c2c66affSColin Finck PWCHAR ldapai_vendor_name; 266c2c66affSColin Finck int ldapai_vendor_version; 267c2c66affSColin Finck } LDAPAPIInfoW; 268c2c66affSColin Finck 269c2c66affSColin Finck typedef struct ldap_apifeature_infoA 270c2c66affSColin Finck { 271c2c66affSColin Finck int ldapaif_info_version; 272c2c66affSColin Finck char *ldapaif_name; 273c2c66affSColin Finck int ldapaif_version; 274c2c66affSColin Finck } LDAPAPIFeatureInfoA; 275c2c66affSColin Finck 276c2c66affSColin Finck typedef struct ldap_apifeature_infoW 277c2c66affSColin Finck { 278c2c66affSColin Finck int ldapaif_info_version; 279c2c66affSColin Finck PWCHAR ldapaif_name; 280c2c66affSColin Finck int ldapaif_version; 281c2c66affSColin Finck } LDAPAPIFeatureInfoW; 282c2c66affSColin Finck 283c2c66affSColin Finck WLDAP32_LDAP * CDECL cldap_openA(PCHAR,ULONG); 284c2c66affSColin Finck WLDAP32_LDAP * CDECL cldap_openW(PWCHAR,ULONG); 285c2c66affSColin Finck ULONG CDECL WLDAP32_ldap_abandon(WLDAP32_LDAP*,ULONG); 286c2c66affSColin Finck ULONG CDECL ldap_addA(WLDAP32_LDAP*,PCHAR,LDAPModA*[]); 287c2c66affSColin Finck ULONG CDECL ldap_addW(WLDAP32_LDAP*,PWCHAR,LDAPModW*[]); 288c2c66affSColin Finck ULONG CDECL ldap_add_extA(WLDAP32_LDAP*,PCHAR,LDAPModA*[],PLDAPControlA*,PLDAPControlA*,ULONG*); 289c2c66affSColin Finck ULONG CDECL ldap_add_extW(WLDAP32_LDAP*,PWCHAR,LDAPModW*[],PLDAPControlW*,PLDAPControlW*,ULONG*); 290c2c66affSColin Finck ULONG CDECL ldap_add_ext_sA(WLDAP32_LDAP*,PCHAR,LDAPModA*[],PLDAPControlA*,PLDAPControlA*); 291c2c66affSColin Finck ULONG CDECL ldap_add_ext_sW(WLDAP32_LDAP*,PWCHAR,LDAPModW*[],PLDAPControlW*,PLDAPControlW*); 292c2c66affSColin Finck ULONG CDECL ldap_add_sA(WLDAP32_LDAP*,PCHAR,LDAPModA*[]); 293c2c66affSColin Finck ULONG CDECL ldap_add_sW(WLDAP32_LDAP*,PWCHAR,LDAPModW*[]); 294c2c66affSColin Finck ULONG CDECL ldap_bindA(WLDAP32_LDAP*,PCHAR,PCHAR,ULONG); 295c2c66affSColin Finck ULONG CDECL ldap_bindW(WLDAP32_LDAP*,PWCHAR,PWCHAR,ULONG); 296c2c66affSColin Finck ULONG CDECL ldap_bind_sA(WLDAP32_LDAP*,PCHAR,PCHAR,ULONG); 297c2c66affSColin Finck ULONG CDECL ldap_bind_sW(WLDAP32_LDAP*,PWCHAR,PWCHAR,ULONG); 298c2c66affSColin Finck ULONG CDECL ldap_check_filterA(WLDAP32_LDAP*,PCHAR); 299c2c66affSColin Finck ULONG CDECL ldap_check_filterW(WLDAP32_LDAP*,PWCHAR); 300c2c66affSColin Finck ULONG CDECL ldap_cleanup(HANDLE); 301c2c66affSColin Finck ULONG CDECL ldap_close_extended_op(WLDAP32_LDAP*,ULONG); 302c2c66affSColin Finck ULONG CDECL ldap_compareA(WLDAP32_LDAP*,PCHAR,PCHAR,PCHAR); 303c2c66affSColin Finck ULONG CDECL ldap_compareW(WLDAP32_LDAP*,PWCHAR,PWCHAR,PWCHAR); 304c2c66affSColin Finck ULONG CDECL ldap_compare_extA(WLDAP32_LDAP*,PCHAR,PCHAR,PCHAR,struct WLDAP32_berval*,PLDAPControlA*,PLDAPControlA*,ULONG*); 305c2c66affSColin Finck ULONG CDECL ldap_compare_extW(WLDAP32_LDAP*,PWCHAR,PWCHAR,PWCHAR,struct WLDAP32_berval*,PLDAPControlW*,PLDAPControlW*,ULONG*); 306c2c66affSColin Finck ULONG CDECL ldap_compare_ext_sA(WLDAP32_LDAP*,PCHAR,PCHAR,PCHAR,struct WLDAP32_berval*,PLDAPControlA*,PLDAPControlA*); 307c2c66affSColin Finck ULONG CDECL ldap_compare_ext_sW(WLDAP32_LDAP*,PWCHAR,PWCHAR,PWCHAR,struct WLDAP32_berval*,PLDAPControlW*,PLDAPControlW*); 308c2c66affSColin Finck ULONG CDECL ldap_compare_sA(WLDAP32_LDAP*,PCHAR,PCHAR,PCHAR); 309c2c66affSColin Finck ULONG CDECL ldap_compare_sW(WLDAP32_LDAP*,PWCHAR,PWCHAR,PWCHAR); 310c2c66affSColin Finck ULONG CDECL ldap_connect(WLDAP32_LDAP*,LDAP_TIMEVAL*); 311c2c66affSColin Finck WLDAP32_LDAP * CDECL ldap_conn_from_msg(WLDAP32_LDAP*,WLDAP32_LDAPMessage*); 312c2c66affSColin Finck ULONG CDECL ldap_control_freeA(LDAPControlA*); 313c2c66affSColin Finck ULONG CDECL ldap_control_freeW(LDAPControlW*); 314c2c66affSColin Finck ULONG CDECL ldap_controls_freeA(LDAPControlA**); 315c2c66affSColin Finck ULONG CDECL ldap_controls_freeW(LDAPControlW**); 316c2c66affSColin Finck ULONG CDECL WLDAP32_ldap_count_entries(WLDAP32_LDAP*,WLDAP32_LDAPMessage*); 317c2c66affSColin Finck ULONG CDECL WLDAP32_ldap_count_references(WLDAP32_LDAP*,WLDAP32_LDAPMessage*); 318c2c66affSColin Finck ULONG CDECL ldap_count_valuesA(PCHAR*); 319c2c66affSColin Finck ULONG CDECL ldap_count_valuesW(PWCHAR*); 320c2c66affSColin Finck ULONG CDECL WLDAP32_ldap_count_values_len(PBERVAL*); 321c2c66affSColin Finck ULONG CDECL ldap_create_page_controlA(WLDAP32_PLDAP,ULONG,struct WLDAP32_berval*,UCHAR,PLDAPControlA*); 322c2c66affSColin Finck ULONG CDECL ldap_create_page_controlW(WLDAP32_PLDAP,ULONG,struct WLDAP32_berval*,UCHAR,PLDAPControlW*); 323c2c66affSColin Finck ULONG CDECL ldap_create_sort_controlA(WLDAP32_PLDAP,PLDAPSortKeyA*,UCHAR,PLDAPControlA*); 324c2c66affSColin Finck ULONG CDECL ldap_create_sort_controlW(WLDAP32_PLDAP,PLDAPSortKeyW*,UCHAR,PLDAPControlW*); 325c2c66affSColin Finck INT CDECL ldap_create_vlv_controlA(WLDAP32_LDAP*,WLDAP32_LDAPVLVInfo*,UCHAR,LDAPControlA**); 326c2c66affSColin Finck INT CDECL ldap_create_vlv_controlW(WLDAP32_LDAP*,WLDAP32_LDAPVLVInfo*,UCHAR,LDAPControlW**); 327c2c66affSColin Finck ULONG CDECL ldap_deleteA(WLDAP32_LDAP*,PCHAR); 328c2c66affSColin Finck ULONG CDECL ldap_deleteW(WLDAP32_LDAP*,PWCHAR); 329c2c66affSColin Finck ULONG CDECL ldap_delete_extA(WLDAP32_LDAP*,PCHAR,PLDAPControlA*,PLDAPControlA*,ULONG*); 330c2c66affSColin Finck ULONG CDECL ldap_delete_extW(WLDAP32_LDAP*,PWCHAR,PLDAPControlW*,PLDAPControlW*,ULONG*); 331c2c66affSColin Finck ULONG CDECL ldap_delete_ext_sA(WLDAP32_LDAP*,PCHAR,PLDAPControlA*,PLDAPControlA*); 332c2c66affSColin Finck ULONG CDECL ldap_delete_ext_sW(WLDAP32_LDAP*,PWCHAR,PLDAPControlW*,PLDAPControlW*); 333c2c66affSColin Finck ULONG CDECL ldap_delete_sA(WLDAP32_LDAP*,PCHAR); 334c2c66affSColin Finck ULONG CDECL ldap_delete_sW(WLDAP32_LDAP*,PWCHAR); 335c2c66affSColin Finck PCHAR CDECL ldap_dn2ufnA(PCHAR); 336c2c66affSColin Finck PWCHAR CDECL ldap_dn2ufnW(PWCHAR); 337c2c66affSColin Finck ULONG CDECL ldap_encode_sort_controlA(WLDAP32_PLDAP,PLDAPSortKeyA*,PLDAPControlA,BOOLEAN); 338c2c66affSColin Finck ULONG CDECL ldap_encode_sort_controlW(WLDAP32_PLDAP,PLDAPSortKeyW*,PLDAPControlW,BOOLEAN); 339c2c66affSColin Finck PCHAR CDECL ldap_err2stringA(ULONG); 340c2c66affSColin Finck PWCHAR CDECL ldap_err2stringW(ULONG); 341c2c66affSColin Finck ULONG CDECL ldap_escape_filter_elementA(PCHAR,ULONG,PCHAR,ULONG); 342c2c66affSColin Finck ULONG CDECL ldap_escape_filter_elementW(PCHAR,ULONG,PWCHAR,ULONG); 343c2c66affSColin Finck PCHAR * CDECL ldap_explode_dnA(PCHAR,ULONG); 344c2c66affSColin Finck PWCHAR * CDECL ldap_explode_dnW(PWCHAR,ULONG); 345c2c66affSColin Finck ULONG CDECL ldap_extended_operationA(WLDAP32_LDAP*,PCHAR,struct WLDAP32_berval*,PLDAPControlA*,PLDAPControlA*,ULONG*); 346c2c66affSColin Finck ULONG CDECL ldap_extended_operationW(WLDAP32_LDAP*,PWCHAR,struct WLDAP32_berval*,PLDAPControlW*,PLDAPControlW*,ULONG*); 347c2c66affSColin Finck ULONG CDECL ldap_extended_operation_sA(WLDAP32_LDAP*,PCHAR,struct WLDAP32_berval*,PLDAPControlA*, PLDAPControlA*, 348c2c66affSColin Finck PCHAR*,struct WLDAP32_berval**); 349c2c66affSColin Finck ULONG CDECL ldap_extended_operation_sW(WLDAP32_LDAP*,PWCHAR,struct WLDAP32_berval*,PLDAPControlW*, PLDAPControlW*, 350c2c66affSColin Finck PWCHAR*,struct WLDAP32_berval**); 351c2c66affSColin Finck PCHAR CDECL ldap_first_attributeA(WLDAP32_LDAP*,WLDAP32_LDAPMessage*,WLDAP32_BerElement**); 352c2c66affSColin Finck PWCHAR CDECL ldap_first_attributeW(WLDAP32_LDAP*,WLDAP32_LDAPMessage*,WLDAP32_BerElement**); 353c2c66affSColin Finck WLDAP32_LDAPMessage * CDECL WLDAP32_ldap_first_entry(WLDAP32_LDAP*,WLDAP32_LDAPMessage*); 354c2c66affSColin Finck WLDAP32_LDAPMessage * CDECL WLDAP32_ldap_first_reference(WLDAP32_LDAP*,WLDAP32_LDAPMessage*); 355c2c66affSColin Finck ULONG CDECL ldap_free_controlsA(LDAPControlA**); 356c2c66affSColin Finck ULONG CDECL ldap_free_controlsW(LDAPControlW**); 357c2c66affSColin Finck PCHAR CDECL ldap_get_dnA(WLDAP32_LDAP*,WLDAP32_LDAPMessage*); 358c2c66affSColin Finck PWCHAR CDECL ldap_get_dnW(WLDAP32_LDAP*,WLDAP32_LDAPMessage*); 359c2c66affSColin Finck ULONG CDECL ldap_get_next_page(WLDAP32_LDAP*,PLDAPSearch,ULONG,ULONG*); 360c2c66affSColin Finck ULONG CDECL ldap_get_next_page_s(WLDAP32_LDAP*,PLDAPSearch,struct l_timeval*,ULONG,ULONG*,WLDAP32_LDAPMessage**); 361c2c66affSColin Finck ULONG CDECL ldap_get_optionA(WLDAP32_LDAP*,int,void*); 362c2c66affSColin Finck ULONG CDECL ldap_get_optionW(WLDAP32_LDAP*,int,void*); 363c2c66affSColin Finck ULONG CDECL ldap_get_paged_count(WLDAP32_LDAP*,PLDAPSearch,ULONG*,WLDAP32_LDAPMessage*); 364c2c66affSColin Finck PCHAR * CDECL ldap_get_valuesA(WLDAP32_LDAP*,WLDAP32_LDAPMessage*,PCHAR); 365c2c66affSColin Finck PWCHAR * CDECL ldap_get_valuesW(WLDAP32_LDAP*,WLDAP32_LDAPMessage*,PWCHAR); 366c2c66affSColin Finck PBERVAL * CDECL ldap_get_values_lenA(WLDAP32_LDAP*,WLDAP32_LDAPMessage*,PCHAR); 367c2c66affSColin Finck PBERVAL * CDECL ldap_get_values_lenW(WLDAP32_LDAP*,WLDAP32_LDAPMessage*,PWCHAR); 368c2c66affSColin Finck WLDAP32_LDAP * CDECL ldap_initA(const PCHAR,ULONG); 369c2c66affSColin Finck WLDAP32_LDAP * CDECL ldap_initW(const PWCHAR,ULONG); 370c2c66affSColin Finck void CDECL ldap_memfreeA(PCHAR); 371c2c66affSColin Finck void CDECL ldap_memfreeW(PWCHAR); 372c2c66affSColin Finck ULONG CDECL ldap_modifyA(WLDAP32_LDAP*,PCHAR,LDAPModA*[]); 373c2c66affSColin Finck ULONG CDECL ldap_modifyW(WLDAP32_LDAP*,PWCHAR,LDAPModW*[]); 374c2c66affSColin Finck ULONG CDECL ldap_modify_extA(WLDAP32_LDAP*,PCHAR,LDAPModA*[],PLDAPControlA*,PLDAPControlA*,ULONG*); 375c2c66affSColin Finck ULONG CDECL ldap_modify_extW(WLDAP32_LDAP*,PWCHAR,LDAPModW*[],PLDAPControlW*,PLDAPControlW*,ULONG*); 376c2c66affSColin Finck ULONG CDECL ldap_modify_ext_sA(WLDAP32_LDAP*,PCHAR,LDAPModA*[],PLDAPControlA*,PLDAPControlA*); 377c2c66affSColin Finck ULONG CDECL ldap_modify_ext_sW(WLDAP32_LDAP*,PWCHAR,LDAPModW*[],PLDAPControlW*,PLDAPControlW*); 378c2c66affSColin Finck ULONG CDECL ldap_modify_sA(WLDAP32_LDAP*,PCHAR,LDAPModA*[]); 379c2c66affSColin Finck ULONG CDECL ldap_modify_sW(WLDAP32_LDAP*,PWCHAR,LDAPModW*[]); 380c2c66affSColin Finck ULONG CDECL ldap_modrdnA(WLDAP32_LDAP*,PCHAR,PCHAR); 381c2c66affSColin Finck ULONG CDECL ldap_modrdnW(WLDAP32_LDAP*,PWCHAR,PWCHAR); 382c2c66affSColin Finck ULONG CDECL ldap_modrdn2A(WLDAP32_LDAP*,PCHAR,PCHAR,INT); 383c2c66affSColin Finck ULONG CDECL ldap_modrdn2W(WLDAP32_LDAP*,PWCHAR,PWCHAR,INT); 384c2c66affSColin Finck ULONG CDECL ldap_modrdn2_sA(WLDAP32_LDAP*,PCHAR,PCHAR,INT); 385c2c66affSColin Finck ULONG CDECL ldap_modrdn2_sW(WLDAP32_LDAP*,PWCHAR,PWCHAR,INT); 386c2c66affSColin Finck ULONG CDECL ldap_modrdn_sA(WLDAP32_LDAP*,PCHAR,PCHAR); 387c2c66affSColin Finck ULONG CDECL ldap_modrdn_sW(WLDAP32_LDAP*,PWCHAR,PWCHAR); 388c2c66affSColin Finck ULONG CDECL WLDAP32_ldap_msgfree(WLDAP32_LDAPMessage*); 389c2c66affSColin Finck PCHAR CDECL ldap_next_attributeA(WLDAP32_LDAP*,WLDAP32_LDAPMessage*,WLDAP32_BerElement*); 390c2c66affSColin Finck PWCHAR CDECL ldap_next_attributeW(WLDAP32_LDAP*,WLDAP32_LDAPMessage*,WLDAP32_BerElement*); 391c2c66affSColin Finck WLDAP32_LDAPMessage * CDECL WLDAP32_ldap_next_entry(WLDAP32_LDAP*,WLDAP32_LDAPMessage*); 392c2c66affSColin Finck WLDAP32_LDAPMessage * CDECL WLDAP32_ldap_next_reference(WLDAP32_LDAP*,WLDAP32_LDAPMessage*); 393c2c66affSColin Finck WLDAP32_LDAP * CDECL ldap_openA(PCHAR,ULONG); 394c2c66affSColin Finck WLDAP32_LDAP * CDECL ldap_openW(PWCHAR,ULONG); 395c2c66affSColin Finck ULONG CDECL ldap_parse_extended_resultA(WLDAP32_LDAP*,WLDAP32_LDAPMessage*,PCHAR*,struct WLDAP32_berval**,BOOLEAN); 396c2c66affSColin Finck ULONG CDECL ldap_parse_extended_resultW(WLDAP32_LDAP*,WLDAP32_LDAPMessage*,PWCHAR*,struct WLDAP32_berval**,BOOLEAN); 397c2c66affSColin Finck ULONG CDECL ldap_parse_page_controlA(WLDAP32_LDAP*,PLDAPControlA*,ULONG*,struct WLDAP32_berval**); 398c2c66affSColin Finck ULONG CDECL ldap_parse_page_controlW(WLDAP32_LDAP*,PLDAPControlW*,ULONG*,struct WLDAP32_berval**); 399c2c66affSColin Finck ULONG CDECL ldap_parse_referenceA(WLDAP32_LDAP*,WLDAP32_LDAPMessage*,PCHAR**); 400c2c66affSColin Finck ULONG CDECL ldap_parse_referenceW(WLDAP32_LDAP*,WLDAP32_LDAPMessage*,PWCHAR**); 401c2c66affSColin Finck ULONG CDECL ldap_parse_resultA(WLDAP32_LDAP*,WLDAP32_LDAPMessage*,ULONG*,PCHAR*,PCHAR*,PCHAR**,PLDAPControlA**,BOOLEAN); 402c2c66affSColin Finck ULONG CDECL ldap_parse_resultW(WLDAP32_LDAP*,WLDAP32_LDAPMessage*,ULONG*,PWCHAR*,PWCHAR*,PWCHAR**,PLDAPControlW**,BOOLEAN); 403c2c66affSColin Finck ULONG CDECL ldap_parse_sort_controlA(WLDAP32_LDAP*,PLDAPControlA*,ULONG*,PCHAR*); 404c2c66affSColin Finck ULONG CDECL ldap_parse_sort_controlW(WLDAP32_LDAP*,PLDAPControlW*,ULONG*,PWCHAR*); 405c2c66affSColin Finck int CDECL ldap_parse_vlv_controlA(WLDAP32_LDAP*,LDAPControlA**,ULONG*,ULONG*,struct WLDAP32_berval**,INT*); 406c2c66affSColin Finck int CDECL ldap_parse_vlv_controlW(WLDAP32_LDAP*,LDAPControlW**,ULONG*,ULONG*,struct WLDAP32_berval**,INT*); 407c2c66affSColin Finck void CDECL WLDAP32_ldap_perror(WLDAP32_LDAP*,const PCHAR); 408c2c66affSColin Finck ULONG CDECL ldap_rename_extA(WLDAP32_LDAP*,PCHAR,PCHAR,PCHAR,INT,PLDAPControlA*,PLDAPControlA*,ULONG*); 409c2c66affSColin Finck ULONG CDECL ldap_rename_extW(WLDAP32_LDAP*,PWCHAR,PWCHAR,PWCHAR,INT,PLDAPControlW*,PLDAPControlW*,ULONG*); 410c2c66affSColin Finck ULONG CDECL ldap_rename_ext_sA(WLDAP32_LDAP*,PCHAR,PCHAR,PCHAR,INT,PLDAPControlA*,PLDAPControlA*); 411c2c66affSColin Finck ULONG CDECL ldap_rename_ext_sW(WLDAP32_LDAP*,PWCHAR,PWCHAR,PWCHAR,INT,PLDAPControlW*,PLDAPControlW*); 412c2c66affSColin Finck ULONG CDECL WLDAP32_ldap_result(WLDAP32_LDAP*,ULONG,ULONG,struct l_timeval*,WLDAP32_LDAPMessage**); 413c2c66affSColin Finck ULONG CDECL WLDAP32_ldap_result2error(WLDAP32_LDAP*,WLDAP32_LDAPMessage*,ULONG); 414c2c66affSColin Finck ULONG CDECL ldap_sasl_bindA(WLDAP32_LDAP*,const PCHAR,const PCHAR,const BERVAL*,PLDAPControlA*,PLDAPControlA*,int*); 415c2c66affSColin Finck ULONG CDECL ldap_sasl_bindW(WLDAP32_LDAP*,const PWCHAR,const PWCHAR,const BERVAL*,PLDAPControlW*,PLDAPControlW*,int*); 416c2c66affSColin Finck ULONG CDECL ldap_sasl_bind_sA(WLDAP32_LDAP*,const PCHAR,const PCHAR,const BERVAL*,PLDAPControlA*,PLDAPControlA*,PBERVAL*); 417c2c66affSColin Finck ULONG CDECL ldap_sasl_bind_sW(WLDAP32_LDAP*,const PWCHAR,const PWCHAR,const BERVAL*,PLDAPControlW*,PLDAPControlW*,PBERVAL*); 418c2c66affSColin Finck ULONG CDECL ldap_search_abandon_page(WLDAP32_PLDAP,PLDAPSearch); 419c2c66affSColin Finck ULONG CDECL ldap_searchA(WLDAP32_LDAP*,PCHAR,ULONG,PCHAR,PCHAR[],ULONG); 420c2c66affSColin Finck ULONG CDECL ldap_searchW(WLDAP32_LDAP*,PWCHAR,ULONG,PWCHAR,PWCHAR[],ULONG); 421c2c66affSColin Finck ULONG CDECL ldap_search_extA(WLDAP32_LDAP*,PCHAR,ULONG,PCHAR,PCHAR[],ULONG,PLDAPControlA*, 422c2c66affSColin Finck PLDAPControlA*,ULONG,ULONG,ULONG*); 423c2c66affSColin Finck ULONG CDECL ldap_search_extW(WLDAP32_LDAP*,PWCHAR,ULONG,PWCHAR,PWCHAR[],ULONG,PLDAPControlW*, 424c2c66affSColin Finck PLDAPControlW*,ULONG,ULONG,ULONG*); 425c2c66affSColin Finck ULONG CDECL ldap_search_ext_sA(WLDAP32_LDAP*,PCHAR,ULONG,PCHAR,PCHAR[],ULONG,PLDAPControlA*, 426c2c66affSColin Finck PLDAPControlA*,struct l_timeval*,ULONG,WLDAP32_LDAPMessage**); 427c2c66affSColin Finck ULONG CDECL ldap_search_ext_sW(WLDAP32_LDAP*,PWCHAR,ULONG,PWCHAR,PWCHAR[],ULONG,PLDAPControlW*, 428c2c66affSColin Finck PLDAPControlW*,struct l_timeval*,ULONG,WLDAP32_LDAPMessage**); 429c2c66affSColin Finck PLDAPSearch CDECL ldap_search_init_pageA(WLDAP32_PLDAP,PCHAR,ULONG,PCHAR,PCHAR[],ULONG,PLDAPControlA*, 430c2c66affSColin Finck PLDAPControlA*,ULONG,ULONG,PLDAPSortKeyA*); 431c2c66affSColin Finck PLDAPSearch CDECL ldap_search_init_pageW(WLDAP32_PLDAP,PWCHAR,ULONG,PWCHAR,PWCHAR[],ULONG,PLDAPControlW*, 432c2c66affSColin Finck PLDAPControlW*,ULONG,ULONG, PLDAPSortKeyW*); 433c2c66affSColin Finck ULONG CDECL ldap_search_sA(WLDAP32_LDAP*,PCHAR,ULONG,PCHAR,PCHAR[],ULONG,WLDAP32_LDAPMessage**); 434c2c66affSColin Finck ULONG CDECL ldap_search_sW(WLDAP32_LDAP*,PWCHAR,ULONG,PWCHAR,PWCHAR[],ULONG,WLDAP32_LDAPMessage**); 435c2c66affSColin Finck ULONG CDECL ldap_search_stA(WLDAP32_LDAP*,const PCHAR,ULONG,const PCHAR,PCHAR[],ULONG, 436c2c66affSColin Finck struct l_timeval*,WLDAP32_LDAPMessage**); 437c2c66affSColin Finck ULONG CDECL ldap_search_stW(WLDAP32_LDAP*,const PWCHAR,ULONG,const PWCHAR,PWCHAR[],ULONG, 438c2c66affSColin Finck struct l_timeval*,WLDAP32_LDAPMessage**); 439c2c66affSColin Finck ULONG CDECL ldap_set_optionA(WLDAP32_LDAP*,int,void*); 440c2c66affSColin Finck ULONG CDECL ldap_set_optionW(WLDAP32_LDAP*,int,void*); 441c2c66affSColin Finck ULONG CDECL ldap_simple_bindA(WLDAP32_LDAP*,PCHAR,PCHAR); 442c2c66affSColin Finck ULONG CDECL ldap_simple_bindW(WLDAP32_LDAP*,PWCHAR,PWCHAR); 443c2c66affSColin Finck ULONG CDECL ldap_simple_bind_sA(WLDAP32_LDAP*,PCHAR,PCHAR); 444c2c66affSColin Finck ULONG CDECL ldap_simple_bind_sW(WLDAP32_LDAP*,PWCHAR,PWCHAR); 445c2c66affSColin Finck WLDAP32_LDAP * CDECL ldap_sslinitA(PCHAR,ULONG,int); 446c2c66affSColin Finck WLDAP32_LDAP * CDECL ldap_sslinitW(PWCHAR,ULONG,int); 447c2c66affSColin Finck ULONG CDECL ldap_start_tls_sA(WLDAP32_PLDAP,PULONG,WLDAP32_LDAPMessage**,PLDAPControlA*,PLDAPControlA*); 448c2c66affSColin Finck ULONG CDECL ldap_start_tls_sW(WLDAP32_PLDAP,PULONG,WLDAP32_LDAPMessage**,PLDAPControlW*,PLDAPControlW*); 449c2c66affSColin Finck ULONG CDECL ldap_startup(PLDAP_VERSION_INFO,HANDLE*); 450c2c66affSColin Finck BOOLEAN CDECL ldap_stop_tls_s(WLDAP32_PLDAP); 451c2c66affSColin Finck ULONG CDECL ldap_ufn2dnA(PCHAR,PCHAR*); 452c2c66affSColin Finck ULONG CDECL ldap_ufn2dnW(PWCHAR,PWCHAR*); 453c2c66affSColin Finck ULONG CDECL WLDAP32_ldap_unbind(WLDAP32_LDAP*); 454c2c66affSColin Finck ULONG CDECL WLDAP32_ldap_unbind_s(WLDAP32_LDAP*); 455c2c66affSColin Finck ULONG CDECL ldap_value_freeA(PCHAR*); 456c2c66affSColin Finck ULONG CDECL ldap_value_freeW(PWCHAR*); 457c2c66affSColin Finck ULONG CDECL WLDAP32_ldap_value_free_len(struct WLDAP32_berval**); 458c2c66affSColin Finck 459c2c66affSColin Finck ULONG CDECL LdapGetLastError(void); 460c2c66affSColin Finck ULONG CDECL LdapMapErrorToWin32(ULONG); 461c2c66affSColin Finck int CDECL LdapUnicodeToUTF8(LPCWSTR,int,LPSTR,int); 462c2c66affSColin Finck int CDECL LdapUTF8ToUnicode(LPCSTR,int,LPWSTR,int); 463