ReactOS 0.4.15-dev-5672-gf73ac17
winldap_private.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  berelement
 
struct  ldap
 
struct  ldapmodA
 
struct  ldapmodW
 
struct  l_timeval
 
struct  ldapmsg
 
struct  ldap_version_info
 
struct  WLDAP32_berval
 
struct  ldapcontrolA
 
struct  ldapcontrolW
 
struct  WLDAP32_ldapvlvinfo
 
struct  ldapsortkeyA
 
struct  ldapsortkeyW
 
struct  ldapapiinfoA
 
struct  ldapapiinfoW
 
struct  ldap_apifeature_infoA
 
struct  ldap_apifeature_infoW
 

Macros

#define WLDAP32_LDAP_OPT_API_INFO   0x00
 
#define WLDAP32_LDAP_OPT_DESC   0x01
 
#define WLDAP32_LDAP_OPT_DEREF   0x02
 
#define WLDAP32_LDAP_OPT_SIZELIMIT   0x03
 
#define WLDAP32_LDAP_OPT_TIMELIMIT   0x04
 
#define WLDAP32_LDAP_OPT_THREAD_FN_PTRS   0x05
 
#define WLDAP32_LDAP_OPT_REBIND_FN   0x06
 
#define WLDAP32_LDAP_OPT_REBIND_ARG   0x07
 
#define WLDAP32_LDAP_OPT_REFERRALS   0x08
 
#define WLDAP32_LDAP_OPT_RESTART   0x09
 
#define WLDAP32_LDAP_OPT_SSL   0x0a
 
#define WLDAP32_LDAP_OPT_IO_FN_PTRS   0x0b
 
#define WLDAP32_LDAP_OPT_CACHE_FN_PTRS   0x0d
 
#define WLDAP32_LDAP_OPT_CACHE_STRATEGY   0x0e
 
#define WLDAP32_LDAP_OPT_CACHE_ENABLE   0x0f
 
#define WLDAP32_LDAP_OPT_REFERRAL_HOP_LIMIT   0x10
 
#define WLDAP32_LDAP_OPT_VERSION   0x11
 
#define WLDAP32_LDAP_OPT_PROTOCOL_VERSION   WLDAP32_LDAP_OPT_VERSION
 
#define WLDAP32_LDAP_OPT_SERVER_CONTROLS   0x12
 
#define WLDAP32_LDAP_OPT_API_FEATURE_INFO   0x15
 
#define WLDAP32_LDAP_OPT_HOST_NAME   0x30
 
#define WLDAP32_LDAP_OPT_ERROR_NUMBER   0x31
 
#define WLDAP32_LDAP_OPT_ERROR_STRING   0x32
 
#define WLDAP32_LDAP_OPT_SERVER_ERROR   0x33
 
#define WLDAP32_LDAP_OPT_SERVER_EXT_ERROR   0x34
 
#define WLDAP32_LDAP_OPT_PING_KEEP_ALIVE   0x36
 
#define WLDAP32_LDAP_OPT_PING_WAIT_TIME   0x37
 
#define WLDAP32_LDAP_OPT_PING_LIMIT   0x38
 
#define WLDAP32_LDAP_OPT_DNSDOMAIN_NAME   0x3b
 
#define WLDAP32_LDAP_OPT_GETDSNAME_FLAGS   0x3d
 
#define WLDAP32_LDAP_OPT_HOST_REACHABLE   0x3e
 
#define WLDAP32_LDAP_OPT_PROMPT_CREDENTIALS   0x3f
 
#define WLDAP32_LDAP_OPT_TCP_KEEPALIVE   0x40
 
#define WLDAP32_LDAP_OPT_FAST_CONCURRENT_BIND   0x41
 
#define WLDAP32_LDAP_OPT_SEND_TIMEOUT   0x42
 
#define WLDAP32_LDAP_OPT_REFERRAL_CALLBACK   0x70
 
#define WLDAP32_LDAP_OPT_CLIENT_CERTIFICATE   0x80
 
#define WLDAP32_LDAP_OPT_SERVER_CERTIFICATE   0x81
 
#define WLDAP32_LDAP_OPT_AUTO_RECONNECT   0x91
 
#define WLDAP32_LDAP_OPT_SSPI_FLAGS   0x92
 
#define WLDAP32_LDAP_OPT_SSL_INFO   0x93
 
#define WLDAP32_LDAP_OPT_REF_DEREF_CONN_PER_MSG   0x94
 
#define WLDAP32_LDAP_OPT_TLS   WLDAP32_LDAP_OPT_SSL
 
#define WLDAP32_LDAP_OPT_TLS_INFO   WLDAP32_LDAP_OPT_SSL_INFO
 
#define WLDAP32_LDAP_OPT_SIGN   0x95
 
#define WLDAP32_LDAP_OPT_ENCRYPT   0x96
 
#define WLDAP32_LDAP_OPT_SASL_METHOD   0x97
 
#define WLDAP32_LDAP_OPT_AREC_EXCLUSIVE   0x98
 
#define WLDAP32_LDAP_OPT_SECURITY_CONTEXT   0x99
 
#define WLDAP32_LDAP_OPT_ROOTDSE_CACHE   0x9a
 
#define LAPI_MAJOR_VER1   1
 
#define LAPI_MINOR_VER1   1
 
#define LDAP_PAGED_RESULT_OID_STRING   "1.2.840.113556.1.4.319"
 
#define LDAP_SERVER_RESP_SORT_OID   "1.2.840.113556.1.4.474"
 
#define LDAP_CONTROL_VLVRESPONSE   "2.16.840.1.113730.3.4.10"
 

Typedefs

typedef struct berelement WLDAP32_BerElement
 
typedef struct ldap WLDAP32_LDAP
 
typedef struct ldapWLDAP32_PLDAP
 
typedef struct ldapmodA LDAPModA
 
typedef struct ldapmodAPLDAPModA
 
typedef struct ldapmodW LDAPModW
 
typedef struct ldapmodWPLDAPModW
 
typedef struct l_timeval LDAP_TIMEVAL
 
typedef struct l_timevalPLDAP_TIMEVAL
 
typedef struct ldapmsg WLDAP32_LDAPMessage
 
typedef struct ldapmsgWLDAP32_PLDAPMessage
 
typedef struct ldap_version_info LDAP_VERSION_INFO
 
typedef struct ldap_version_infoPLDAP_VERSION_INFO
 
typedef struct WLDAP32_berval LDAP_BERVAL
 
typedef struct WLDAP32_bervalPLDAP_BERVAL
 
typedef struct WLDAP32_berval BERVAL
 
typedef struct WLDAP32_bervalPBERVAL
 
typedef struct WLDAP32_berval WLDAP32_BerValue
 
typedef struct ldapcontrolA LDAPControlA
 
typedef struct ldapcontrolAPLDAPControlA
 
typedef struct ldapcontrolW LDAPControlW
 
typedef struct ldapcontrolWPLDAPControlW
 
typedef struct WLDAP32_ldapvlvinfo WLDAP32_LDAPVLVInfo
 
typedef struct WLDAP32_ldapvlvinfoWLDAP32_PLDAPVLVInfo
 
typedef struct ldapsearch LDAPSearch
 
typedef struct ldapsearch * PLDAPSearch
 
typedef struct ldapsortkeyA LDAPSortKeyA
 
typedef struct ldapsortkeyAPLDAPSortKeyA
 
typedef struct ldapsortkeyW LDAPSortKeyW
 
typedef struct ldapsortkeyWPLDAPSortKeyW
 
typedef struct ldapapiinfoA LDAPAPIInfoA
 
typedef struct ldapapiinfoW LDAPAPIInfoW
 
typedef struct ldap_apifeature_infoA LDAPAPIFeatureInfoA
 
typedef struct ldap_apifeature_infoW LDAPAPIFeatureInfoW
 

Enumerations

enum  LDAP_RETCODE {
  WLDAP32_LDAP_SUCCESS = 0x00 , WLDAP32_LDAP_UNWILLING_TO_PERFORM = 0x35 , WLDAP32_LDAP_SERVER_DOWN = 0x51 , WLDAP32_LDAP_LOCAL_ERROR = 0x52 ,
  WLDAP32_LDAP_ENCODING_ERROR = 0x53 , WLDAP32_LDAP_DECODING_ERROR = 0x54 , WLDAP32_LDAP_TIMEOUT = 0x55 , WLDAP32_LDAP_AUTH_UNKNOWN = 0x56 ,
  WLDAP32_LDAP_FILTER_ERROR = 0x57 , WLDAP32_LDAP_USER_CANCELLED = 0x58 , WLDAP32_LDAP_PARAM_ERROR = 0x59 , WLDAP32_LDAP_NO_MEMORY = 0x5a ,
  WLDAP32_LDAP_CONNECT_ERROR = 0x5b , WLDAP32_LDAP_NOT_SUPPORTED = 0x5c , WLDAP32_LDAP_NO_RESULTS_RETURNED = 0x5e , WLDAP32_LDAP_CONTROL_NOT_FOUND = 0x5d ,
  WLDAP32_LDAP_MORE_RESULTS_TO_RETURN = 0x5f , WLDAP32_LDAP_CLIENT_LOOP = 0x60 , WLDAP32_LDAP_REFERRAL_LIMIT_EXCEEDED = 0x61
}
 

Functions

WLDAP32_LDAP *CDECL cldap_openA (PCHAR, ULONG)
 
WLDAP32_LDAP *CDECL cldap_openW (PWCHAR, ULONG)
 
ULONG CDECL WLDAP32_ldap_abandon (WLDAP32_LDAP *, ULONG)
 
ULONG CDECL ldap_addA (WLDAP32_LDAP *, PCHAR, LDAPModA *[])
 
ULONG CDECL ldap_addW (WLDAP32_LDAP *, PWCHAR, LDAPModW *[])
 
ULONG CDECL ldap_add_extA (WLDAP32_LDAP *, PCHAR, LDAPModA *[], PLDAPControlA *, PLDAPControlA *, ULONG *)
 
ULONG CDECL ldap_add_extW (WLDAP32_LDAP *, PWCHAR, LDAPModW *[], PLDAPControlW *, PLDAPControlW *, ULONG *)
 
ULONG CDECL ldap_add_ext_sA (WLDAP32_LDAP *, PCHAR, LDAPModA *[], PLDAPControlA *, PLDAPControlA *)
 
ULONG CDECL ldap_add_ext_sW (WLDAP32_LDAP *, PWCHAR, LDAPModW *[], PLDAPControlW *, PLDAPControlW *)
 
ULONG CDECL ldap_add_sA (WLDAP32_LDAP *, PCHAR, LDAPModA *[])
 
ULONG CDECL ldap_add_sW (WLDAP32_LDAP *, PWCHAR, LDAPModW *[])
 
ULONG CDECL ldap_bindA (WLDAP32_LDAP *, PCHAR, PCHAR, ULONG)
 
ULONG CDECL ldap_bindW (WLDAP32_LDAP *, PWCHAR, PWCHAR, ULONG)
 
ULONG CDECL ldap_bind_sA (WLDAP32_LDAP *, PCHAR, PCHAR, ULONG)
 
ULONG CDECL ldap_bind_sW (WLDAP32_LDAP *, PWCHAR, PWCHAR, ULONG)
 
ULONG CDECL ldap_check_filterA (WLDAP32_LDAP *, PCHAR)
 
ULONG CDECL ldap_check_filterW (WLDAP32_LDAP *, PWCHAR)
 
ULONG CDECL ldap_cleanup (HANDLE)
 
ULONG CDECL ldap_close_extended_op (WLDAP32_LDAP *, ULONG)
 
ULONG CDECL ldap_compareA (WLDAP32_LDAP *, PCHAR, PCHAR, PCHAR)
 
ULONG CDECL ldap_compareW (WLDAP32_LDAP *, PWCHAR, PWCHAR, PWCHAR)
 
ULONG CDECL ldap_compare_extA (WLDAP32_LDAP *, PCHAR, PCHAR, PCHAR, struct WLDAP32_berval *, PLDAPControlA *, PLDAPControlA *, ULONG *)
 
ULONG CDECL ldap_compare_extW (WLDAP32_LDAP *, PWCHAR, PWCHAR, PWCHAR, struct WLDAP32_berval *, PLDAPControlW *, PLDAPControlW *, ULONG *)
 
ULONG CDECL ldap_compare_ext_sA (WLDAP32_LDAP *, PCHAR, PCHAR, PCHAR, struct WLDAP32_berval *, PLDAPControlA *, PLDAPControlA *)
 
ULONG CDECL ldap_compare_ext_sW (WLDAP32_LDAP *, PWCHAR, PWCHAR, PWCHAR, struct WLDAP32_berval *, PLDAPControlW *, PLDAPControlW *)
 
ULONG CDECL ldap_compare_sA (WLDAP32_LDAP *, PCHAR, PCHAR, PCHAR)
 
ULONG CDECL ldap_compare_sW (WLDAP32_LDAP *, PWCHAR, PWCHAR, PWCHAR)
 
ULONG CDECL ldap_connect (WLDAP32_LDAP *, LDAP_TIMEVAL *)
 
WLDAP32_LDAP *CDECL ldap_conn_from_msg (WLDAP32_LDAP *, WLDAP32_LDAPMessage *)
 
ULONG CDECL ldap_control_freeA (LDAPControlA *)
 
ULONG CDECL ldap_control_freeW (LDAPControlW *)
 
ULONG CDECL ldap_controls_freeA (LDAPControlA **)
 
ULONG CDECL ldap_controls_freeW (LDAPControlW **)
 
ULONG CDECL WLDAP32_ldap_count_entries (WLDAP32_LDAP *, WLDAP32_LDAPMessage *)
 
ULONG CDECL WLDAP32_ldap_count_references (WLDAP32_LDAP *, WLDAP32_LDAPMessage *)
 
ULONG CDECL ldap_count_valuesA (PCHAR *)
 
ULONG CDECL ldap_count_valuesW (PWCHAR *)
 
ULONG CDECL WLDAP32_ldap_count_values_len (PBERVAL *)
 
ULONG CDECL ldap_create_page_controlA (WLDAP32_PLDAP, ULONG, struct WLDAP32_berval *, UCHAR, PLDAPControlA *)
 
ULONG CDECL ldap_create_page_controlW (WLDAP32_PLDAP, ULONG, struct WLDAP32_berval *, UCHAR, PLDAPControlW *)
 
ULONG CDECL ldap_create_sort_controlA (WLDAP32_PLDAP, PLDAPSortKeyA *, UCHAR, PLDAPControlA *)
 
ULONG CDECL ldap_create_sort_controlW (WLDAP32_PLDAP, PLDAPSortKeyW *, UCHAR, PLDAPControlW *)
 
INT CDECL ldap_create_vlv_controlA (WLDAP32_LDAP *, WLDAP32_LDAPVLVInfo *, UCHAR, LDAPControlA **)
 
INT CDECL ldap_create_vlv_controlW (WLDAP32_LDAP *, WLDAP32_LDAPVLVInfo *, UCHAR, LDAPControlW **)
 
ULONG CDECL ldap_deleteA (WLDAP32_LDAP *, PCHAR)
 
ULONG CDECL ldap_deleteW (WLDAP32_LDAP *, PWCHAR)
 
ULONG CDECL ldap_delete_extA (WLDAP32_LDAP *, PCHAR, PLDAPControlA *, PLDAPControlA *, ULONG *)
 
ULONG CDECL ldap_delete_extW (WLDAP32_LDAP *, PWCHAR, PLDAPControlW *, PLDAPControlW *, ULONG *)
 
ULONG CDECL ldap_delete_ext_sA (WLDAP32_LDAP *, PCHAR, PLDAPControlA *, PLDAPControlA *)
 
ULONG CDECL ldap_delete_ext_sW (WLDAP32_LDAP *, PWCHAR, PLDAPControlW *, PLDAPControlW *)
 
ULONG CDECL ldap_delete_sA (WLDAP32_LDAP *, PCHAR)
 
ULONG CDECL ldap_delete_sW (WLDAP32_LDAP *, PWCHAR)
 
PCHAR CDECL ldap_dn2ufnA (PCHAR)
 
PWCHAR CDECL ldap_dn2ufnW (PWCHAR)
 
ULONG CDECL ldap_encode_sort_controlA (WLDAP32_PLDAP, PLDAPSortKeyA *, PLDAPControlA, BOOLEAN)
 
ULONG CDECL ldap_encode_sort_controlW (WLDAP32_PLDAP, PLDAPSortKeyW *, PLDAPControlW, BOOLEAN)
 
PCHAR CDECL ldap_err2stringA (ULONG)
 
PWCHAR CDECL ldap_err2stringW (ULONG)
 
ULONG CDECL ldap_escape_filter_elementA (PCHAR, ULONG, PCHAR, ULONG)
 
ULONG CDECL ldap_escape_filter_elementW (PCHAR, ULONG, PWCHAR, ULONG)
 
PCHAR *CDECL ldap_explode_dnA (PCHAR, ULONG)
 
PWCHAR *CDECL ldap_explode_dnW (PWCHAR, ULONG)
 
ULONG CDECL ldap_extended_operationA (WLDAP32_LDAP *, PCHAR, struct WLDAP32_berval *, PLDAPControlA *, PLDAPControlA *, ULONG *)
 
ULONG CDECL ldap_extended_operationW (WLDAP32_LDAP *, PWCHAR, struct WLDAP32_berval *, PLDAPControlW *, PLDAPControlW *, ULONG *)
 
ULONG CDECL ldap_extended_operation_sA (WLDAP32_LDAP *, PCHAR, struct WLDAP32_berval *, PLDAPControlA *, PLDAPControlA *, PCHAR *, struct WLDAP32_berval **)
 
ULONG CDECL ldap_extended_operation_sW (WLDAP32_LDAP *, PWCHAR, struct WLDAP32_berval *, PLDAPControlW *, PLDAPControlW *, PWCHAR *, struct WLDAP32_berval **)
 
PCHAR CDECL ldap_first_attributeA (WLDAP32_LDAP *, WLDAP32_LDAPMessage *, WLDAP32_BerElement **)
 
PWCHAR CDECL ldap_first_attributeW (WLDAP32_LDAP *, WLDAP32_LDAPMessage *, WLDAP32_BerElement **)
 
WLDAP32_LDAPMessage *CDECL WLDAP32_ldap_first_entry (WLDAP32_LDAP *, WLDAP32_LDAPMessage *)
 
WLDAP32_LDAPMessage *CDECL WLDAP32_ldap_first_reference (WLDAP32_LDAP *, WLDAP32_LDAPMessage *)
 
ULONG CDECL ldap_free_controlsA (LDAPControlA **)
 
ULONG CDECL ldap_free_controlsW (LDAPControlW **)
 
PCHAR CDECL ldap_get_dnA (WLDAP32_LDAP *, WLDAP32_LDAPMessage *)
 
PWCHAR CDECL ldap_get_dnW (WLDAP32_LDAP *, WLDAP32_LDAPMessage *)
 
ULONG CDECL ldap_get_next_page (WLDAP32_LDAP *, PLDAPSearch, ULONG, ULONG *)
 
ULONG CDECL ldap_get_next_page_s (WLDAP32_LDAP *, PLDAPSearch, struct l_timeval *, ULONG, ULONG *, WLDAP32_LDAPMessage **)
 
ULONG CDECL ldap_get_optionA (WLDAP32_LDAP *, int, void *)
 
ULONG CDECL ldap_get_optionW (WLDAP32_LDAP *, int, void *)
 
ULONG CDECL ldap_get_paged_count (WLDAP32_LDAP *, PLDAPSearch, ULONG *, WLDAP32_LDAPMessage *)
 
PCHAR *CDECL ldap_get_valuesA (WLDAP32_LDAP *, WLDAP32_LDAPMessage *, PCHAR)
 
PWCHAR *CDECL ldap_get_valuesW (WLDAP32_LDAP *, WLDAP32_LDAPMessage *, PWCHAR)
 
PBERVAL *CDECL ldap_get_values_lenA (WLDAP32_LDAP *, WLDAP32_LDAPMessage *, PCHAR)
 
PBERVAL *CDECL ldap_get_values_lenW (WLDAP32_LDAP *, WLDAP32_LDAPMessage *, PWCHAR)
 
WLDAP32_LDAP *CDECL ldap_initA (const PCHAR, ULONG)
 
WLDAP32_LDAP *CDECL ldap_initW (const PWCHAR, ULONG)
 
void CDECL ldap_memfreeA (PCHAR)
 
void CDECL ldap_memfreeW (PWCHAR)
 
ULONG CDECL ldap_modifyA (WLDAP32_LDAP *, PCHAR, LDAPModA *[])
 
ULONG CDECL ldap_modifyW (WLDAP32_LDAP *, PWCHAR, LDAPModW *[])
 
ULONG CDECL ldap_modify_extA (WLDAP32_LDAP *, PCHAR, LDAPModA *[], PLDAPControlA *, PLDAPControlA *, ULONG *)
 
ULONG CDECL ldap_modify_extW (WLDAP32_LDAP *, PWCHAR, LDAPModW *[], PLDAPControlW *, PLDAPControlW *, ULONG *)
 
ULONG CDECL ldap_modify_ext_sA (WLDAP32_LDAP *, PCHAR, LDAPModA *[], PLDAPControlA *, PLDAPControlA *)
 
ULONG CDECL ldap_modify_ext_sW (WLDAP32_LDAP *, PWCHAR, LDAPModW *[], PLDAPControlW *, PLDAPControlW *)
 
ULONG CDECL ldap_modify_sA (WLDAP32_LDAP *, PCHAR, LDAPModA *[])
 
ULONG CDECL ldap_modify_sW (WLDAP32_LDAP *, PWCHAR, LDAPModW *[])
 
ULONG CDECL ldap_modrdnA (WLDAP32_LDAP *, PCHAR, PCHAR)
 
ULONG CDECL ldap_modrdnW (WLDAP32_LDAP *, PWCHAR, PWCHAR)
 
ULONG CDECL ldap_modrdn2A (WLDAP32_LDAP *, PCHAR, PCHAR, INT)
 
ULONG CDECL ldap_modrdn2W (WLDAP32_LDAP *, PWCHAR, PWCHAR, INT)
 
ULONG CDECL ldap_modrdn2_sA (WLDAP32_LDAP *, PCHAR, PCHAR, INT)
 
ULONG CDECL ldap_modrdn2_sW (WLDAP32_LDAP *, PWCHAR, PWCHAR, INT)
 
ULONG CDECL ldap_modrdn_sA (WLDAP32_LDAP *, PCHAR, PCHAR)
 
ULONG CDECL ldap_modrdn_sW (WLDAP32_LDAP *, PWCHAR, PWCHAR)
 
ULONG CDECL WLDAP32_ldap_msgfree (WLDAP32_LDAPMessage *)
 
PCHAR CDECL ldap_next_attributeA (WLDAP32_LDAP *, WLDAP32_LDAPMessage *, WLDAP32_BerElement *)
 
PWCHAR CDECL ldap_next_attributeW (WLDAP32_LDAP *, WLDAP32_LDAPMessage *, WLDAP32_BerElement *)
 
WLDAP32_LDAPMessage *CDECL WLDAP32_ldap_next_entry (WLDAP32_LDAP *, WLDAP32_LDAPMessage *)
 
WLDAP32_LDAPMessage *CDECL WLDAP32_ldap_next_reference (WLDAP32_LDAP *, WLDAP32_LDAPMessage *)
 
WLDAP32_LDAP *CDECL ldap_openA (PCHAR, ULONG)
 
WLDAP32_LDAP *CDECL ldap_openW (PWCHAR, ULONG)
 
ULONG CDECL ldap_parse_extended_resultA (WLDAP32_LDAP *, WLDAP32_LDAPMessage *, PCHAR *, struct WLDAP32_berval **, BOOLEAN)
 
ULONG CDECL ldap_parse_extended_resultW (WLDAP32_LDAP *, WLDAP32_LDAPMessage *, PWCHAR *, struct WLDAP32_berval **, BOOLEAN)
 
ULONG CDECL ldap_parse_page_controlA (WLDAP32_LDAP *, PLDAPControlA *, ULONG *, struct WLDAP32_berval **)
 
ULONG CDECL ldap_parse_page_controlW (WLDAP32_LDAP *, PLDAPControlW *, ULONG *, struct WLDAP32_berval **)
 
ULONG CDECL ldap_parse_referenceA (WLDAP32_LDAP *, WLDAP32_LDAPMessage *, PCHAR **)
 
ULONG CDECL ldap_parse_referenceW (WLDAP32_LDAP *, WLDAP32_LDAPMessage *, PWCHAR **)
 
ULONG CDECL ldap_parse_resultA (WLDAP32_LDAP *, WLDAP32_LDAPMessage *, ULONG *, PCHAR *, PCHAR *, PCHAR **, PLDAPControlA **, BOOLEAN)
 
ULONG CDECL ldap_parse_resultW (WLDAP32_LDAP *, WLDAP32_LDAPMessage *, ULONG *, PWCHAR *, PWCHAR *, PWCHAR **, PLDAPControlW **, BOOLEAN)
 
ULONG CDECL ldap_parse_sort_controlA (WLDAP32_LDAP *, PLDAPControlA *, ULONG *, PCHAR *)
 
ULONG CDECL ldap_parse_sort_controlW (WLDAP32_LDAP *, PLDAPControlW *, ULONG *, PWCHAR *)
 
int CDECL ldap_parse_vlv_controlA (WLDAP32_LDAP *, LDAPControlA **, ULONG *, ULONG *, struct WLDAP32_berval **, INT *)
 
int CDECL ldap_parse_vlv_controlW (WLDAP32_LDAP *, LDAPControlW **, ULONG *, ULONG *, struct WLDAP32_berval **, INT *)
 
void CDECL WLDAP32_ldap_perror (WLDAP32_LDAP *, const PCHAR)
 
ULONG CDECL ldap_rename_extA (WLDAP32_LDAP *, PCHAR, PCHAR, PCHAR, INT, PLDAPControlA *, PLDAPControlA *, ULONG *)
 
ULONG CDECL ldap_rename_extW (WLDAP32_LDAP *, PWCHAR, PWCHAR, PWCHAR, INT, PLDAPControlW *, PLDAPControlW *, ULONG *)
 
ULONG CDECL ldap_rename_ext_sA (WLDAP32_LDAP *, PCHAR, PCHAR, PCHAR, INT, PLDAPControlA *, PLDAPControlA *)
 
ULONG CDECL ldap_rename_ext_sW (WLDAP32_LDAP *, PWCHAR, PWCHAR, PWCHAR, INT, PLDAPControlW *, PLDAPControlW *)
 
ULONG CDECL WLDAP32_ldap_result (WLDAP32_LDAP *, ULONG, ULONG, struct l_timeval *, WLDAP32_LDAPMessage **)
 
ULONG CDECL WLDAP32_ldap_result2error (WLDAP32_LDAP *, WLDAP32_LDAPMessage *, ULONG)
 
ULONG CDECL ldap_sasl_bindA (WLDAP32_LDAP *, const PCHAR, const PCHAR, const BERVAL *, PLDAPControlA *, PLDAPControlA *, int *)
 
ULONG CDECL ldap_sasl_bindW (WLDAP32_LDAP *, const PWCHAR, const PWCHAR, const BERVAL *, PLDAPControlW *, PLDAPControlW *, int *)
 
ULONG CDECL ldap_sasl_bind_sA (WLDAP32_LDAP *, const PCHAR, const PCHAR, const BERVAL *, PLDAPControlA *, PLDAPControlA *, PBERVAL *)
 
ULONG CDECL ldap_sasl_bind_sW (WLDAP32_LDAP *, const PWCHAR, const PWCHAR, const BERVAL *, PLDAPControlW *, PLDAPControlW *, PBERVAL *)
 
ULONG CDECL ldap_search_abandon_page (WLDAP32_PLDAP, PLDAPSearch)
 
ULONG CDECL ldap_searchA (WLDAP32_LDAP *, PCHAR, ULONG, PCHAR, PCHAR[], ULONG)
 
ULONG CDECL ldap_searchW (WLDAP32_LDAP *, PWCHAR, ULONG, PWCHAR, PWCHAR[], ULONG)
 
ULONG CDECL ldap_search_extA (WLDAP32_LDAP *, PCHAR, ULONG, PCHAR, PCHAR[], ULONG, PLDAPControlA *, PLDAPControlA *, ULONG, ULONG, ULONG *)
 
ULONG CDECL ldap_search_extW (WLDAP32_LDAP *, PWCHAR, ULONG, PWCHAR, PWCHAR[], ULONG, PLDAPControlW *, PLDAPControlW *, ULONG, ULONG, ULONG *)
 
ULONG CDECL ldap_search_ext_sA (WLDAP32_LDAP *, PCHAR, ULONG, PCHAR, PCHAR[], ULONG, PLDAPControlA *, PLDAPControlA *, struct l_timeval *, ULONG, WLDAP32_LDAPMessage **)
 
ULONG CDECL ldap_search_ext_sW (WLDAP32_LDAP *, PWCHAR, ULONG, PWCHAR, PWCHAR[], ULONG, PLDAPControlW *, PLDAPControlW *, struct l_timeval *, ULONG, WLDAP32_LDAPMessage **)
 
PLDAPSearch CDECL ldap_search_init_pageA (WLDAP32_PLDAP, PCHAR, ULONG, PCHAR, PCHAR[], ULONG, PLDAPControlA *, PLDAPControlA *, ULONG, ULONG, PLDAPSortKeyA *)
 
PLDAPSearch CDECL ldap_search_init_pageW (WLDAP32_PLDAP, PWCHAR, ULONG, PWCHAR, PWCHAR[], ULONG, PLDAPControlW *, PLDAPControlW *, ULONG, ULONG, PLDAPSortKeyW *)
 
ULONG CDECL ldap_search_sA (WLDAP32_LDAP *, PCHAR, ULONG, PCHAR, PCHAR[], ULONG, WLDAP32_LDAPMessage **)
 
ULONG CDECL ldap_search_sW (WLDAP32_LDAP *, PWCHAR, ULONG, PWCHAR, PWCHAR[], ULONG, WLDAP32_LDAPMessage **)
 
ULONG CDECL ldap_search_stA (WLDAP32_LDAP *, const PCHAR, ULONG, const PCHAR, PCHAR[], ULONG, struct l_timeval *, WLDAP32_LDAPMessage **)
 
ULONG CDECL ldap_search_stW (WLDAP32_LDAP *, const PWCHAR, ULONG, const PWCHAR, PWCHAR[], ULONG, struct l_timeval *, WLDAP32_LDAPMessage **)
 
ULONG CDECL ldap_set_optionA (WLDAP32_LDAP *, int, void *)
 
ULONG CDECL ldap_set_optionW (WLDAP32_LDAP *, int, void *)
 
ULONG CDECL ldap_simple_bindA (WLDAP32_LDAP *, PCHAR, PCHAR)
 
ULONG CDECL ldap_simple_bindW (WLDAP32_LDAP *, PWCHAR, PWCHAR)
 
ULONG CDECL ldap_simple_bind_sA (WLDAP32_LDAP *, PCHAR, PCHAR)
 
ULONG CDECL ldap_simple_bind_sW (WLDAP32_LDAP *, PWCHAR, PWCHAR)
 
WLDAP32_LDAP *CDECL ldap_sslinitA (PCHAR, ULONG, int)
 
WLDAP32_LDAP *CDECL ldap_sslinitW (PWCHAR, ULONG, int)
 
ULONG CDECL ldap_start_tls_sA (WLDAP32_PLDAP, PULONG, WLDAP32_LDAPMessage **, PLDAPControlA *, PLDAPControlA *)
 
ULONG CDECL ldap_start_tls_sW (WLDAP32_PLDAP, PULONG, WLDAP32_LDAPMessage **, PLDAPControlW *, PLDAPControlW *)
 
ULONG CDECL ldap_startup (PLDAP_VERSION_INFO, HANDLE *)
 
BOOLEAN CDECL ldap_stop_tls_s (WLDAP32_PLDAP)
 
ULONG CDECL ldap_ufn2dnA (PCHAR, PCHAR *)
 
ULONG CDECL ldap_ufn2dnW (PWCHAR, PWCHAR *)
 
ULONG CDECL WLDAP32_ldap_unbind (WLDAP32_LDAP *)
 
ULONG CDECL WLDAP32_ldap_unbind_s (WLDAP32_LDAP *)
 
ULONG CDECL ldap_value_freeA (PCHAR *)
 
ULONG CDECL ldap_value_freeW (PWCHAR *)
 
ULONG CDECL WLDAP32_ldap_value_free_len (struct WLDAP32_berval **)
 
ULONG CDECL LdapGetLastError (void)
 
ULONG CDECL LdapMapErrorToWin32 (ULONG)
 
int CDECL LdapUnicodeToUTF8 (LPCWSTR, int, LPSTR, int)
 
int CDECL LdapUTF8ToUnicode (LPCSTR, int, LPWSTR, int)
 

Variables

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}
 
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}
 
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}
 

Macro Definition Documentation

◆ LAPI_MAJOR_VER1

#define LAPI_MAJOR_VER1   1

Definition at line 177 of file winldap_private.h.

◆ LAPI_MINOR_VER1

#define LAPI_MINOR_VER1   1

Definition at line 178 of file winldap_private.h.

◆ LDAP_CONTROL_VLVRESPONSE

#define LDAP_CONTROL_VLVRESPONSE   "2.16.840.1.113730.3.4.10"

Definition at line 195 of file winldap_private.h.

◆ LDAP_PAGED_RESULT_OID_STRING

#define LDAP_PAGED_RESULT_OID_STRING   "1.2.840.113556.1.4.319"

Definition at line 193 of file winldap_private.h.

◆ LDAP_SERVER_RESP_SORT_OID

#define LDAP_SERVER_RESP_SORT_OID   "1.2.840.113556.1.4.474"

Definition at line 194 of file winldap_private.h.

◆ WLDAP32_LDAP_OPT_API_FEATURE_INFO

#define WLDAP32_LDAP_OPT_API_FEATURE_INFO   0x15

Definition at line 74 of file winldap_private.h.

◆ WLDAP32_LDAP_OPT_API_INFO

#define WLDAP32_LDAP_OPT_API_INFO   0x00

Definition at line 55 of file winldap_private.h.

◆ WLDAP32_LDAP_OPT_AREC_EXCLUSIVE

#define WLDAP32_LDAP_OPT_AREC_EXCLUSIVE   0x98

Definition at line 102 of file winldap_private.h.

◆ WLDAP32_LDAP_OPT_AUTO_RECONNECT

#define WLDAP32_LDAP_OPT_AUTO_RECONNECT   0x91

Definition at line 93 of file winldap_private.h.

◆ WLDAP32_LDAP_OPT_CACHE_ENABLE

#define WLDAP32_LDAP_OPT_CACHE_ENABLE   0x0f

Definition at line 69 of file winldap_private.h.

◆ WLDAP32_LDAP_OPT_CACHE_FN_PTRS

#define WLDAP32_LDAP_OPT_CACHE_FN_PTRS   0x0d

Definition at line 67 of file winldap_private.h.

◆ WLDAP32_LDAP_OPT_CACHE_STRATEGY

#define WLDAP32_LDAP_OPT_CACHE_STRATEGY   0x0e

Definition at line 68 of file winldap_private.h.

◆ WLDAP32_LDAP_OPT_CLIENT_CERTIFICATE

#define WLDAP32_LDAP_OPT_CLIENT_CERTIFICATE   0x80

Definition at line 91 of file winldap_private.h.

◆ WLDAP32_LDAP_OPT_DEREF

#define WLDAP32_LDAP_OPT_DEREF   0x02

Definition at line 57 of file winldap_private.h.

◆ WLDAP32_LDAP_OPT_DESC

#define WLDAP32_LDAP_OPT_DESC   0x01

Definition at line 56 of file winldap_private.h.

◆ WLDAP32_LDAP_OPT_DNSDOMAIN_NAME

#define WLDAP32_LDAP_OPT_DNSDOMAIN_NAME   0x3b

Definition at line 83 of file winldap_private.h.

◆ WLDAP32_LDAP_OPT_ENCRYPT

#define WLDAP32_LDAP_OPT_ENCRYPT   0x96

Definition at line 100 of file winldap_private.h.

◆ WLDAP32_LDAP_OPT_ERROR_NUMBER

#define WLDAP32_LDAP_OPT_ERROR_NUMBER   0x31

Definition at line 76 of file winldap_private.h.

◆ WLDAP32_LDAP_OPT_ERROR_STRING

#define WLDAP32_LDAP_OPT_ERROR_STRING   0x32

Definition at line 77 of file winldap_private.h.

◆ WLDAP32_LDAP_OPT_FAST_CONCURRENT_BIND

#define WLDAP32_LDAP_OPT_FAST_CONCURRENT_BIND   0x41

Definition at line 88 of file winldap_private.h.

◆ WLDAP32_LDAP_OPT_GETDSNAME_FLAGS

#define WLDAP32_LDAP_OPT_GETDSNAME_FLAGS   0x3d

Definition at line 84 of file winldap_private.h.

◆ WLDAP32_LDAP_OPT_HOST_NAME

#define WLDAP32_LDAP_OPT_HOST_NAME   0x30

Definition at line 75 of file winldap_private.h.

◆ WLDAP32_LDAP_OPT_HOST_REACHABLE

#define WLDAP32_LDAP_OPT_HOST_REACHABLE   0x3e

Definition at line 85 of file winldap_private.h.

◆ WLDAP32_LDAP_OPT_IO_FN_PTRS

#define WLDAP32_LDAP_OPT_IO_FN_PTRS   0x0b

Definition at line 66 of file winldap_private.h.

◆ WLDAP32_LDAP_OPT_PING_KEEP_ALIVE

#define WLDAP32_LDAP_OPT_PING_KEEP_ALIVE   0x36

Definition at line 80 of file winldap_private.h.

◆ WLDAP32_LDAP_OPT_PING_LIMIT

#define WLDAP32_LDAP_OPT_PING_LIMIT   0x38

Definition at line 82 of file winldap_private.h.

◆ WLDAP32_LDAP_OPT_PING_WAIT_TIME

#define WLDAP32_LDAP_OPT_PING_WAIT_TIME   0x37

Definition at line 81 of file winldap_private.h.

◆ WLDAP32_LDAP_OPT_PROMPT_CREDENTIALS

#define WLDAP32_LDAP_OPT_PROMPT_CREDENTIALS   0x3f

Definition at line 86 of file winldap_private.h.

◆ WLDAP32_LDAP_OPT_PROTOCOL_VERSION

#define WLDAP32_LDAP_OPT_PROTOCOL_VERSION   WLDAP32_LDAP_OPT_VERSION

Definition at line 72 of file winldap_private.h.

◆ WLDAP32_LDAP_OPT_REBIND_ARG

#define WLDAP32_LDAP_OPT_REBIND_ARG   0x07

Definition at line 62 of file winldap_private.h.

◆ WLDAP32_LDAP_OPT_REBIND_FN

#define WLDAP32_LDAP_OPT_REBIND_FN   0x06

Definition at line 61 of file winldap_private.h.

◆ WLDAP32_LDAP_OPT_REF_DEREF_CONN_PER_MSG

#define WLDAP32_LDAP_OPT_REF_DEREF_CONN_PER_MSG   0x94

Definition at line 96 of file winldap_private.h.

◆ WLDAP32_LDAP_OPT_REFERRAL_CALLBACK

#define WLDAP32_LDAP_OPT_REFERRAL_CALLBACK   0x70

Definition at line 90 of file winldap_private.h.

◆ WLDAP32_LDAP_OPT_REFERRAL_HOP_LIMIT

#define WLDAP32_LDAP_OPT_REFERRAL_HOP_LIMIT   0x10

Definition at line 70 of file winldap_private.h.

◆ WLDAP32_LDAP_OPT_REFERRALS

#define WLDAP32_LDAP_OPT_REFERRALS   0x08

Definition at line 63 of file winldap_private.h.

◆ WLDAP32_LDAP_OPT_RESTART

#define WLDAP32_LDAP_OPT_RESTART   0x09

Definition at line 64 of file winldap_private.h.

◆ WLDAP32_LDAP_OPT_ROOTDSE_CACHE

#define WLDAP32_LDAP_OPT_ROOTDSE_CACHE   0x9a

Definition at line 104 of file winldap_private.h.

◆ WLDAP32_LDAP_OPT_SASL_METHOD

#define WLDAP32_LDAP_OPT_SASL_METHOD   0x97

Definition at line 101 of file winldap_private.h.

◆ WLDAP32_LDAP_OPT_SECURITY_CONTEXT

#define WLDAP32_LDAP_OPT_SECURITY_CONTEXT   0x99

Definition at line 103 of file winldap_private.h.

◆ WLDAP32_LDAP_OPT_SEND_TIMEOUT

#define WLDAP32_LDAP_OPT_SEND_TIMEOUT   0x42

Definition at line 89 of file winldap_private.h.

◆ WLDAP32_LDAP_OPT_SERVER_CERTIFICATE

#define WLDAP32_LDAP_OPT_SERVER_CERTIFICATE   0x81

Definition at line 92 of file winldap_private.h.

◆ WLDAP32_LDAP_OPT_SERVER_CONTROLS

#define WLDAP32_LDAP_OPT_SERVER_CONTROLS   0x12

Definition at line 73 of file winldap_private.h.

◆ WLDAP32_LDAP_OPT_SERVER_ERROR

#define WLDAP32_LDAP_OPT_SERVER_ERROR   0x33

Definition at line 78 of file winldap_private.h.

◆ WLDAP32_LDAP_OPT_SERVER_EXT_ERROR

#define WLDAP32_LDAP_OPT_SERVER_EXT_ERROR   0x34

Definition at line 79 of file winldap_private.h.

◆ WLDAP32_LDAP_OPT_SIGN

#define WLDAP32_LDAP_OPT_SIGN   0x95

Definition at line 99 of file winldap_private.h.

◆ WLDAP32_LDAP_OPT_SIZELIMIT

#define WLDAP32_LDAP_OPT_SIZELIMIT   0x03

Definition at line 58 of file winldap_private.h.

◆ WLDAP32_LDAP_OPT_SSL

#define WLDAP32_LDAP_OPT_SSL   0x0a

Definition at line 65 of file winldap_private.h.

◆ WLDAP32_LDAP_OPT_SSL_INFO

#define WLDAP32_LDAP_OPT_SSL_INFO   0x93

Definition at line 95 of file winldap_private.h.

◆ WLDAP32_LDAP_OPT_SSPI_FLAGS

#define WLDAP32_LDAP_OPT_SSPI_FLAGS   0x92

Definition at line 94 of file winldap_private.h.

◆ WLDAP32_LDAP_OPT_TCP_KEEPALIVE

#define WLDAP32_LDAP_OPT_TCP_KEEPALIVE   0x40

Definition at line 87 of file winldap_private.h.

◆ WLDAP32_LDAP_OPT_THREAD_FN_PTRS

#define WLDAP32_LDAP_OPT_THREAD_FN_PTRS   0x05

Definition at line 60 of file winldap_private.h.

◆ WLDAP32_LDAP_OPT_TIMELIMIT

#define WLDAP32_LDAP_OPT_TIMELIMIT   0x04

Definition at line 59 of file winldap_private.h.

◆ WLDAP32_LDAP_OPT_TLS

#define WLDAP32_LDAP_OPT_TLS   WLDAP32_LDAP_OPT_SSL

Definition at line 97 of file winldap_private.h.

◆ WLDAP32_LDAP_OPT_TLS_INFO

#define WLDAP32_LDAP_OPT_TLS_INFO   WLDAP32_LDAP_OPT_SSL_INFO

Definition at line 98 of file winldap_private.h.

◆ WLDAP32_LDAP_OPT_VERSION

#define WLDAP32_LDAP_OPT_VERSION   0x11

Definition at line 71 of file winldap_private.h.

Typedef Documentation

◆ BERVAL

◆ LDAP_BERVAL

◆ LDAP_TIMEVAL

◆ LDAP_VERSION_INFO

◆ LDAPAPIFeatureInfoA

◆ LDAPAPIFeatureInfoW

◆ LDAPAPIInfoA

◆ LDAPAPIInfoW

◆ LDAPControlA

◆ LDAPControlW

◆ LDAPModA

◆ LDAPModW

◆ LDAPSearch

typedef struct ldapsearch LDAPSearch

Definition at line 233 of file winldap_private.h.

◆ LDAPSortKeyA

◆ LDAPSortKeyW

◆ PBERVAL

◆ PLDAP_BERVAL

◆ PLDAP_TIMEVAL

◆ PLDAP_VERSION_INFO

◆ PLDAPControlA

◆ PLDAPControlW

◆ PLDAPModA

◆ PLDAPModW

◆ PLDAPSearch

typedef struct ldapsearch * PLDAPSearch

Definition at line 233 of file winldap_private.h.

◆ PLDAPSortKeyA

◆ PLDAPSortKeyW

◆ WLDAP32_BerElement

◆ WLDAP32_BerValue

◆ WLDAP32_LDAP

◆ WLDAP32_LDAPMessage

◆ WLDAP32_LDAPVLVInfo

◆ WLDAP32_PLDAP

◆ WLDAP32_PLDAPMessage

◆ WLDAP32_PLDAPVLVInfo

Enumeration Type Documentation

◆ LDAP_RETCODE

Enumerator
WLDAP32_LDAP_SUCCESS 
WLDAP32_LDAP_UNWILLING_TO_PERFORM 
WLDAP32_LDAP_SERVER_DOWN 
WLDAP32_LDAP_LOCAL_ERROR 
WLDAP32_LDAP_ENCODING_ERROR 
WLDAP32_LDAP_DECODING_ERROR 
WLDAP32_LDAP_TIMEOUT 
WLDAP32_LDAP_AUTH_UNKNOWN 
WLDAP32_LDAP_FILTER_ERROR 
WLDAP32_LDAP_USER_CANCELLED 
WLDAP32_LDAP_PARAM_ERROR 
WLDAP32_LDAP_NO_MEMORY 
WLDAP32_LDAP_CONNECT_ERROR 
WLDAP32_LDAP_NOT_SUPPORTED 
WLDAP32_LDAP_NO_RESULTS_RETURNED 
WLDAP32_LDAP_CONTROL_NOT_FOUND 
WLDAP32_LDAP_MORE_RESULTS_TO_RETURN 
WLDAP32_LDAP_CLIENT_LOOP 
WLDAP32_LDAP_REFERRAL_LIMIT_EXCEEDED 

Definition at line 27 of file winldap_private.h.

27 {
45
LDAP_RETCODE
@ WLDAP32_LDAP_USER_CANCELLED
@ WLDAP32_LDAP_DECODING_ERROR
@ WLDAP32_LDAP_MORE_RESULTS_TO_RETURN
@ WLDAP32_LDAP_AUTH_UNKNOWN
@ WLDAP32_LDAP_LOCAL_ERROR
@ WLDAP32_LDAP_UNWILLING_TO_PERFORM
@ WLDAP32_LDAP_PARAM_ERROR
@ WLDAP32_LDAP_ENCODING_ERROR
@ WLDAP32_LDAP_NOT_SUPPORTED
@ WLDAP32_LDAP_NO_RESULTS_RETURNED
@ WLDAP32_LDAP_SUCCESS
@ WLDAP32_LDAP_NO_MEMORY
@ WLDAP32_LDAP_REFERRAL_LIMIT_EXCEEDED
@ WLDAP32_LDAP_CLIENT_LOOP
@ WLDAP32_LDAP_FILTER_ERROR
@ WLDAP32_LDAP_SERVER_DOWN
@ WLDAP32_LDAP_TIMEOUT
@ WLDAP32_LDAP_CONTROL_NOT_FOUND
@ WLDAP32_LDAP_CONNECT_ERROR

Function Documentation

◆ cldap_openA()

WLDAP32_LDAP *CDECL cldap_openA ( PCHAR  hostname,
ULONG  portnumber 
)

Definition at line 223 of file init.c.

224{
225#ifdef HAVE_LDAP
226 WLDAP32_LDAP *ld = NULL;
227 WCHAR *hostnameW = NULL;
228
229 TRACE( "(%s, %d)\n", debugstr_a(hostname), portnumber );
230
231 if (hostname) {
232 hostnameW = strAtoW( hostname );
233 if (!hostnameW) goto exit;
234 }
235
236 ld = cldap_openW( hostnameW, portnumber );
237
238exit:
239 strfreeW( hostnameW );
240 return ld;
241
242#else
243 return NULL;
244#endif
245}
char * hostname
Definition: ftp.c:88
#define NULL
Definition: types.h:112
WLDAP32_LDAP *CDECL cldap_openW(PWCHAR hostname, ULONG portnumber)
Definition: init.c:268
static LPWSTR strAtoW(const char *str)
#define debugstr_a
Definition: kernel32.h:31
#define exit(n)
Definition: config.h:202
#define TRACE(s)
Definition: solgame.cpp:4
static void strfreeW(LPWSTR str)
Definition: wldap32.h:103
__wchar_t WCHAR
Definition: xmlstorage.h:180

◆ cldap_openW()

WLDAP32_LDAP *CDECL cldap_openW ( PWCHAR  hostname,
ULONG  portnumber 
)

Definition at line 268 of file init.c.

269{
270#ifdef HAVE_LDAP
271 LDAP *ld = NULL;
272 char *hostnameU = NULL, *url = NULL;
273
274 TRACE( "(%s, %d)\n", debugstr_w(hostname), portnumber );
275
276 if (hostname) {
277 hostnameU = strWtoU( hostname );
278 if (!hostnameU) goto exit;
279 }
280 else {
281 hostnameU = strWtoU( defaulthost );
282 if (!hostnameU) goto exit;
283 }
284
285 url = urlify_hostnames( "cldap://", hostnameU, portnumber );
286 if (!url) goto exit;
287
288 ld = create_context( url );
289
290exit:
291 strfreeU( hostnameU );
292 strfreeU( url );
293 return ld;
294
295#else
296 return NULL;
297#endif
298}
#define debugstr_w
Definition: kernel32.h:32
static const WCHAR url[]
Definition: encode.c:1432
static void strfreeU(char *str)
Definition: wldap32.h:108
static char * strWtoU(LPCWSTR str)
Definition: wldap32.h:74

◆ ldap_add_ext_sA()

ULONG CDECL ldap_add_ext_sA ( WLDAP32_LDAP ld,
PCHAR  dn,
LDAPModA attrs[],
PLDAPControlA serverctrls,
PLDAPControlA clientctrls 
)

Definition at line 263 of file add.c.

265{
267#ifdef HAVE_LDAP
268 WCHAR *dnW = NULL;
269 LDAPModW **attrsW = NULL;
270 LDAPControlW **serverctrlsW = NULL, **clientctrlsW = NULL;
271
273
274 TRACE( "(%p, %s, %p, %p, %p)\n", ld, debugstr_a(dn), attrs,
275 serverctrls, clientctrls );
276
277 if (!ld) return WLDAP32_LDAP_PARAM_ERROR;
278
279 if (dn) {
280 dnW = strAtoW( dn );
281 if (!dnW) goto exit;
282 }
283 if (attrs) {
284 attrsW = modarrayAtoW( attrs );
285 if (!attrsW) goto exit;
286 }
287 if (serverctrls) {
288 serverctrlsW = controlarrayAtoW( serverctrls );
289 if (!serverctrlsW) goto exit;
290 }
291 if (clientctrls) {
292 clientctrlsW = controlarrayAtoW( clientctrls );
293 if (!clientctrlsW) goto exit;
294 }
295
296 ret = ldap_add_ext_sW( ld, dnW, attrsW, serverctrlsW, clientctrlsW );
297
298exit:
299 strfreeW( dnW );
300 modarrayfreeW( attrsW );
301 controlarrayfreeW( serverctrlsW );
302 controlarrayfreeW( clientctrlsW );
303
304#endif
305 return ret;
306}
ULONG CDECL ldap_add_ext_sW(WLDAP32_LDAP *ld, PWCHAR dn, LDAPModW *attrs[], PLDAPControlW *serverctrls, PLDAPControlW *clientctrls)
Definition: add.c:329
uint32_t ULONG
Definition: typedefs.h:59
int ret

◆ ldap_add_ext_sW()

ULONG CDECL ldap_add_ext_sW ( WLDAP32_LDAP ld,
PWCHAR  dn,
LDAPModW attrs[],
PLDAPControlW serverctrls,
PLDAPControlW clientctrls 
)

Definition at line 329 of file add.c.

331{
333#ifdef HAVE_LDAP
334 char *dnU = NULL;
335 LDAPMod **attrsU = NULL;
336 LDAPControl **serverctrlsU = NULL, **clientctrlsU = NULL;
337
339
340 TRACE( "(%p, %s, %p, %p, %p)\n", ld, debugstr_w(dn), attrs,
341 serverctrls, clientctrls );
342
343 if (!ld) return WLDAP32_LDAP_PARAM_ERROR;
344
345 if (dn) {
346 dnU = strWtoU( dn );
347 if (!dnU) goto exit;
348 }
349 if (attrs) {
350 attrsU = modarrayWtoU( attrs );
351 if (!attrsU) goto exit;
352 }
353 if (serverctrls) {
354 serverctrlsU = controlarrayWtoU( serverctrls );
355 if (!serverctrlsU) goto exit;
356 }
357 if (clientctrls) {
358 clientctrlsU = controlarrayWtoU( clientctrls );
359 if (!clientctrlsU) goto exit;
360 }
361
362 ret = map_error( ldap_add_ext_s( ld, dn ? dnU : "", attrs ? attrsU : nullattrs,
363 serverctrlsU, clientctrlsU ));
364
365exit:
366 strfreeU( dnU );
367 modarrayfreeU( attrsU );
368 controlarrayfreeU( serverctrlsU );
369 controlarrayfreeU( clientctrlsU );
370
371#endif
372 return ret;
373}
static UINT map_error(DWORD error)
Definition: service.c:35
#define LDAPControl
Definition: winldap.h:620
#define LDAPMod
Definition: winldap.h:622
#define ldap_add_ext_s
Definition: winldap.h:646

◆ ldap_add_extA()

ULONG CDECL ldap_add_extA ( WLDAP32_LDAP ld,
PCHAR  dn,
LDAPModA attrs[],
PLDAPControlA serverctrls,
PLDAPControlA clientctrls,
ULONG message 
)

Definition at line 143 of file add.c.

145{
147#ifdef HAVE_LDAP
148 WCHAR *dnW = NULL;
149 LDAPModW **attrsW = NULL;
150 LDAPControlW **serverctrlsW = NULL, **clientctrlsW = NULL;
151
153
154 TRACE( "(%p, %s, %p, %p, %p, %p)\n", ld, debugstr_a(dn), attrs,
155 serverctrls, clientctrls, message );
156
157 if (!ld) return WLDAP32_LDAP_PARAM_ERROR;
158
159 if (dn) {
160 dnW = strAtoW( dn );
161 if (!dnW) goto exit;
162 }
163 if (attrs) {
164 attrsW = modarrayAtoW( attrs );
165 if (!attrsW) goto exit;
166 }
167 if (serverctrls) {
168 serverctrlsW = controlarrayAtoW( serverctrls );
169 if (!serverctrlsW) goto exit;
170 }
171 if (clientctrls) {
172 clientctrlsW = controlarrayAtoW( clientctrls );
173 if (!clientctrlsW) goto exit;
174 }
175
176 ret = ldap_add_extW( ld, dnW, attrsW, serverctrlsW, clientctrlsW, message );
177
178exit:
179 strfreeW( dnW );
180 modarrayfreeW( attrsW );
181 controlarrayfreeW( serverctrlsW );
182 controlarrayfreeW( clientctrlsW );
183
184#endif
185 return ret;
186}
ULONG CDECL ldap_add_extW(WLDAP32_LDAP *ld, PWCHAR dn, LDAPModW *attrs[], PLDAPControlW *serverctrls, PLDAPControlW *clientctrls, ULONG *message)
Definition: add.c:211
Definition: tftpd.h:60

◆ ldap_add_extW()

ULONG CDECL ldap_add_extW ( WLDAP32_LDAP ld,
PWCHAR  dn,
LDAPModW attrs[],
PLDAPControlW serverctrls,
PLDAPControlW clientctrls,
ULONG message 
)

Definition at line 211 of file add.c.

213{
215#ifdef HAVE_LDAP
216 char *dnU = NULL;
217 LDAPMod **attrsU = NULL;
218 LDAPControl **serverctrlsU = NULL, **clientctrlsU = NULL;
219 int dummy;
220
222
223 TRACE( "(%p, %s, %p, %p, %p, %p)\n", ld, debugstr_w(dn), attrs,
224 serverctrls, clientctrls, message );
225
226 if (!ld) return WLDAP32_LDAP_PARAM_ERROR;
227
228 if (dn) {
229 dnU = strWtoU( dn );
230 if (!dnU) goto exit;
231 }
232 if (attrs) {
233 attrsU = modarrayWtoU( attrs );
234 if (!attrsU) goto exit;
235 }
236 if (serverctrls) {
237 serverctrlsU = controlarrayWtoU( serverctrls );
238 if (!serverctrlsU) goto exit;
239 }
240 if (clientctrls) {
241 clientctrlsU = controlarrayWtoU( clientctrls );
242 if (!clientctrlsU) goto exit;
243 }
244
245 ret = map_error( ldap_add_ext( ld, dn ? dnU : "", attrs ? attrsU : nullattrs, serverctrlsU,
246 clientctrlsU, message ? (int *)message : &dummy ));
247
248exit:
249 strfreeU( dnU );
250 modarrayfreeU( attrsU );
251 controlarrayfreeU( serverctrlsU );
252 controlarrayfreeU( clientctrlsU );
253
254#endif
255 return ret;
256}
#define ldap_add_ext
Definition: winldap.h:644

◆ ldap_add_sA()

ULONG CDECL ldap_add_sA ( WLDAP32_LDAP ld,
PCHAR  dn,
LDAPModA attrs[] 
)

Definition at line 380 of file add.c.

381{
383#ifdef HAVE_LDAP
384 WCHAR *dnW = NULL;
385 LDAPModW **attrsW = NULL;
386
388
389 TRACE( "(%p, %s, %p)\n", ld, debugstr_a(dn), attrs );
390
391 if (!ld) return WLDAP32_LDAP_PARAM_ERROR;
392
393 if (dn) {
394 dnW = strAtoW( dn );
395 if (!dnW) goto exit;
396 }
397 if (attrs) {
398 attrsW = modarrayAtoW( attrs );
399 if (!attrsW) goto exit;
400 }
401
402 ret = ldap_add_sW( ld, dnW, attrsW );
403
404exit:
405 strfreeW( dnW );
406 modarrayfreeW( attrsW );
407
408#endif
409 return ret;
410}
ULONG CDECL ldap_add_sW(WLDAP32_LDAP *ld, PWCHAR dn, LDAPModW *attrs[])
Definition: add.c:427

◆ ldap_add_sW()

ULONG CDECL ldap_add_sW ( WLDAP32_LDAP ld,
PWCHAR  dn,
LDAPModW attrs[] 
)

Definition at line 427 of file add.c.

428{
430#ifdef HAVE_LDAP
431 char *dnU = NULL;
432 LDAPMod **attrsU = NULL;
433
435
436 TRACE( "(%p, %s, %p)\n", ld, debugstr_w(dn), attrs );
437
438 if (!ld) return WLDAP32_LDAP_PARAM_ERROR;
439
440 if (dn) {
441 dnU = strWtoU( dn );
442 if (!dnU) goto exit;
443 }
444 if (attrs) {
445 attrsU = modarrayWtoU( attrs );
446 if (!attrsU) goto exit;
447 }
448
449 ret = map_error( ldap_add_ext_s( ld, dn ? dnU : "", attrs ? attrsU : nullattrs, NULL, NULL ));
450
451exit:
452 strfreeU( dnU );
453 modarrayfreeU( attrsU );
454
455#endif
456 return ret;
457}

◆ ldap_addA()

ULONG CDECL ldap_addA ( WLDAP32_LDAP ld,
PCHAR  dn,
LDAPModA attrs[] 
)

Definition at line 48 of file add.c.

49{
51#ifdef HAVE_LDAP
52 WCHAR *dnW = NULL;
53 LDAPModW **attrsW = NULL;
54
56
57 TRACE( "(%p, %s, %p)\n", ld, debugstr_a(dn), attrs );
58
59 if (!ld) return ~0u;
60
61 if (dn) {
62 dnW = strAtoW( dn );
63 if (!dnW) goto exit;
64 }
65 if (attrs) {
66 attrsW = modarrayAtoW( attrs );
67 if (!attrsW) goto exit;
68 }
69
70 ret = ldap_addW( ld, dnW, attrsW );
71
72exit:
73 strfreeW( dnW );
74 modarrayfreeW( attrsW );
75
76#endif
77 return ret;
78}
ULONG CDECL ldap_addW(WLDAP32_LDAP *ld, PWCHAR dn, LDAPModW *attrs[])
Definition: add.c:100
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble * u
Definition: glfuncs.h:240

◆ ldap_addW()

ULONG CDECL ldap_addW ( WLDAP32_LDAP ld,
PWCHAR  dn,
LDAPModW attrs[] 
)

Definition at line 100 of file add.c.

101{
103#ifdef HAVE_LDAP
104 char *dnU = NULL;
105 LDAPMod **attrsU = NULL;
106 int msg;
107
109
110 TRACE( "(%p, %s, %p)\n", ld, debugstr_w(dn), attrs );
111
112 if (!ld) return WLDAP32_LDAP_PARAM_ERROR;
113
114 if (dn) {
115 dnU = strWtoU( dn );
116 if (!dnU) goto exit;
117 }
118 if (attrs) {
119 attrsU = modarrayWtoU( attrs );
120 if (!attrsU) goto exit;
121 }
122
123 ret = ldap_add_ext( ld, dn ? dnU : "", attrs ? attrsU : nullattrs, NULL, NULL, &msg );
124
125 if (ret == LDAP_SUCCESS)
126 ret = msg;
127 else
128 ret = ~0u;
129
130exit:
131 strfreeU( dnU );
132 modarrayfreeU( attrsU );
133
134#endif
135 return ret;
136}
#define msg(x)
Definition: auth_time.c:54
#define LDAP_SUCCESS
Definition: winldap.h:59

◆ ldap_bind_sA()

ULONG CDECL ldap_bind_sA ( WLDAP32_LDAP ld,
PCHAR  dn,
PCHAR  cred,
ULONG  method 
)

Definition at line 140 of file bind.c.

141{
143#ifdef HAVE_LDAP
144 WCHAR *dnW = NULL, *credW = NULL;
145
147
148 TRACE( "(%p, %s, %p, 0x%08x)\n", ld, debugstr_a(dn), cred, method );
149
150 if (!ld) return WLDAP32_LDAP_PARAM_ERROR;
151
152 if (dn) {
153 dnW = strAtoW( dn );
154 if (!dnW) goto exit;
155 }
156 if (cred) {
157 credW = strAtoW( cred );
158 if (!credW) goto exit;
159 }
160
161 ret = ldap_bind_sW( ld, dnW, credW, method );
162
163exit:
164 strfreeW( dnW );
165 strfreeW( credW );
166
167#endif
168 return ret;
169}
ULONG CDECL ldap_bind_sW(WLDAP32_LDAP *ld, PWCHAR dn, PWCHAR cred, ULONG method)
Definition: bind.c:186
method
Definition: dragdrop.c:54

◆ ldap_bind_sW()

ULONG CDECL ldap_bind_sW ( WLDAP32_LDAP ld,
PWCHAR  dn,
PWCHAR  cred,
ULONG  method 
)

Definition at line 186 of file bind.c.

187{
189#ifdef HAVE_LDAP
190 char *dnU = NULL, *credU = NULL;
191 struct berval pwd = { 0, NULL };
192
194
195 TRACE( "(%p, %s, %p, 0x%08x)\n", ld, debugstr_w(dn), cred, method );
196
197 if (!ld) return WLDAP32_LDAP_PARAM_ERROR;
199
200 if (dn) {
201 dnU = strWtoU( dn );
202 if (!dnU) goto exit;
203 }
204 if (cred) {
205 credU = strWtoU( cred );
206 if (!credU) goto exit;
207
208 pwd.bv_len = strlen( credU );
209 pwd.bv_val = credU;
210 }
211
212 ret = map_error( ldap_sasl_bind_s( ld, dnU, LDAP_SASL_SIMPLE, &pwd, NULL, NULL, NULL ));
213
214exit:
215 strfreeU( dnU );
216 strfreeU( credU );
217
218#endif
219 return ret;
220}
ACPI_SIZE strlen(const char *String)
Definition: utclib.c:269
void pwd(int argc, const char *argv[])
Definition: cmds.c:1401
Definition: winber.h:32
#define ldap_sasl_bind_s
Definition: winldap.h:637
#define LDAP_AUTH_SIMPLE
Definition: winldap.h:224

Referenced by ldap_bind_sA().

◆ ldap_bindA()

ULONG CDECL ldap_bindA ( WLDAP32_LDAP ld,
PCHAR  dn,
PCHAR  cred,
ULONG  method 
)

Definition at line 44 of file bind.c.

45{
47#ifdef HAVE_LDAP
48 WCHAR *dnW = NULL, *credW = NULL;
49
51
52 TRACE( "(%p, %s, %p, 0x%08x)\n", ld, debugstr_a(dn), cred, method );
53
54 if (!ld) return ~0u;
55
56 if (dn) {
57 dnW = strAtoW( dn );
58 if (!dnW) goto exit;
59 }
60 if (cred) {
61 credW = strAtoW( cred );
62 if (!credW) goto exit;
63 }
64
65 ret = ldap_bindW( ld, dnW, credW, method );
66
67exit:
68 strfreeW( dnW );
69 strfreeW( credW );
70
71#endif
72 return ret;
73}
ULONG CDECL ldap_bindW(WLDAP32_LDAP *ld, PWCHAR dn, PWCHAR cred, ULONG method)
Definition: bind.c:93

◆ ldap_bindW()

ULONG CDECL ldap_bindW ( WLDAP32_LDAP ld,
PWCHAR  dn,
PWCHAR  cred,
ULONG  method 
)

Definition at line 93 of file bind.c.

94{
96#ifdef HAVE_LDAP
97 char *dnU = NULL, *credU = NULL;
98 struct berval pwd = { 0, NULL };
99 int msg;
100
102
103 TRACE( "(%p, %s, %p, 0x%08x)\n", ld, debugstr_w(dn), cred, method );
104
105 if (!ld) return ~0u;
107
108 if (dn) {
109 dnU = strWtoU( dn );
110 if (!dnU) goto exit;
111 }
112 if (cred) {
113 credU = strWtoU( cred );
114 if (!credU) goto exit;
115
116 pwd.bv_len = strlen( credU );
117 pwd.bv_val = credU;
118 }
119
120 ret = ldap_sasl_bind( ld, dnU, LDAP_SASL_SIMPLE, &pwd, NULL, NULL, &msg );
121
122 if (ret == LDAP_SUCCESS)
123 ret = msg;
124 else
125 ret = ~0u;
126
127exit:
128 strfreeU( dnU );
129 strfreeU( credU );
130
131#endif
132 return ret;
133}
#define ldap_sasl_bind
Definition: winldap.h:636

Referenced by ldap_bindA().

◆ ldap_check_filterA()

ULONG CDECL ldap_check_filterA ( WLDAP32_LDAP ld,
PCHAR  filter 
)

Definition at line 72 of file misc.c.

73{
74 ULONG ret;
75 WCHAR *filterW = NULL;
76
77 TRACE( "(%p, %s)\n", ld, debugstr_a(filter) );
78
79 if (!ld) return WLDAP32_LDAP_PARAM_ERROR;
80
81 if (filter) {
82 filterW = strAtoW( filter );
83 if (!filterW) return WLDAP32_LDAP_NO_MEMORY;
84 }
85
86 ret = ldap_check_filterW( ld, filterW );
87
88 strfreeW( filterW );
89 return ret;
90}
ULONG CDECL ldap_check_filterW(WLDAP32_LDAP *ld, PWCHAR filter)
Definition: misc.c:105
GLint GLint GLint GLint GLint GLint GLint GLbitfield GLenum filter
Definition: glext.h:7005

◆ ldap_check_filterW()

ULONG CDECL ldap_check_filterW ( WLDAP32_LDAP ld,
PWCHAR  filter 
)

Definition at line 105 of file misc.c.

106{
107 TRACE( "(%p, %s)\n", ld, debugstr_w(filter) );
108
109 if (!ld) return WLDAP32_LDAP_PARAM_ERROR;
110 return WLDAP32_LDAP_SUCCESS; /* FIXME: do some checks */
111}

◆ ldap_cleanup()

ULONG CDECL ldap_cleanup ( HANDLE  instance)

Definition at line 116 of file misc.c.

117{
118 TRACE( "(%p)\n", instance );
120}
static HINSTANCE instance
Definition: main.c:40

◆ ldap_close_extended_op()

ULONG CDECL ldap_close_extended_op ( WLDAP32_LDAP ld,
ULONG  msgid 
)

Definition at line 56 of file extended.c.

57{
58 TRACE( "(%p, 0x%08x)\n", ld, msgid );
59
60 if (!ld) return WLDAP32_LDAP_PARAM_ERROR;
62}

◆ ldap_compare_ext_sA()

ULONG CDECL ldap_compare_ext_sA ( WLDAP32_LDAP ld,
PCHAR  dn,
PCHAR  attr,
PCHAR  value,
struct WLDAP32_berval data,
PLDAPControlA serverctrls,
PLDAPControlA clientctrls 
)

Definition at line 288 of file compare.c.

290{
292#ifdef HAVE_LDAP
293 WCHAR *dnW = NULL, *attrW = NULL, *valueW = NULL;
294 LDAPControlW **serverctrlsW = NULL, **clientctrlsW = NULL;
295
297
298 TRACE( "(%p, %s, %s, %s, %p, %p, %p)\n", ld, debugstr_a(dn),
299 debugstr_a(attr), debugstr_a(value), data, serverctrls,
300 clientctrls );
301
302 if (!ld) return WLDAP32_LDAP_PARAM_ERROR;
303
304 if (dn) {
305 dnW = strAtoW( dn );
306 if (!dnW) goto exit;
307 }
308 if (attr) {
309 attrW = strAtoW( attr );
310 if (!attrW) goto exit;
311 }
312 if (value) {
313 valueW = strAtoW( value );
314 if (!valueW) goto exit;
315 }
316 if (serverctrls) {
317 serverctrlsW = controlarrayAtoW( serverctrls );
318 if (!serverctrlsW) goto exit;
319 }
320 if (clientctrls) {
321 clientctrlsW = controlarrayAtoW( clientctrls );
322 if (!clientctrlsW) goto exit;
323 }
324
325 ret = ldap_compare_ext_sW( ld, dnW, attrW, valueW, data, serverctrlsW,
326 clientctrlsW );
327
328exit:
329 strfreeW( dnW );
330 strfreeW( attrW );
331 strfreeW( valueW );
332 controlarrayfreeW( serverctrlsW );
333 controlarrayfreeW( clientctrlsW );
334
335#endif
336 return ret;
337}
ULONG CDECL ldap_compare_ext_sW(WLDAP32_LDAP *ld, PWCHAR dn, PWCHAR attr, PWCHAR value, struct WLDAP32_berval *data, PLDAPControlW *serverctrls, PLDAPControlW *clientctrls)
Definition: compare.c:362
static const WCHAR valueW[]
Definition: object.c:48
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
Definition: cookie.c:202
Definition: pdh_main.c:94

◆ ldap_compare_ext_sW()

ULONG CDECL ldap_compare_ext_sW ( WLDAP32_LDAP ld,
PWCHAR  dn,
PWCHAR  attr,
PWCHAR  value,
struct WLDAP32_berval data,
PLDAPControlW serverctrls,
PLDAPControlW clientctrls 
)

Definition at line 362 of file compare.c.

364{
366#ifdef HAVE_LDAP
367 char *dnU = NULL, *attrU = NULL, *valueU = NULL;
368 LDAPControl **serverctrlsU = NULL, **clientctrlsU = NULL;
369 struct berval val = { 0, NULL };
370
372
373 TRACE( "(%p, %s, %s, %s, %p, %p, %p)\n", ld, debugstr_w(dn),
374 debugstr_w(attr), debugstr_w(value), data, serverctrls,
375 clientctrls );
376
377 if (!ld) return WLDAP32_LDAP_PARAM_ERROR;
378
379 if (dn) {
380 dnU = strWtoU( dn );
381 if (!dnU) goto exit;
382 }
383 if (attr) {
384 attrU = strWtoU( attr );
385 if (!attrU) goto exit;
386 }
387 if (!data) {
388 if (value) {
389 valueU = strWtoU( value );
390 if (!valueU) goto exit;
391
392 val.bv_len = strlen( valueU );
393 val.bv_val = valueU;
394 }
395 }
396 if (serverctrls) {
397 serverctrlsU = controlarrayWtoU( serverctrls );
398 if (!serverctrlsU) goto exit;
399 }
400 if (clientctrls) {
401 clientctrlsU = controlarrayWtoU( clientctrls );
402 if (!clientctrlsU) goto exit;
403 }
404
405 ret = map_error( ldap_compare_ext_s( ld, dn ? dnU : "", attr ? attrU : "",
406 data ? (struct berval *)data : &val,
407 serverctrlsU, clientctrlsU ));
408
409exit:
410 strfreeU( dnU );
411 strfreeU( attrU );
412 strfreeU( valueU );
413 controlarrayfreeU( serverctrlsU );
414 controlarrayfreeU( clientctrlsU );
415
416#endif
417 return ret;
418}
GLuint GLfloat * val
Definition: glext.h:7180
#define ldap_compare_ext_s
Definition: winldap.h:650

Referenced by ldap_compare_ext_sA().

◆ ldap_compare_extA()

ULONG CDECL ldap_compare_extA ( WLDAP32_LDAP ld,
PCHAR  dn,
PCHAR  attr,
PCHAR  value,
struct WLDAP32_berval data,
PLDAPControlA serverctrls,
PLDAPControlA clientctrls,
ULONG message 
)

Definition at line 148 of file compare.c.

151{
153#ifdef HAVE_LDAP
154 WCHAR *dnW = NULL, *attrW = NULL, *valueW = NULL;
155 LDAPControlW **serverctrlsW = NULL, **clientctrlsW = NULL;
156
158
159 TRACE( "(%p, %s, %s, %s, %p, %p, %p, %p)\n", ld, debugstr_a(dn),
160 debugstr_a(attr), debugstr_a(value), data, serverctrls,
161 clientctrls, message );
162
163 if (!ld || !message) return WLDAP32_LDAP_PARAM_ERROR;
164
165 if (dn) {
166 dnW = strAtoW( dn );
167 if (!dnW) goto exit;
168 }
169 if (attr) {
170 attrW = strAtoW( attr );
171 if (!attrW) goto exit;
172 }
173 if (value) {
174 valueW = strAtoW( value );
175 if (!valueW) goto exit;
176 }
177 if (serverctrls) {
178 serverctrlsW = controlarrayAtoW( serverctrls );
179 if (!serverctrlsW) goto exit;
180 }
181 if (clientctrls) {
182 clientctrlsW = controlarrayAtoW( clientctrls );
183 if (!clientctrlsW) goto exit;
184 }
185
186 ret = ldap_compare_extW( ld, dnW, attrW, valueW, data,
187 serverctrlsW, clientctrlsW, message );
188
189exit:
190 strfreeW( dnW );
191 strfreeW( attrW );
192 strfreeW( valueW );
193 controlarrayfreeW( serverctrlsW );
194 controlarrayfreeW( clientctrlsW );
195
196#endif
197 return ret;
198}
ULONG CDECL ldap_compare_extW(WLDAP32_LDAP *ld, PWCHAR dn, PWCHAR attr, PWCHAR value, struct WLDAP32_berval *data, PLDAPControlW *serverctrls, PLDAPControlW *clientctrls, ULONG *message)
Definition: compare.c:224

◆ ldap_compare_extW()

ULONG CDECL ldap_compare_extW ( WLDAP32_LDAP ld,
PWCHAR  dn,
PWCHAR  attr,
PWCHAR  value,
struct WLDAP32_berval data,
PLDAPControlW serverctrls,
PLDAPControlW clientctrls,
ULONG message 
)

Definition at line 224 of file compare.c.

227{
229#ifdef HAVE_LDAP
230 char *dnU = NULL, *attrU = NULL, *valueU = NULL;
231 LDAPControl **serverctrlsU = NULL, **clientctrlsU = NULL;
232 struct berval val = { 0, NULL };
233
235
236 TRACE( "(%p, %s, %s, %s, %p, %p, %p, %p)\n", ld, debugstr_w(dn),
237 debugstr_w(attr), debugstr_w(value), data, serverctrls,
238 clientctrls, message );
239
240 if (!ld || !message) return WLDAP32_LDAP_PARAM_ERROR;
241 if (!attr) return WLDAP32_LDAP_NO_MEMORY;
242
243 if (dn) {
244 dnU = strWtoU( dn );
245 if (!dnU) goto exit;
246 }
247
248 attrU = strWtoU( attr );
249 if (!attrU) goto exit;
250
251 if (!data) {
252 if (value) {
253 valueU = strWtoU( value );
254 if (!valueU) goto exit;
255
256 val.bv_len = strlen( valueU );
257 val.bv_val = valueU;
258 }
259 }
260 if (serverctrls) {
261 serverctrlsU = controlarrayWtoU( serverctrls );
262 if (!serverctrlsU) goto exit;
263 }
264 if (clientctrls) {
265 clientctrlsU = controlarrayWtoU( clientctrls );
266 if (!clientctrlsU) goto exit;
267 }
268
269 ret = map_error( ldap_compare_ext( ld, dn ? dnU : "", attrU, data ? (struct berval *)data : &val,
270 serverctrlsU, clientctrlsU, (int *)message ));
271
272exit:
273 strfreeU( dnU );
274 strfreeU( attrU );
275 strfreeU( valueU );
276 controlarrayfreeU( serverctrlsU );
277 controlarrayfreeU( clientctrlsU );
278
279#endif
280 return ret;
281}
#define ldap_compare_ext
Definition: winldap.h:648

Referenced by ldap_compare_extA().

◆ ldap_compare_sA()

ULONG CDECL ldap_compare_sA ( WLDAP32_LDAP ld,
PCHAR  dn,
PCHAR  attr,
PCHAR  value 
)

Definition at line 425 of file compare.c.

426{
428#ifdef HAVE_LDAP
429 WCHAR *dnW = NULL, *attrW = NULL, *valueW = NULL;
430
432
433 TRACE( "(%p, %s, %s, %s)\n", ld, debugstr_a(dn), debugstr_a(attr),
434 debugstr_a(value) );
435
436 if (!ld) return WLDAP32_LDAP_PARAM_ERROR;
437
438 if (dn) {
439 dnW = strAtoW( dn );
440 if (!dnW) goto exit;
441 }
442 if (attr) {
443 attrW = strAtoW( attr );
444 if (!attrW) goto exit;
445 }
446 if (value) {
447 valueW = strAtoW( value );
448 if (!valueW) goto exit;
449 }
450
451 ret = ldap_compare_sW( ld, dnW, attrW, valueW );
452
453exit:
454 strfreeW( dnW );
455 strfreeW( attrW );
456 strfreeW( valueW );
457
458#endif
459 return ret;
460}
ULONG CDECL ldap_compare_sW(WLDAP32_LDAP *ld, PWCHAR dn, PWCHAR attr, PWCHAR value)
Definition: compare.c:477

◆ ldap_compare_sW()

ULONG CDECL ldap_compare_sW ( WLDAP32_LDAP ld,
PWCHAR  dn,
PWCHAR  attr,
PWCHAR  value 
)

Definition at line 477 of file compare.c.

478{
480#ifdef HAVE_LDAP
481 char *dnU = NULL, *attrU = NULL, *valueU = NULL;
482 struct berval val = { 0, NULL };
483
485
486 TRACE( "(%p, %s, %s, %s)\n", ld, debugstr_w(dn), debugstr_w(attr),
487 debugstr_w(value) );
488
489 if (!ld) return WLDAP32_LDAP_PARAM_ERROR;
490
491 if (dn) {
492 dnU = strWtoU( dn );
493 if (!dnU) goto exit;
494 }
495 if (attr) {
496 attrU = strWtoU( attr );
497 if (!attrU) goto exit;
498 }
499 if (value) {
500 valueU = strWtoU( value );
501 if (!valueU) goto exit;
502
503 val.bv_len = strlen( valueU );
504 val.bv_val = valueU;
505 }
506
507 ret = map_error( ldap_compare_ext_s( ld, dn ? dnU : "", attr ? attrU : "", &val, NULL, NULL ));
508
509exit:
510 strfreeU( dnU );
511 strfreeU( attrU );
512 strfreeU( valueU );
513
514#endif
515 return ret;
516}

◆ ldap_compareA()

ULONG CDECL ldap_compareA ( WLDAP32_LDAP ld,
PCHAR  dn,
PCHAR  attr,
PCHAR  value 
)

Definition at line 44 of file compare.c.

45{
47#ifdef HAVE_LDAP
48 WCHAR *dnW = NULL, *attrW = NULL, *valueW = NULL;
49
50 ret = ~0u;
51
52 TRACE( "(%p, %s, %s, %s)\n", ld, debugstr_a(dn), debugstr_a(attr),
54
55 if (!ld || !attr) return ~0u;
56
57 if (dn) {
58 dnW = strAtoW( dn );
59 if (!dnW) goto exit;
60 }
61
62 attrW = strAtoW( attr );
63 if (!attrW) goto exit;
64
65 if (value) {
66 valueW = strAtoW( value );
67 if (!valueW) goto exit;
68 }
69
70 ret = ldap_compareW( ld, dnW, attrW, valueW );
71
72exit:
73 strfreeW( dnW );
74 strfreeW( attrW );
76
77#endif
78 return ret;
79}
ULONG CDECL ldap_compareW(WLDAP32_LDAP *ld, PWCHAR dn, PWCHAR attr, PWCHAR value)
Definition: compare.c:96

◆ ldap_compareW()

ULONG CDECL ldap_compareW ( WLDAP32_LDAP ld,
PWCHAR  dn,
PWCHAR  attr,
PWCHAR  value 
)

Definition at line 96 of file compare.c.

97{
99#ifdef HAVE_LDAP
100 char *dnU = NULL, *attrU = NULL, *valueU = NULL;
101 struct berval val = { 0, NULL };
102 int msg;
103
104 ret = ~0u;
105
106 TRACE( "(%p, %s, %s, %s)\n", ld, debugstr_w(dn), debugstr_w(attr),
107 debugstr_w(value) );
108
109 if (!ld || !attr) return ~0u;
110
111 if (dn) {
112 dnU = strWtoU( dn );
113 if (!dnU) goto exit;
114 }
115
116 attrU = strWtoU( attr );
117 if (!attrU) goto exit;
118
119 if (value) {
120 valueU = strWtoU( value );
121 if (!valueU) goto exit;
122
123 val.bv_len = strlen( valueU );
124 val.bv_val = valueU;
125 }
126
127 ret = ldap_compare_ext( ld, dn ? dnU : "", attrU, &val, NULL, NULL, &msg );
128
129 if (ret == LDAP_SUCCESS)
130 ret = msg;
131 else
132 ret = ~0u;
133
134exit:
135 strfreeU( dnU );
136 strfreeU( attrU );
137 strfreeU( valueU );
138
139#endif
140 return ret;
141}

◆ ldap_conn_from_msg()

WLDAP32_LDAP *CDECL ldap_conn_from_msg ( WLDAP32_LDAP ld,
WLDAP32_LDAPMessage res 
)

Definition at line 135 of file misc.c.

136{
137 TRACE( "(%p, %p)\n", ld, res );
138
139 if (!ld || !res) return NULL;
140 return ld; /* FIXME: not always correct */
141}
GLuint res
Definition: glext.h:9613

◆ ldap_connect()

ULONG CDECL ldap_connect ( WLDAP32_LDAP ld,
LDAP_TIMEVAL timeout 
)

Definition at line 318 of file init.c.

319{
320 TRACE( "(%p, %p)\n", ld, timeout );
321
322 if (!ld) return WLDAP32_LDAP_PARAM_ERROR;
323 return WLDAP32_LDAP_SUCCESS; /* FIXME: do something, e.g. ping the host */
324}
Definition: dhcpd.h:245

◆ ldap_control_freeA()

ULONG CDECL ldap_control_freeA ( LDAPControlA control)

Definition at line 44 of file control.c.

45{
47#ifdef HAVE_LDAP
48
49 TRACE( "(%p)\n", control );
50 controlfreeA( control );
51
52#endif
53 return ret;
54}

◆ ldap_control_freeW()

ULONG CDECL ldap_control_freeW ( LDAPControlW control)

Definition at line 67 of file control.c.

68{
70#ifdef HAVE_LDAP
71
72 TRACE( "(%p)\n", control );
73 controlfreeW( control );
74
75#endif
76 return ret;
77}

◆ ldap_controls_freeA()

ULONG CDECL ldap_controls_freeA ( LDAPControlA **  controls)

Definition at line 84 of file control.c.

85{
87#ifdef HAVE_LDAP
88
89 TRACE( "(%p)\n", controls );
90 controlarrayfreeA( controls );
91
92#endif
93 return ret;
94}

◆ ldap_controls_freeW()

ULONG CDECL ldap_controls_freeW ( LDAPControlW **  controls)

Definition at line 107 of file control.c.

108{
110#ifdef HAVE_LDAP
111
112 TRACE( "(%p)\n", controls );
113 controlarrayfreeW( controls );
114
115#endif
116 return ret;
117}

◆ ldap_count_valuesA()

ULONG CDECL ldap_count_valuesA ( PCHAR vals)

Definition at line 72 of file value.c.

73{
75#ifdef HAVE_LDAP
76 WCHAR **valsW = NULL;
77
78 TRACE( "(%p)\n", vals );
79
80 if (!vals) return 0;
81
82 valsW = strarrayAtoW( vals );
83 if (!valsW) return WLDAP32_LDAP_NO_MEMORY;
84
85 ret = ldap_count_valuesW( valsW );
86 strarrayfreeW( valsW );
87
88#endif
89 return ret;
90}
ULONG CDECL ldap_count_valuesW(PWCHAR *vals)
Definition: value.c:108
static void strarrayfreeW(LPWSTR *strarray)
Definition: wldap32.h:224
static LPWSTR * strarrayAtoW(LPSTR *strarray)
Definition: wldap32.h:134

◆ ldap_count_valuesW()

ULONG CDECL ldap_count_valuesW ( PWCHAR vals)

Definition at line 108 of file value.c.

109{
111#ifdef HAVE_LDAP
112 WCHAR **p = vals;
113
114 TRACE( "(%p)\n", vals );
115
116 if (!vals) return 0;
117
118 ret = 0;
119 while (*p++) ret++;
120
121#endif
122 return ret;
123}
GLfloat GLfloat p
Definition: glext.h:8902

◆ ldap_create_page_controlA()

ULONG CDECL ldap_create_page_controlA ( WLDAP32_PLDAP  ,
ULONG  ,
struct WLDAP32_berval ,
UCHAR  ,
PLDAPControlA  
)

◆ ldap_create_page_controlW()

ULONG CDECL ldap_create_page_controlW ( WLDAP32_PLDAP  ,
ULONG  ,
struct WLDAP32_berval ,
UCHAR  ,
PLDAPControlW  
)

◆ ldap_create_sort_controlA()

ULONG CDECL ldap_create_sort_controlA ( WLDAP32_PLDAP  ,
PLDAPSortKeyA ,
UCHAR  ,
PLDAPControlA  
)

◆ ldap_create_sort_controlW()

ULONG CDECL ldap_create_sort_controlW ( WLDAP32_PLDAP  ,
PLDAPSortKeyW ,
UCHAR  ,
PLDAPControlW  
)

◆ ldap_create_vlv_controlA()

INT CDECL ldap_create_vlv_controlA ( WLDAP32_LDAP ld,
WLDAP32_LDAPVLVInfo info,
UCHAR  critical,
LDAPControlA **  control 
)

Definition at line 207 of file control.c.

209{
211#ifdef HAVE_LDAP
213
214 TRACE( "(%p, %p, 0x%02x, %p)\n", ld, info, critical, control );
215
216 if (!ld || !control) return ~0u;
217
218 ret = ldap_create_vlv_controlW( ld, info, critical, &controlW );
219
221 {
222 *control = controlWtoA( controlW );
223 if (!*control) ret = WLDAP32_LDAP_NO_MEMORY;
225 }
226
227#endif
228 return ret;
229}
INT CDECL ldap_create_vlv_controlW(WLDAP32_LDAP *ld, WLDAP32_LDAPVLVInfo *info, UCHAR critical, LDAPControlW **control)
Definition: control.c:253
ULONG CDECL ldap_control_freeW(LDAPControlW *control)
Definition: control.c:67
static const WCHAR controlW[]
Definition: actctx.c:658
int32_t INT
Definition: typedefs.h:58

◆ ldap_create_vlv_controlW()

INT CDECL ldap_create_vlv_controlW ( WLDAP32_LDAP ld,
WLDAP32_LDAPVLVInfo info,
UCHAR  critical,
LDAPControlW **  control 
)

Definition at line 253 of file control.c.

255{
257#ifdef HAVE_LDAP
258 LDAPControl *controlU = NULL;
259
260 TRACE( "(%p, %p, 0x%02x, %p)\n", ld, info, critical, control );
261
262 if (!ld || !control) return ~0u;
263
264 ret = map_error( ldap_create_vlv_control( ld, (LDAPVLVInfo *)info, &controlU ));
265
267 {
268 *control = controlUtoW( controlU );
269 if (!*control) ret = WLDAP32_LDAP_NO_MEMORY;
270 ldap_control_free( controlU );
271 }
272
273#endif
274 return ret;
275}
#define ldap_control_free
Definition: winldap.h:685
#define ldap_create_vlv_control
Definition: winldap.h:665

Referenced by ldap_create_vlv_controlA().

◆ ldap_delete_ext_sA()

ULONG CDECL ldap_delete_ext_sA ( WLDAP32_LDAP ld,
PCHAR  dn,
PLDAPControlA serverctrls,
PLDAPControlA clientctrls 
)

Definition at line 224 of file delete.c.

226{
228#ifdef HAVE_LDAP
229 WCHAR *dnW = NULL;
230 LDAPControlW **serverctrlsW = NULL, **clientctrlsW = NULL;
231
232 TRACE( "(%p, %s, %p, %p)\n", ld, debugstr_a(dn), serverctrls,
233 clientctrls );
234
235 if (!ld) return WLDAP32_LDAP_PARAM_ERROR;
236
237 if (dn) {
238 dnW = strAtoW( dn );
239 if (!dnW) goto exit;
240 }
241 if (serverctrls) {
242 serverctrlsW = controlarrayAtoW( serverctrls );
243 if (!serverctrlsW) goto exit;
244 }
245 if (clientctrls) {
246 clientctrlsW = controlarrayAtoW( clientctrls );
247 if (!clientctrlsW) goto exit;
248 }
249
250 ret = ldap_delete_ext_sW( ld, dnW, serverctrlsW, clientctrlsW );
251
252exit:
253 strfreeW( dnW );
254 controlarrayfreeW( serverctrlsW );
255 controlarrayfreeW( clientctrlsW );
256
257#endif
258 return ret;
259}
ULONG CDECL ldap_delete_ext_sW(WLDAP32_LDAP *ld, PWCHAR dn, PLDAPControlW *serverctrls, PLDAPControlW *clientctrls)
Definition: delete.c:280

◆ ldap_delete_ext_sW()

ULONG CDECL ldap_delete_ext_sW ( WLDAP32_LDAP ld,
PWCHAR  dn,
PLDAPControlW serverctrls,
PLDAPControlW clientctrls 
)

Definition at line 280 of file delete.c.

282{
284#ifdef HAVE_LDAP
285 char *dnU = NULL;
286 LDAPControl **serverctrlsU = NULL, **clientctrlsU = NULL;
287
288 TRACE( "(%p, %s, %p, %p)\n", ld, debugstr_w(dn), serverctrls,
289 clientctrls );
290
291 if (!ld) return WLDAP32_LDAP_PARAM_ERROR;
292
293 if (dn) {
294 dnU = strWtoU( dn );
295 if (!dnU) goto exit;
296 }
297 if (serverctrls) {
298 serverctrlsU = controlarrayWtoU( serverctrls );
299 if (!serverctrlsU) goto exit;
300 }
301 if (clientctrls) {
302 clientctrlsU = controlarrayWtoU( clientctrls );
303 if (!clientctrlsU) goto exit;
304 }
305
306 ret = map_error( ldap_delete_ext_s( ld, dn ? dnU : "", serverctrlsU, clientctrlsU ));
307
308exit:
309 strfreeU( dnU );
310 controlarrayfreeU( serverctrlsU );
311 controlarrayfreeU( clientctrlsU );
312
313#endif
314 return ret;
315}
#define ldap_delete_ext_s
Definition: winldap.h:654

◆ ldap_delete_extA()

ULONG CDECL ldap_delete_extA ( WLDAP32_LDAP ld,
PCHAR  dn,
PLDAPControlA serverctrls,
PLDAPControlA clientctrls,
ULONG message 
)

Definition at line 118 of file delete.c.

120{
122#ifdef HAVE_LDAP
123 WCHAR *dnW = NULL;
124 LDAPControlW **serverctrlsW = NULL, **clientctrlsW = NULL;
125
126 TRACE( "(%p, %s, %p, %p, %p)\n", ld, debugstr_a(dn), serverctrls,
127 clientctrls, message );
128
130
131 if (!ld) return WLDAP32_LDAP_PARAM_ERROR;
132
133 if (dn) {
134 dnW = strAtoW( dn );
135 if (!dnW) goto exit;
136 }
137 if (serverctrls) {
138 serverctrlsW = controlarrayAtoW( serverctrls );
139 if (!serverctrlsW) goto exit;
140 }
141 if (clientctrls) {
142 clientctrlsW = controlarrayAtoW( clientctrls );
143 if (!clientctrlsW) goto exit;
144 }
145
146 ret = ldap_delete_extW( ld, dnW, serverctrlsW, clientctrlsW, message );
147
148exit:
149 strfreeW( dnW );
150 controlarrayfreeW( serverctrlsW );
151 controlarrayfreeW( clientctrlsW );
152
153#endif
154 return ret;
155}
ULONG CDECL ldap_delete_extW(WLDAP32_LDAP *ld, PWCHAR dn, PLDAPControlW *serverctrls, PLDAPControlW *clientctrls, ULONG *message)
Definition: delete.c:178

◆ ldap_delete_extW()

ULONG CDECL ldap_delete_extW ( WLDAP32_LDAP ld,
PWCHAR  dn,
PLDAPControlW serverctrls,
PLDAPControlW clientctrls,
ULONG message 
)

Definition at line 178 of file delete.c.

180{
182#ifdef HAVE_LDAP
183 char *dnU = NULL;
184 LDAPControl **serverctrlsU = NULL, **clientctrlsU = NULL;
185 int dummy;
186
187 TRACE( "(%p, %s, %p, %p, %p)\n", ld, debugstr_w(dn), serverctrls,
188 clientctrls, message );
189
191
192 if (!ld) return WLDAP32_LDAP_PARAM_ERROR;
193
194 if (dn) {
195 dnU = strWtoU( dn );
196 if (!dnU) goto exit;
197 }
198 if (serverctrls) {
199 serverctrlsU = controlarrayWtoU( serverctrls );
200 if (!serverctrlsU) goto exit;
201 }
202 if (clientctrls) {
203 clientctrlsU = controlarrayWtoU( clientctrls );
204 if (!clientctrlsU) goto exit;
205 }
206
207 ret = map_error( ldap_delete_ext( ld, dn ? dnU : "", serverctrlsU, clientctrlsU,
208 message ? (int *)message : &dummy ));
209
210exit:
211 strfreeU( dnU );
212 controlarrayfreeU( serverctrlsU );
213 controlarrayfreeU( clientctrlsU );
214
215#endif
216 return ret;
217}
#define ldap_delete_ext
Definition: winldap.h:652

◆ ldap_delete_sA()

ULONG CDECL ldap_delete_sA ( WLDAP32_LDAP ld,
PCHAR  dn 
)

Definition at line 322 of file delete.c.

323{
325#ifdef HAVE_LDAP
326 WCHAR *dnW = NULL;
327
328 TRACE( "(%p, %s)\n", ld, debugstr_a(dn) );
329
330 if (!ld) return WLDAP32_LDAP_PARAM_ERROR;
331
332 if (dn) {
333 dnW = strAtoW( dn );
334 if (!dnW) return WLDAP32_LDAP_NO_MEMORY;
335 }
336
337 ret = ldap_delete_sW( ld, dnW );
338 strfreeW( dnW );
339
340#endif
341 return ret;
342}
ULONG CDECL ldap_delete_sW(WLDAP32_LDAP *ld, PWCHAR dn)
Definition: delete.c:357

◆ ldap_delete_sW()

ULONG CDECL ldap_delete_sW ( WLDAP32_LDAP ld,
PWCHAR  dn 
)

Definition at line 357 of file delete.c.

358{
360#ifdef HAVE_LDAP
361 char *dnU = NULL;
362
363 TRACE( "(%p, %s)\n", ld, debugstr_w(dn) );
364
365 if (!ld) return WLDAP32_LDAP_PARAM_ERROR;
366
367 if (dn) {
368 dnU = strWtoU( dn );
369 if (!dnU) return WLDAP32_LDAP_NO_MEMORY;
370 }
371
372 ret = map_error( ldap_delete_ext_s( ld, dn ? dnU : "", NULL, NULL ));
373 strfreeU( dnU );
374
375#endif
376 return ret;
377}

◆ ldap_deleteA()

ULONG CDECL ldap_deleteA ( WLDAP32_LDAP ld,
PCHAR  dn 
)

Definition at line 44 of file delete.c.

45{
47#ifdef HAVE_LDAP
48 WCHAR *dnW = NULL;
49
50 TRACE( "(%p, %s)\n", ld, debugstr_a(dn) );
51
52 if (!ld) return ~0u;
53
54 if (dn) {
55 dnW = strAtoW( dn );
56 if (!dnW) return WLDAP32_LDAP_NO_MEMORY;
57 }
58
59 ret = ldap_deleteW( ld, dnW );
60 strfreeW( dnW );
61
62#endif
63 return ret;
64}
ULONG CDECL ldap_deleteW(WLDAP32_LDAP *ld, PWCHAR dn)
Definition: delete.c:84

◆ ldap_deleteW()

ULONG CDECL ldap_deleteW ( WLDAP32_LDAP ld,
PWCHAR  dn 
)

Definition at line 84 of file delete.c.

85{
87#ifdef HAVE_LDAP
88 char *dnU = NULL;
89 int msg;
90
91 TRACE( "(%p, %s)\n", ld, debugstr_w(dn) );
92
93 if (!ld) return ~0u;
94
95 if (dn) {
96 dnU = strWtoU( dn );
97 if (!dnU) return WLDAP32_LDAP_NO_MEMORY;
98 }
99
100 ret = ldap_delete_ext( ld, dn ? dnU : "", NULL, NULL, &msg );
101
102 if (ret == LDAP_SUCCESS)
103 ret = msg;
104 else
105 ret = ~0u;
106
107 strfreeU( dnU );
108
109#endif
110 return ret;
111}

◆ ldap_dn2ufnA()

PCHAR CDECL ldap_dn2ufnA ( PCHAR  dn)

Definition at line 44 of file dn.c.

45{
46 PCHAR ret = NULL;
47#ifdef HAVE_LDAP
48 WCHAR *dnW, *retW;
49
50 TRACE( "(%s)\n", debugstr_a(dn) );
51
52 dnW = strAtoW( dn );
53 if (!dnW) return NULL;
54
55 retW = ldap_dn2ufnW( dnW );
56 ret = strWtoA( retW );
57
58 strfreeW( dnW );
59 ldap_memfreeW( retW );
60
61#endif
62 return ret;
63}
void CDECL ldap_memfreeW(PWCHAR block)
Definition: misc.c:421
PWCHAR CDECL ldap_dn2ufnW(PWCHAR dn)
Definition: dn.c:80
char * PCHAR
Definition: typedefs.h:51
static LPSTR strWtoA(LPCWSTR str)
Definition: wldap32.h:62

◆ ldap_dn2ufnW()

PWCHAR CDECL ldap_dn2ufnW ( PWCHAR  dn)

Definition at line 80 of file dn.c.

81{
82 PWCHAR ret = NULL;
83#ifdef HAVE_LDAP
84 char *dnU, *retU;
85
86 TRACE( "(%s)\n", debugstr_w(dn) );
87
88 dnU = strWtoU( dn );
89 if (!dnU) return NULL;
90
91 retU = ldap_dn2ufn( dnU );
92 ret = strUtoW( retU );
93
94 strfreeU( dnU );
95 ldap_memfree( retU );
96
97#endif
98 return ret;
99}
uint16_t * PWCHAR
Definition: typedefs.h:56
#define ldap_memfree
Definition: winldap.h:688
#define ldap_dn2ufn
Definition: winldap.h:690
static LPWSTR strUtoW(char *str)
Definition: wldap32.h:86

◆ ldap_encode_sort_controlA()

ULONG CDECL ldap_encode_sort_controlA ( WLDAP32_PLDAP  ,
PLDAPSortKeyA ,
PLDAPControlA  ,
BOOLEAN   
)

◆ ldap_encode_sort_controlW()

ULONG CDECL ldap_encode_sort_controlW ( WLDAP32_PLDAP  ,
PLDAPSortKeyW ,
PLDAPControlW  ,
BOOLEAN   
)

◆ ldap_err2stringA()

PCHAR CDECL ldap_err2stringA ( ULONG  err)

Definition at line 71 of file error.c.

72{
73 static char buf[256] = "";
74
75 TRACE( "(0x%08x)\n", err );
76
78 LoadStringA( hwldap32, err, buf, 256 );
79 else
81
82 return buf;
83}
HINSTANCE hwldap32
Definition: main.c:29
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
#define err(...)
int WINAPI LoadStringA(_In_opt_ HINSTANCE hInstance, _In_ UINT uID, _Out_writes_to_(cchBufferMax, return+1) LPSTR lpBuffer, _In_ int cchBufferMax)

◆ ldap_err2stringW()

PWCHAR CDECL ldap_err2stringW ( ULONG  err)

Definition at line 101 of file error.c.

102{
103 static WCHAR buf[256] = { 0 };
104
105 TRACE( "(0x%08x)\n", err );
106
108 LoadStringW( hwldap32, err, buf, 256 );
109 else
111
112 return buf;
113}
int WINAPI LoadStringW(_In_opt_ HINSTANCE hInstance, _In_ UINT uID, _Out_writes_to_(cchBufferMax, return+1) LPWSTR lpBuffer, _In_ int cchBufferMax)

◆ ldap_escape_filter_elementA()

ULONG CDECL ldap_escape_filter_elementA ( PCHAR  src,
ULONG  srclen,
PCHAR  dst,
ULONG  dstlen 
)

Definition at line 239 of file misc.c.

240{
241 ULONG len;
242
243 TRACE( "(%p, 0x%08x, %p, 0x%08x)\n", src, srclen, dst, dstlen );
244
246 if (!dst) return len;
247
248 if (!src || dstlen < len)
250 else
251 {
254 }
255}
static ULONG get_escape_size(PCHAR src, ULONG srclen)
Definition: misc.c:197
static void escape_filter_element(PCHAR src, ULONG srclen, PCHAR dst)
Definition: misc.c:216
GLenum src
Definition: glext.h:6340
GLenum GLenum dst
Definition: glext.h:6340
GLenum GLsizei len
Definition: glext.h:6722
static DWORD LPDWORD LPCSTR DWORD srclen
Definition: directory.c:52
static DWORD dstlen
Definition: directory.c:51

◆ ldap_escape_filter_elementW()

ULONG CDECL ldap_escape_filter_elementW ( PCHAR  src,
ULONG  srclen,
PWCHAR  dst,
ULONG  dstlen 
)

Definition at line 272 of file misc.c.

273{
274 ULONG len;
275
276 TRACE( "(%p, 0x%08x, %p, 0x%08x)\n", src, srclen, dst, dstlen );
277
279 if (!dst) return len;
280
281 /* no matter what you throw at it, this is what native returns */
283}

◆ ldap_explode_dnA()

PCHAR *CDECL ldap_explode_dnA ( PCHAR  dn,
ULONG  notypes 
)

Definition at line 106 of file dn.c.

107{
108 PCHAR *ret = NULL;
109#ifdef HAVE_LDAP
110 WCHAR *dnW, **retW;
111
112 TRACE( "(%s, 0x%08x)\n", debugstr_a(dn), notypes );
113
114 dnW = strAtoW( dn );
115 if (!dnW) return NULL;
116
117 retW = ldap_explode_dnW( dnW, notypes );
118 ret = strarrayWtoA( retW );
119
120 strfreeW( dnW );
121 ldap_value_freeW( retW );
122
123#endif
124 return ret;
125}
PWCHAR *CDECL ldap_explode_dnW(PWCHAR dn, ULONG notypes)
Definition: dn.c:144
ULONG CDECL ldap_value_freeW(PWCHAR *vals)
Definition: value.c:364
static LPSTR * strarrayWtoA(LPWSTR *strarray)
Definition: wldap32.h:154

◆ ldap_explode_dnW()

PWCHAR *CDECL ldap_explode_dnW ( PWCHAR  dn,
ULONG  notypes 
)

Definition at line 144 of file dn.c.

145{
146 PWCHAR *ret = NULL;
147#ifdef HAVE_LDAP
148 char *dnU, **retU;
149
150 TRACE( "(%s, 0x%08x)\n", debugstr_w(dn), notypes );
151
152 dnU = strWtoU( dn );
153 if (!dnU) return NULL;
154
155 retU = ldap_explode_dn( dnU, notypes );
156 ret = strarrayUtoW( retU );
157
158 strfreeU( dnU );
159 ldap_memvfree( (void **)retU );
160
161#endif
162 return ret;
163}
#define ldap_explode_dn
Definition: winldap.h:692
static LPWSTR * strarrayUtoW(char **strarray)
Definition: wldap32.h:194

◆ ldap_extended_operation_sA()

ULONG CDECL ldap_extended_operation_sA ( WLDAP32_LDAP ld,
PCHAR  oid,
struct WLDAP32_berval data,
PLDAPControlA serverctrls,
PLDAPControlA clientctrls,
PCHAR retoid,
struct WLDAP32_berval **  retdata 
)

Definition at line 178 of file extended.c.

181{
183#ifdef HAVE_LDAP
184 WCHAR *oidW = NULL, *retoidW = NULL;
185 LDAPControlW **serverctrlsW = NULL, **clientctrlsW = NULL;
186
188
189 TRACE( "(%p, %s, %p, %p, %p, %p, %p)\n", ld, debugstr_a(oid), data, serverctrls,
190 clientctrls, retoid, retdata );
191
192 if (!ld) return WLDAP32_LDAP_PARAM_ERROR;
193
194 if (oid) {
195 oidW = strAtoW( oid );
196 if (!oidW) goto exit;
197 }
198 if (serverctrls) {
199 serverctrlsW = controlarrayAtoW( serverctrls );
200 if (!serverctrlsW) goto exit;
201 }
202 if (clientctrls) {
203 clientctrlsW = controlarrayAtoW( clientctrls );
204 if (!clientctrlsW) goto exit;
205 }
206
207 ret = ldap_extended_operation_sW( ld, oidW, data, serverctrlsW, clientctrlsW,
208 &retoidW, retdata );
209
210 if (retoid && retoidW) {
211 *retoid = strWtoA( retoidW );
212 if (!*retoid) ret = WLDAP32_LDAP_NO_MEMORY;
213 ldap_memfreeW( retoidW );
214 }
215
216exit:
217 strfreeW( oidW );
218 controlarrayfreeW( serverctrlsW );
219 controlarrayfreeW( clientctrlsW );
220
221#endif
222 return ret;
223}
ULONG CDECL ldap_extended_operation_sW(WLDAP32_LDAP *ld, PWCHAR oid, struct WLDAP32_berval *data, PLDAPControlW *serverctrls, PLDAPControlW *clientctrls, PWCHAR *retoid, struct WLDAP32_berval **retdata)
Definition: extended.c:249

◆ ldap_extended_operation_sW()

ULONG CDECL ldap_extended_operation_sW ( WLDAP32_LDAP ld,
PWCHAR  oid,
struct WLDAP32_berval data,
PLDAPControlW serverctrls,
PLDAPControlW clientctrls,
PWCHAR retoid,
struct WLDAP32_berval **  retdata 
)

Definition at line 249 of file extended.c.

252{
254#ifdef HAVE_LDAP
255 char *oidU = NULL, *retoidU = NULL;
256 LDAPControl **serverctrlsU = NULL, **clientctrlsU = NULL;
257
259
260 TRACE( "(%p, %s, %p, %p, %p, %p, %p)\n", ld, debugstr_w(oid), data, serverctrls,
261 clientctrls, retoid, retdata );
262
263 if (!ld) return WLDAP32_LDAP_PARAM_ERROR;
264
265 if (oid) {
266 oidU = strWtoU( oid );
267 if (!oidU) goto exit;
268 }
269 if (serverctrls) {
270 serverctrlsU = controlarrayWtoU( serverctrls );
271 if (!serverctrlsU) goto exit;
272 }
273 if (clientctrls) {
274 clientctrlsU = controlarrayWtoU( clientctrls );
275 if (!clientctrlsU) goto exit;
276 }
277
278 ret = map_error( ldap_extended_operation_s( ld, oid ? oidU : "", (struct berval *)data, serverctrlsU,
279 clientctrlsU, &retoidU, (struct berval **)retdata ));
280
281 if (retoid && retoidU) {
282 *retoid = strUtoW( retoidU );
283 if (!*retoid) ret = WLDAP32_LDAP_NO_MEMORY;
284 ldap_memfree( retoidU );
285 }
286
287exit:
288 strfreeU( oidU );
289 controlarrayfreeU( serverctrlsU );
290 controlarrayfreeU( clientctrlsU );
291
292#endif
293 return ret;
294}
#define ldap_extended_operation_s
Definition: winldap.h:655

Referenced by ldap_extended_operation_sA().

◆ ldap_extended_operationA()

ULONG CDECL ldap_extended_operationA ( WLDAP32_LDAP ld,
PCHAR  oid,
struct WLDAP32_berval data,
PLDAPControlA serverctrls,
PLDAPControlA clientctrls,
ULONG message 
)

Definition at line 69 of file extended.c.

71{
73#ifdef HAVE_LDAP
74 WCHAR *oidW = NULL;
75 LDAPControlW **serverctrlsW = NULL, **clientctrlsW = NULL;
76
78
79 TRACE( "(%p, %s, %p, %p, %p, %p)\n", ld, debugstr_a(oid), data, serverctrls,
80 clientctrls, message );
81
82 if (!ld || !message) return WLDAP32_LDAP_PARAM_ERROR;
83
84 if (oid) {
85 oidW = strAtoW( oid );
86 if (!oidW) goto exit;
87 }
88 if (serverctrls) {
89 serverctrlsW = controlarrayAtoW( serverctrls );
90 if (!serverctrlsW) goto exit;
91 }
92 if (clientctrls) {
93 clientctrlsW = controlarrayAtoW( clientctrls );
94 if (!clientctrlsW) goto exit;
95 }
96
97 ret = ldap_extended_operationW( ld, oidW, data, serverctrlsW, clientctrlsW, message );
98
99exit:
100 strfreeW( oidW );
101 controlarrayfreeW( serverctrlsW );
102 controlarrayfreeW( clientctrlsW );
103
104#endif
105 return ret;
106}
ULONG CDECL ldap_extended_operationW(WLDAP32_LDAP *ld, PWCHAR oid, struct WLDAP32_berval *data, PLDAPControlW *serverctrls, PLDAPControlW *clientctrls, ULONG *message)
Definition: extended.c:133

◆ ldap_extended_operationW()

ULONG CDECL ldap_extended_operationW ( WLDAP32_LDAP ld,
PWCHAR  oid,
struct WLDAP32_berval data,
PLDAPControlW serverctrls,
PLDAPControlW clientctrls,
ULONG message 
)

Definition at line 133 of file extended.c.

135{
137#ifdef HAVE_LDAP
138 char *oidU = NULL;
139 LDAPControl **serverctrlsU = NULL, **clientctrlsU = NULL;
140
142
143 TRACE( "(%p, %s, %p, %p, %p, %p)\n", ld, debugstr_w(oid), data, serverctrls,
144 clientctrls, message );
145
146 if (!ld || !message) return WLDAP32_LDAP_PARAM_ERROR;
147
148 if (oid) {
149 oidU = strWtoU( oid );
150 if (!oidU) goto exit;
151 }
152 if (serverctrls) {
153 serverctrlsU = controlarrayWtoU( serverctrls );
154 if (!serverctrlsU) goto exit;
155 }
156 if (clientctrls) {
157 clientctrlsU = controlarrayWtoU( clientctrls );
158 if (!clientctrlsU) goto exit;
159 }
160
161 ret = map_error( ldap_extended_operation( ld, oid ? oidU : "", (struct berval *)data,
162 serverctrlsU, clientctrlsU, (int *)message ));
163
164exit:
165 strfreeU( oidU );
166 controlarrayfreeU( serverctrlsU );
167 controlarrayfreeU( clientctrlsU );
168
169#endif
170 return ret;
171}
#define ldap_extended_operation
Definition: winldap.h:656

Referenced by ldap_extended_operationA().

◆ ldap_first_attributeA()

PCHAR CDECL ldap_first_attributeA ( WLDAP32_LDAP ld,
WLDAP32_LDAPMessage entry,
WLDAP32_BerElement **  ptr 
)

Definition at line 290 of file misc.c.

292{
293 PCHAR ret = NULL;
294#ifdef HAVE_LDAP
295 WCHAR *retW;
296
297 TRACE( "(%p, %p, %p)\n", ld, entry, ptr );
298
299 if (!ld || !entry) return NULL;
300 retW = ldap_first_attributeW( ld, entry, ptr );
301
302 ret = strWtoA( retW );
303 ldap_memfreeW( retW );
304
305#endif
306 return ret;
307}
PWCHAR CDECL ldap_first_attributeW(WLDAP32_LDAP *ld, WLDAP32_LDAPMessage *entry, WLDAP32_BerElement **ptr)
Definition: misc.c:326
uint32_t entry
Definition: isohybrid.c:63
static PVOID ptr
Definition: dispmode.c:27

◆ ldap_first_attributeW()

PWCHAR CDECL ldap_first_attributeW ( WLDAP32_LDAP ld,
WLDAP32_LDAPMessage entry,
WLDAP32_BerElement **  ptr 
)

Definition at line 326 of file misc.c.

328{
329 PWCHAR ret = NULL;
330#ifdef HAVE_LDAP
331 char *retU;
332
333 TRACE( "(%p, %p, %p)\n", ld, entry, ptr );
334
335 if (!ld || !entry) return NULL;
336 retU = ldap_first_attribute( ld, entry, ptr );
337
338 ret = strUtoW( retU );
339 ldap_memfree( retU );
340
341#endif
342 return ret;
343}
#define ldap_first_attribute
Definition: winldap.h:668

◆ ldap_free_controlsA()

ULONG CDECL ldap_free_controlsA ( LDAPControlA **  controls)

Definition at line 352 of file control.c.

353{
354 return ldap_controls_freeA( controls );
355}
ULONG CDECL ldap_controls_freeA(LDAPControlA **controls)
Definition: control.c:84

◆ ldap_free_controlsW()

ULONG CDECL ldap_free_controlsW ( LDAPControlW **  controls)

Definition at line 371 of file control.c.

372{
373 return ldap_controls_freeW( controls );
374}
ULONG CDECL ldap_controls_freeW(LDAPControlW **controls)
Definition: control.c:107

◆ ldap_get_dnA()

PCHAR CDECL ldap_get_dnA ( WLDAP32_LDAP ld,
WLDAP32_LDAPMessage entry 
)

Definition at line 170 of file dn.c.

171{
172 PCHAR ret = NULL;
173#ifdef HAVE_LDAP
174 PWCHAR retW;
175
176 TRACE( "(%p, %p)\n", ld, entry );
177
178 if (!ld || !entry) return NULL;
179
180 retW = ldap_get_dnW( ld, entry );
181
182 ret = strWtoA( retW );
183 ldap_memfreeW( retW );
184
185#endif
186 return ret;
187}
PWCHAR CDECL ldap_get_dnW(WLDAP32_LDAP *ld, WLDAP32_LDAPMessage *entry)
Definition: dn.c:205

◆ ldap_get_dnW()

PWCHAR CDECL ldap_get_dnW ( WLDAP32_LDAP ld,
WLDAP32_LDAPMessage entry 
)

Definition at line 205 of file dn.c.

206{
207 PWCHAR ret = NULL;
208#ifdef HAVE_LDAP
209 char *retU;
210
211 TRACE( "(%p, %p)\n", ld, entry );
212
213 if (!ld || !entry) return NULL;
214
215 retU = ldap_get_dn( ld, entry );
216
217 ret = strUtoW( retU );
218 ldap_memfree( retU );
219
220#endif
221 return ret;
222}
#define ldap_get_dn
Definition: winldap.h:693

◆ ldap_get_next_page()

ULONG CDECL ldap_get_next_page ( WLDAP32_LDAP ld,
PLDAPSearch  search,
ULONG  pagesize,
ULONG message 
)

Definition at line 161 of file page.c.

163{
164 FIXME( "(%p, %p, 0x%08x, %p)\n", ld, search, pagesize, message );
165
166 if (!ld) return ~0u;
168}
#define FIXME(fmt,...)
Definition: debug.h:111
static short search(int val, const short *table, int size)
Definition: msg711.c:255

◆ ldap_get_next_page_s()

ULONG CDECL ldap_get_next_page_s ( WLDAP32_LDAP ld,
PLDAPSearch  search,
struct l_timeval timeout,
ULONG  pagesize,
ULONG count,
WLDAP32_LDAPMessage **  results 
)

Definition at line 170 of file page.c.

173{
174 FIXME( "(%p, %p, %p, 0x%08x, %p, %p)\n", ld, search, timeout,
175 pagesize, count, results );
176
177 if (!ld) return ~0u;
179}
static struct _test_info results[8]
Definition: SetCursorPos.c:31
GLuint GLuint GLsizei count
Definition: gl.h:1545

◆ ldap_get_optionA()

ULONG CDECL ldap_get_optionA ( WLDAP32_LDAP ld,
int  option,
void value 
)

Definition at line 44 of file option.c.

45{
47#ifdef HAVE_LDAP
48
49 TRACE( "(%p, 0x%08x, %p)\n", ld, option, value );
50
51 if (!ld || !value) return WLDAP32_LDAP_PARAM_ERROR;
52
53 switch (option)
54 {
56 {
57 LDAPAPIFeatureInfoW featureW;
58 LDAPAPIFeatureInfoA *featureA = value;
59
60 if (!featureA->ldapaif_name) return WLDAP32_LDAP_PARAM_ERROR;
61
62 featureW.ldapaif_info_version = featureA->ldapaif_info_version;
63 featureW.ldapaif_name = strAtoW( featureA->ldapaif_name );
64 featureW.ldapaif_version = 0;
65
66 if (!featureW.ldapaif_name) return WLDAP32_LDAP_NO_MEMORY;
67
68 ret = ldap_get_optionW( ld, option, &featureW );
69
70 featureA->ldapaif_version = featureW.ldapaif_version;
71 strfreeW( featureW.ldapaif_name );
72 return ret;
73 }
75 {
78
79 memset( &infoW, 0, sizeof(LDAPAPIInfoW) );
80 infoW.ldapai_info_version = infoA->ldapai_info_version;
81
83
84 infoA->ldapai_api_version = infoW.ldapai_api_version;
85 infoA->ldapai_protocol_version = infoW.ldapai_protocol_version;
86
87 if (infoW.ldapai_extensions)
88 {
89 infoA->ldapai_extensions = strarrayWtoA( infoW.ldapai_extensions );
90 if (!infoA->ldapai_extensions) return WLDAP32_LDAP_NO_MEMORY;
91 }
92 if (infoW.ldapai_vendor_name)
93 {
94 infoA->ldapai_vendor_name = strWtoA( infoW.ldapai_vendor_name );
95 if (!infoA->ldapai_vendor_name)
96 {
97 ldap_value_freeW( infoW.ldapai_extensions );
99 }
100 }
101 infoA->ldapai_vendor_version = infoW.ldapai_vendor_version;
102
103 ldap_value_freeW( infoW.ldapai_extensions );
104 ldap_memfreeW( infoW.ldapai_vendor_name );
105 return ret;
106 }
107
115 return ldap_get_optionW( ld, option, value );
116
125 return LDAP_LOCAL_ERROR;
126
157 FIXME( "Unsupported option: 0x%02x\n", option );
159
160 default:
161 FIXME( "Unknown option: 0x%02x\n", option );
163 }
164
165#endif
166 return ret;
167}
static const SecPkgInfoW infoW
Definition: kerberos.c:293
static const SecPkgInfoA infoA
Definition: kerberos.c:302
ULONG CDECL ldap_get_optionW(WLDAP32_LDAP *ld, int option, void *value)
Definition: option.c:183
#define memset(x, y, z)
Definition: compat.h:39
Definition: getopt.h:109
#define LDAP_LOCAL_ERROR
Definition: winldap.h:102
#define WLDAP32_LDAP_OPT_IO_FN_PTRS
#define WLDAP32_LDAP_OPT_HOST_REACHABLE
#define WLDAP32_LDAP_OPT_PROTOCOL_VERSION
#define WLDAP32_LDAP_OPT_REBIND_FN
#define WLDAP32_LDAP_OPT_CACHE_FN_PTRS
#define WLDAP32_LDAP_OPT_CLIENT_CERTIFICATE
#define WLDAP32_LDAP_OPT_RESTART
#define WLDAP32_LDAP_OPT_THREAD_FN_PTRS
#define WLDAP32_LDAP_OPT_DEREF
#define WLDAP32_LDAP_OPT_SASL_METHOD
#define WLDAP32_LDAP_OPT_SSPI_FLAGS
#define WLDAP32_LDAP_OPT_SIZELIMIT
#define WLDAP32_LDAP_OPT_SERVER_CERTIFICATE
#define WLDAP32_LDAP_OPT_SECURITY_CONTEXT
#define WLDAP32_LDAP_OPT_HOST_NAME
#define WLDAP32_LDAP_OPT_ERROR_STRING
#define WLDAP32_LDAP_OPT_SERVER_EXT_ERROR
#define WLDAP32_LDAP_OPT_CACHE_STRATEGY
#define WLDAP32_LDAP_OPT_SEND_TIMEOUT
#define WLDAP32_LDAP_OPT_REFERRALS
#define WLDAP32_LDAP_OPT_PING_LIMIT
#define WLDAP32_LDAP_OPT_TIMELIMIT
#define WLDAP32_LDAP_OPT_API_FEATURE_INFO
#define WLDAP32_LDAP_OPT_SSL_INFO
#define WLDAP32_LDAP_OPT_TCP_KEEPALIVE
#define WLDAP32_LDAP_OPT_AREC_EXCLUSIVE
#define WLDAP32_LDAP_OPT_DNSDOMAIN_NAME
#define WLDAP32_LDAP_OPT_ERROR_NUMBER
#define WLDAP32_LDAP_OPT_PING_KEEP_ALIVE
#define WLDAP32_LDAP_OPT_AUTO_RECONNECT
#define WLDAP32_LDAP_OPT_DESC
#define WLDAP32_LDAP_OPT_REF_DEREF_CONN_PER_MSG
#define WLDAP32_LDAP_OPT_SERVER_ERROR
#define WLDAP32_LDAP_OPT_SERVER_CONTROLS
#define WLDAP32_LDAP_OPT_PROMPT_CREDENTIALS
#define WLDAP32_LDAP_OPT_GETDSNAME_FLAGS
#define WLDAP32_LDAP_OPT_PING_WAIT_TIME
#define WLDAP32_LDAP_OPT_SIGN
#define WLDAP32_LDAP_OPT_REFERRAL_CALLBACK
#define WLDAP32_LDAP_OPT_REFERRAL_HOP_LIMIT
#define WLDAP32_LDAP_OPT_ROOTDSE_CACHE
#define WLDAP32_LDAP_OPT_REBIND_ARG
#define WLDAP32_LDAP_OPT_FAST_CONCURRENT_BIND
#define WLDAP32_LDAP_OPT_API_INFO
#define WLDAP32_LDAP_OPT_CACHE_ENABLE
#define WLDAP32_LDAP_OPT_ENCRYPT
#define WLDAP32_LDAP_OPT_SSL

◆ ldap_get_optionW()

ULONG CDECL ldap_get_optionW ( WLDAP32_LDAP ld,
int  option,
void value 
)

Definition at line 183 of file option.c.

184{
186#ifdef HAVE_LDAP
187
188 TRACE( "(%p, 0x%08x, %p)\n", ld, option, value );
189
190 if (!ld || !value) return WLDAP32_LDAP_PARAM_ERROR;
191
192 switch (option)
193 {
195 {
196 LDAPAPIFeatureInfo featureU;
197 LDAPAPIFeatureInfoW *featureW = value;
198
199 if (!featureW->ldapaif_name) return WLDAP32_LDAP_PARAM_ERROR;
200
201 featureU.ldapaif_info_version = featureW->ldapaif_info_version;
202 featureU.ldapaif_name = strWtoU( featureW->ldapaif_name );
203 featureU.ldapaif_version = 0;
204
205 if (!featureU.ldapaif_name) return WLDAP32_LDAP_NO_MEMORY;
206
207 ret = map_error( ldap_get_option( ld, option, &featureU ));
208
209 featureW->ldapaif_version = featureU.ldapaif_version;
210 strfreeU( featureU.ldapaif_name );
211 return ret;
212 }
214 {
215 LDAPAPIInfo infoU;
217
218 memset( &infoU, 0, sizeof(LDAPAPIInfo) );
219 infoU.ldapai_info_version = infoW->ldapai_info_version;
220
221 ret = map_error( ldap_get_option( ld, option, &infoU ));
222
223 infoW->ldapai_api_version = infoU.ldapai_api_version;
224 infoW->ldapai_protocol_version = infoU.ldapai_protocol_version;
225
226 if (infoU.ldapai_extensions)
227 {
228 infoW->ldapai_extensions = strarrayUtoW( infoU.ldapai_extensions );
229 if (!infoW->ldapai_extensions) return WLDAP32_LDAP_NO_MEMORY;
230 }
231 if (infoU.ldapai_vendor_name)
232 {
233 infoW->ldapai_vendor_name = strUtoW( infoU.ldapai_vendor_name );
234 if (!infoW->ldapai_vendor_name)
235 {
236 ldap_memvfree( (void **)infoU.ldapai_extensions );
238 }
239 }
240 infoW->ldapai_vendor_version = infoU.ldapai_vendor_version;
241
242 ldap_memvfree( (void **)infoU.ldapai_extensions );
243 ldap_memfree( infoU.ldapai_vendor_name );
244 return ret;
245 }
246
254 return map_error( ldap_get_option( ld, option, value ));
255
265
296 FIXME( "Unsupported option: 0x%02x\n", option );
298
299 default:
300 FIXME( "Unknown option: 0x%02x\n", option );
302 }
303
304#endif
305 return ret;
306}
#define LDAPAPIInfo
Definition: winldap.h:626
#define LDAPAPIFeatureInfo
Definition: winldap.h:628
#define ldap_get_option
Definition: winldap.h:640

◆ ldap_get_paged_count()

ULONG CDECL ldap_get_paged_count ( WLDAP32_LDAP ld,
PLDAPSearch  search,
ULONG count,
WLDAP32_LDAPMessage results 
)

Definition at line 181 of file page.c.

183{
185#ifdef HAVE_LDAP
186 FIXME( "(%p, %p, %p, %p)\n", ld, search, count, results );
187
188 if (!ld) return WLDAP32_LDAP_PARAM_ERROR;
189 /* FIXME: save the cookie from the server here */
190
191#endif
192 return ret;
193}

◆ ldap_get_values_lenA()

PBERVAL *CDECL ldap_get_values_lenA ( WLDAP32_LDAP ld,
WLDAP32_LDAPMessage message,
PCHAR  attr 
)

Definition at line 249 of file value.c.

251{
252#ifdef HAVE_LDAP
253 WCHAR *attrW = NULL;
254 struct WLDAP32_berval **ret;
255
256 TRACE( "(%p, %p, %s)\n", ld, message, debugstr_a(attr) );
257
258 if (!ld || !message || !attr) return NULL;
259
260 attrW = strAtoW( attr );
261 if (!attrW) return NULL;
262
263 ret = ldap_get_values_lenW( ld, message, attrW );
264
265 strfreeW( attrW );
266 return ret;
267
268#else
269 return NULL;
270#endif
271}
struct WLDAP32_berval **CDECL ldap_get_values_lenW(WLDAP32_LDAP *ld, WLDAP32_LDAPMessage *message, PWCHAR attr)
Definition: value.c:292

◆ ldap_get_values_lenW()

PBERVAL *CDECL ldap_get_values_lenW ( WLDAP32_LDAP ld,
WLDAP32_LDAPMessage message,
PWCHAR  attr 
)

Definition at line 292 of file value.c.

294{
295#ifdef HAVE_LDAP
296 char *attrU = NULL;
297 struct berval **ret;
298
299 TRACE( "(%p, %p, %s)\n", ld, message, debugstr_w(attr) );
300
301 if (!ld || !message || !attr) return NULL;
302
303 attrU = strWtoU( attr );
304 if (!attrU) return NULL;
305
306 ret = ldap_get_values_len( ld, message, attrU );
307
308 strfreeU( attrU );
309 return (struct WLDAP32_berval **)ret;
310
311#else
312 return NULL;
313#endif
314}
#define ldap_get_values_len
Definition: winldap.h:671

◆ ldap_get_valuesA()

PCHAR *CDECL ldap_get_valuesA ( WLDAP32_LDAP ld,
WLDAP32_LDAPMessage entry,
PCHAR  attr 
)

Definition at line 130 of file value.c.

131{
132 PCHAR *ret = NULL;
133#ifdef HAVE_LDAP
134 WCHAR *attrW = NULL, **retW;
135
136 TRACE( "(%p, %p, %s)\n", ld, entry, debugstr_a(attr) );
137
138 if (!ld || !entry || !attr) return NULL;
139
140 attrW = strAtoW( attr );
141 if (!attrW) return NULL;
142
143 retW = ldap_get_valuesW( ld, entry, attrW );
144
145 ret = strarrayWtoA( retW );
146 ldap_value_freeW( retW );
147 strfreeW( attrW );
148
149#endif
150 return ret;
151}
PWCHAR *CDECL ldap_get_valuesW(WLDAP32_LDAP *ld, WLDAP32_LDAPMessage *entry, PWCHAR attr)
Definition: value.c:217

◆ ldap_get_valuesW()

PWCHAR *CDECL ldap_get_valuesW ( WLDAP32_LDAP ld,
WLDAP32_LDAPMessage entry,
PWCHAR  attr 
)

Definition at line 217 of file value.c.

218{
219 PWCHAR *ret = NULL;
220#ifdef HAVE_LDAP
221 char *attrU = NULL, **retU;
222 struct berval **bv;
223
224 TRACE( "(%p, %p, %s)\n", ld, entry, debugstr_w(attr) );
225
226 if (!ld || !entry || !attr) return NULL;
227
228 attrU = strWtoU( attr );
229 if (!attrU) return NULL;
230
231 bv = ldap_get_values_len( ld, entry, attrU );
232
233 retU = bv2str_array( bv );
234 ret = strarrayUtoW( retU );
235
237 strarrayfreeU( retU );
238 strfreeU( attrU );
239
240#endif
241 return ret;
242}
WINLDAPAPI ULONG ldap_value_free_len(struct berval **)
static void strarrayfreeU(char **strarray)
Definition: wldap32.h:234

◆ ldap_initA()

WLDAP32_LDAP *CDECL ldap_initA ( const  PCHAR,
ULONG  portnumber 
)

Definition at line 331 of file init.c.

332{
333#ifdef HAVE_LDAP
334 WLDAP32_LDAP *ld = NULL;
335 WCHAR *hostnameW = NULL;
336
337 TRACE( "(%s, %d)\n", debugstr_a(hostname), portnumber );
338
339 if (hostname) {
340 hostnameW = strAtoW( hostname );
341 if (!hostnameW) goto exit;
342 }
343
344 ld = ldap_initW( hostnameW, portnumber );
345
346exit:
347 strfreeW( hostnameW );
348 return ld;
349
350#else
351 return NULL;
352#endif
353}
WLDAP32_LDAP *CDECL ldap_initW(const PWCHAR hostname, ULONG portnumber)
Definition: init.c:377

◆ ldap_initW()

WLDAP32_LDAP *CDECL ldap_initW ( const  PWCHAR,
ULONG  portnumber 
)

Definition at line 377 of file init.c.

378{
379#ifdef HAVE_LDAP
380 LDAP *ld = NULL;
381 char *hostnameU = NULL, *url = NULL;
382
383 TRACE( "(%s, %d)\n", debugstr_w(hostname), portnumber );
384
385 if (hostname) {
386 hostnameU = strWtoU( hostname );
387 if (!hostnameU) goto exit;
388 }
389 else {
390 hostnameU = strWtoU( defaulthost );
391 if (!hostnameU) goto exit;
392 }
393
394 url = urlify_hostnames( "ldap://", hostnameU, portnumber );
395 if (!url) goto exit;
396
397 ld = create_context( url );
398
399exit:
400 strfreeU( hostnameU );
401 strfreeU( url );
402 return ld;
403
404#else
405 return NULL;
406#endif
407}

◆ ldap_memfreeA()

void CDECL ldap_memfreeA ( PCHAR  block)

Definition at line 407 of file misc.c.

408{
409 TRACE( "(%p)\n", block );
410 strfreeA( block );
411}
static void strfreeA(LPSTR str)
Definition: wldap32.h:98
static unsigned int block
Definition: xmlmemory.c:101

◆ ldap_memfreeW()

void CDECL ldap_memfreeW ( PWCHAR  block)

Definition at line 421 of file misc.c.

422{
423 TRACE( "(%p)\n", block );
424 strfreeW( block );
425}

◆ ldap_modify_ext_sA()

ULONG CDECL ldap_modify_ext_sA ( WLDAP32_LDAP ld,
PCHAR  dn,
LDAPModA mods[],
PLDAPControlA serverctrls,
PLDAPControlA clientctrls 
)

Definition at line 264 of file modify.c.

266{
268#ifdef HAVE_LDAP
269 WCHAR *dnW = NULL;
270 LDAPModW **modsW = NULL;
271 LDAPControlW **serverctrlsW = NULL, **clientctrlsW = NULL;
272
274
275 TRACE( "(%p, %s, %p, %p, %p)\n", ld, debugstr_a(dn), mods,
276 serverctrls, clientctrls );
277
278 if (!ld) return WLDAP32_LDAP_PARAM_ERROR;
279
280 if (dn) {
281 dnW = strAtoW( dn );
282 if (!dnW) goto exit;
283 }
284 if (mods) {
285 modsW = modarrayAtoW( mods );
286 if (!modsW) goto exit;
287 }
288 if (serverctrls) {
289 serverctrlsW = controlarrayAtoW( serverctrls );
290 if (!serverctrlsW) goto exit;
291 }
292 if (clientctrls) {
293 clientctrlsW = controlarrayAtoW( clientctrls );
294 if (!clientctrlsW) goto exit;
295 }
296
297 ret = ldap_modify_ext_sW( ld, dnW, modsW, serverctrlsW, clientctrlsW );
298
299exit:
300 strfreeW( dnW );
301 modarrayfreeW( modsW );
302 controlarrayfreeW( serverctrlsW );
303 controlarrayfreeW( clientctrlsW );
304
305#endif
306 return ret;
307}
ULONG CDECL ldap_modify_ext_sW(WLDAP32_LDAP *ld, PWCHAR dn, LDAPModW *mods[], PLDAPControlW *serverctrls, PLDAPControlW *clientctrls)
Definition: modify.c:330

◆ ldap_modify_ext_sW()

ULONG CDECL ldap_modify_ext_sW ( WLDAP32_LDAP ld,
PWCHAR  dn,
LDAPModW mods[],
PLDAPControlW serverctrls,
PLDAPControlW clientctrls 
)

Definition at line 330 of file modify.c.

332{
334#ifdef HAVE_LDAP
335 char *dnU = NULL;
336 LDAPMod **modsU = NULL;
337 LDAPControl **serverctrlsU = NULL, **clientctrlsU = NULL;
338
340
341 TRACE( "(%p, %s, %p, %p, %p)\n", ld, debugstr_w(dn), mods,
342 serverctrls, clientctrls );
343
344 if (!ld) return WLDAP32_LDAP_PARAM_ERROR;
345
346 if (dn) {
347 dnU = strWtoU( dn );
348 if (!dnU) goto exit;
349 }
350 if (mods) {
351 modsU = modarrayWtoU( mods );
352 if (!modsU) goto exit;
353 }
354 if (serverctrls) {
355 serverctrlsU = controlarrayWtoU( serverctrls );
356 if (!serverctrlsU) goto exit;
357 }
358 if (clientctrls) {
359 clientctrlsU = controlarrayWtoU( clientctrls );
360 if (!clientctrlsU) goto exit;
361 }
362
363 ret = map_error( ldap_modify_ext_s( ld, dn ? dnU : "", mods ? modsU : nullmods,
364 serverctrlsU, clientctrlsU ));
365
366exit:
367 strfreeU( dnU );
368 modarrayfreeU( modsU );
369 controlarrayfreeU( serverctrlsU );
370 controlarrayfreeU( clientctrlsU );
371
372#endif
373 return ret;
374}
#define ldap_modify_ext_s
Definition: winldap.h:660

◆ ldap_modify_extA()

ULONG CDECL ldap_modify_extA ( WLDAP32_LDAP ld,
PCHAR  dn,
LDAPModA mods[],
PLDAPControlA serverctrls,
PLDAPControlA clientctrls,
ULONG message 
)

Definition at line 144 of file modify.c.

146{
148#ifdef HAVE_LDAP
149 WCHAR *dnW = NULL;
150 LDAPModW **modsW = NULL;
151 LDAPControlW **serverctrlsW = NULL, **clientctrlsW = NULL;
152
154
155 TRACE( "(%p, %s, %p, %p, %p, %p)\n", ld, debugstr_a(dn), mods,
156 serverctrls, clientctrls, message );
157
158 if (!ld) return ~0u;
159
160 if (dn) {
161 dnW = strAtoW( dn );
162 if (!dnW) goto exit;
163 }
164 if (mods) {
165 modsW = modarrayAtoW( mods );
166 if (!modsW) goto exit;
167 }
168 if (serverctrls) {
169 serverctrlsW = controlarrayAtoW( serverctrls );
170 if (!serverctrlsW) goto exit;
171 }
172 if (clientctrls) {
173 clientctrlsW = controlarrayAtoW( clientctrls );
174 if (!clientctrlsW) goto exit;
175 }
176
177 ret = ldap_modify_extW( ld, dnW, modsW, serverctrlsW, clientctrlsW, message );
178
179exit:
180 strfreeW( dnW );
181 modarrayfreeW( modsW );
182 controlarrayfreeW( serverctrlsW );
183 controlarrayfreeW( clientctrlsW );
184
185#endif
186 return ret;
187}
ULONG CDECL ldap_modify_extW(WLDAP32_LDAP *ld, PWCHAR dn, LDAPModW *mods[], PLDAPControlW *serverctrls, PLDAPControlW *clientctrls, ULONG *message)
Definition: modify.c:212

◆ ldap_modify_extW()

ULONG CDECL ldap_modify_extW ( WLDAP32_LDAP ld,
PWCHAR  dn,
LDAPModW mods[],
PLDAPControlW serverctrls,
PLDAPControlW clientctrls,
ULONG message 
)

Definition at line 212 of file modify.c.

214{
216#ifdef HAVE_LDAP
217 char *dnU = NULL;
218 LDAPMod **modsU = NULL;
219 LDAPControl **serverctrlsU = NULL, **clientctrlsU = NULL;
220 int dummy;
221
223
224 TRACE( "(%p, %s, %p, %p, %p, %p)\n", ld, debugstr_w(dn), mods,
225 serverctrls, clientctrls, message );
226
227 if (!ld) return ~0u;
228
229 if (dn) {
230 dnU = strWtoU( dn );
231 if (!dnU) goto exit;
232 }
233 if (mods) {
234 modsU = modarrayWtoU( mods );
235 if (!modsU) goto exit;
236 }
237 if (serverctrls) {
238 serverctrlsU = controlarrayWtoU( serverctrls );
239 if (!serverctrlsU) goto exit;
240 }
241 if (clientctrls) {
242 clientctrlsU = controlarrayWtoU( clientctrls );
243 if (!clientctrlsU) goto exit;
244 }
245
246 ret = map_error( ldap_modify_ext( ld, dn ? dnU : "", mods ? modsU : nullmods, serverctrlsU,
247 clientctrlsU, message ? (int *)message : &dummy ));
248
249exit:
250 strfreeU( dnU );
251 modarrayfreeU( modsU );
252 controlarrayfreeU( serverctrlsU );
253 controlarrayfreeU( clientctrlsU );
254
255#endif
256 return ret;
257}
#define ldap_modify_ext
Definition: winldap.h:658

◆ ldap_modify_sA()

ULONG CDECL ldap_modify_sA ( WLDAP32_LDAP ld,
PCHAR  dn,
LDAPModA mods[] 
)

Definition at line 381 of file modify.c.

382{
384#ifdef HAVE_LDAP
385 WCHAR *dnW = NULL;
386 LDAPModW **modsW = NULL;
387
389
390 TRACE( "(%p, %s, %p)\n", ld, debugstr_a(dn), mods );
391
392 if (!ld) return WLDAP32_LDAP_PARAM_ERROR;
393
394 if (dn) {
395 dnW = strAtoW( dn );
396 if (!dnW) goto exit;
397 }
398 if (mods) {
399 modsW = modarrayAtoW( mods );
400 if (!modsW) goto exit;
401 }
402
403 ret = ldap_modify_sW( ld, dnW, modsW );
404
405exit:
406 strfreeW( dnW );
407 modarrayfreeW( modsW );
408
409#endif
410 return ret;
411}
ULONG CDECL ldap_modify_sW(WLDAP32_LDAP *ld, PWCHAR dn, LDAPModW *mods[])
Definition: modify.c:428

◆ ldap_modify_sW()

ULONG CDECL ldap_modify_sW ( WLDAP32_LDAP ld,
PWCHAR  dn,
LDAPModW mods[] 
)

Definition at line 428 of file modify.c.

429{
431#ifdef HAVE_LDAP
432 char *dnU = NULL;
433 LDAPMod **modsU = NULL;
434
436
437 TRACE( "(%p, %s, %p)\n", ld, debugstr_w(dn), mods );
438
439 if (!ld) return WLDAP32_LDAP_PARAM_ERROR;
440
441 if (dn) {
442 dnU = strWtoU( dn );
443 if (!dnU) goto exit;
444 }
445 if (mods) {
446 modsU = modarrayWtoU( mods );
447 if (!modsU) goto exit;
448 }
449
450 ret = map_error( ldap_modify_ext_s( ld, dn ? dnU : "", mods ? modsU : nullmods, NULL, NULL ));
451
452exit:
453 strfreeU( dnU );
454 modarrayfreeU( modsU );
455
456#endif
457 return ret;
458}

◆ ldap_modifyA()

ULONG CDECL ldap_modifyA ( WLDAP32_LDAP ld,
PCHAR  dn,
LDAPModA mods[] 
)

Definition at line 48 of file modify.c.

49{
51#ifdef HAVE_LDAP
52 WCHAR *dnW = NULL;
53 LDAPModW **modsW = NULL;
54
56
57 TRACE( "(%p, %s, %p)\n", ld, debugstr_a(dn), mods );
58
59 if (!ld) return ~0u;
60
61 if (dn) {
62 dnW = strAtoW( dn );
63 if (!dnW) goto exit;
64 }
65 if (mods) {
66 modsW = modarrayAtoW( mods );
67 if (!modsW) goto exit;
68 }
69
70 ret = ldap_modifyW( ld, dnW, modsW );
71
72exit:
73 strfreeW( dnW );
74 modarrayfreeW( modsW );
75
76#endif
77 return ret;
78}
ULONG CDECL ldap_modifyW(WLDAP32_LDAP *ld, PWCHAR dn, LDAPModW *mods[])
Definition: modify.c:100

◆ ldap_modifyW()

ULONG CDECL ldap_modifyW ( WLDAP32_LDAP ld,
PWCHAR  dn,
LDAPModW mods[] 
)

Definition at line 100 of file modify.c.

101{
103#ifdef HAVE_LDAP
104 char *dnU = NULL;
105 LDAPMod **modsU = NULL;
106 int msg;
107
109
110 TRACE( "(%p, %s, %p)\n", ld, debugstr_w(dn), mods );
111
112 if (!ld) return WLDAP32_LDAP_PARAM_ERROR;
113
114 if (dn) {
115 dnU = strWtoU( dn );
116 if (!dnU) goto exit;
117 }
118 if (mods) {
119 modsU = modarrayWtoU( mods );
120 if (!modsU) goto exit;
121 }
122
123 ret = ldap_modify_ext( ld, dn ? dnU : "", mods ? modsU : nullmods,
124 NULL, NULL, &msg );
125
126 if (ret == LDAP_SUCCESS)
127 ret = msg;
128 else
129 ret = ~0u;
130
131exit:
132 strfreeU( dnU );
133 modarrayfreeU( modsU );
134
135#endif
136 return ret;
137}

◆ ldap_modrdn2_sA()

ULONG CDECL ldap_modrdn2_sA ( WLDAP32_LDAP ld,
PCHAR  dn,
PCHAR  newdn,
INT  delete 
)

Definition at line 225 of file modrdn.c.

226{
228#ifdef HAVE_LDAP
229 WCHAR *dnW = NULL, *newdnW = NULL;
230
232
233 TRACE( "(%p, %s, %p, 0x%02x)\n", ld, debugstr_a(dn), newdn, delete );
234
235 if (!ld || !newdn) return WLDAP32_LDAP_PARAM_ERROR;
236
237 if (dn) {
238 dnW = strAtoW( dn );
239 if (!dnW) goto exit;
240 }
241
242 newdnW = strAtoW( newdn );
243 if (!newdnW) goto exit;
244
245 ret = ldap_modrdn2_sW( ld, dnW, newdnW, delete );
246
247exit:
248 strfreeW( dnW );
249 strfreeW( newdnW );
250
251#endif
252 return ret;
253}
ULONG CDECL ldap_modrdn2_sW(WLDAP32_LDAP *ld, PWCHAR dn, PWCHAR newdn, INT delete)
Definition: modrdn.c:270

◆ ldap_modrdn2_sW()

ULONG CDECL ldap_modrdn2_sW ( WLDAP32_LDAP ld,
PWCHAR  dn,
PWCHAR  newdn,
INT  delete 
)

Definition at line 270 of file modrdn.c.

271{
273#ifdef HAVE_LDAP
274 char *dnU = NULL, *newdnU = NULL;
275
277
278 TRACE( "(%p, %s, %p, 0x%02x)\n", ld, debugstr_w(dn), newdn, delete );
279
280 if (!ld || !newdn) return WLDAP32_LDAP_PARAM_ERROR;
281
282 if (dn) {
283 dnU = strWtoU( dn );
284 if (!dnU) goto exit;
285 }
286
287 newdnU = strWtoU( newdn );
288 if (!newdnU) goto exit;
289
290 ret = map_error( ldap_rename_s( ld, dn ? dnU : "", newdnU, NULL, delete, NULL, NULL ));
291
292exit:
293 strfreeU( dnU );
294 strfreeU( newdnU );
295
296#endif
297 return ret;
298}
#define ldap_rename_s
Definition: winldap.h:699

◆ ldap_modrdn2A()

ULONG CDECL ldap_modrdn2A ( WLDAP32_LDAP ld,
PCHAR  dn,
PCHAR  newdn,
INT  delete 
)

Definition at line 134 of file modrdn.c.

135{
137#ifdef HAVE_LDAP
138 WCHAR *dnW = NULL, *newdnW = NULL;
139
141
142 TRACE( "(%p, %s, %p, 0x%02x)\n", ld, debugstr_a(dn), newdn, delete );
143
144 if (!ld || !newdn) return ~0u;
145
146 if (dn) {
147 dnW = strAtoW( dn );
148 if (!dnW) goto exit;
149 }
150
151 newdnW = strAtoW( newdn );
152 if (!newdnW) goto exit;
153
154 ret = ldap_modrdn2W( ld, dnW, newdnW, delete );
155
156exit:
157 strfreeW( dnW );
158 strfreeW( newdnW );
159
160#endif
161 return ret;
162}
ULONG CDECL ldap_modrdn2W(WLDAP32_LDAP *ld, PWCHAR dn, PWCHAR newdn, INT delete)
Definition: modrdn.c:184

◆ ldap_modrdn2W()

ULONG CDECL ldap_modrdn2W ( WLDAP32_LDAP ld,
PWCHAR  dn,
PWCHAR  newdn,
INT  delete 
)

Definition at line 184 of file modrdn.c.

185{
187#ifdef HAVE_LDAP
188 char *dnU = NULL, *newdnU = NULL;
189 int msg;
190
192
193 TRACE( "(%p, %s, %p, 0x%02x)\n", ld, debugstr_w(dn), newdn, delete );
194
195 if (!ld || !newdn) return ~0u;
196
197 if (dn) {
198 dnU = strWtoU( dn );
199 if (!dnU) goto exit;
200 }
201
202 newdnU = strWtoU( newdn );
203 if (!newdnU) goto exit;
204
205 ret = ldap_rename( ld, dn ? dnU : "", newdnU, NULL, delete, NULL, NULL, &msg );
206
207 if (ret == LDAP_SUCCESS)
208 ret = msg;
209 else
210 ret = ~0u;
211
212exit:
213 strfreeU( dnU );
214 strfreeU( newdnU );
215
216#endif
217 return ret;
218}
#define ldap_rename
Definition: winldap.h:698

◆ ldap_modrdn_sA()

ULONG CDECL ldap_modrdn_sA ( WLDAP32_LDAP ld,
PCHAR  dn,
PCHAR  newdn 
)

Definition at line 305 of file modrdn.c.

306{
308#ifdef HAVE_LDAP
309 WCHAR *dnW = NULL, *newdnW = NULL;
310
312
313 TRACE( "(%p, %s, %p)\n", ld, debugstr_a(dn), newdn );
314
315 if (!ld || !newdn) return WLDAP32_LDAP_PARAM_ERROR;
316
317 if (dn) {
318 dnW = strAtoW( dn );
319 if (!dnW) goto exit;
320 }
321
322 newdnW = strAtoW( newdn );
323 if (!newdnW) goto exit;
324
325 ret = ldap_modrdn_sW( ld, dnW, newdnW );
326
327exit:
328 strfreeW( dnW );
329 strfreeW( newdnW );
330
331#endif
332 return ret;
333}
ULONG CDECL ldap_modrdn_sW(WLDAP32_LDAP *ld, PWCHAR dn, PWCHAR newdn)
Definition: modrdn.c:349

◆ ldap_modrdn_sW()

ULONG CDECL ldap_modrdn_sW ( WLDAP32_LDAP ld,
PWCHAR  dn,
PWCHAR  newdn 
)

Definition at line 349 of file modrdn.c.

350{
352#ifdef HAVE_LDAP
353 char *dnU = NULL, *newdnU = NULL;
354
356
357 TRACE( "(%p, %s, %p)\n", ld, debugstr_w(dn), newdn );
358
359 if (!ld || !newdn) return WLDAP32_LDAP_PARAM_ERROR;
360
361 if (dn) {
362 dnU = strWtoU( dn );
363 if (!dnU) goto