00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef W32_LDAP_HELP_H
00022 #define W32_LDAP_HELP_H
00023
00024 #include <windows.h>
00025 #ifdef UNICODE
00026 # undef UNICODE
00027 # include <winldap.h>
00028 # include <winber.h>
00029 # define UNICODE
00030 #else
00031 # include <winldap.h>
00032 # include <winber.h>
00033 #endif // UNICODE
00034
00035
00036
00037
00038
00039
00040
00041 typedef ULONG ber_len_t;
00042
00043 #ifndef timeval
00044 #define timeval l_timeval
00045 #endif
00046
00047 #ifdef _WIN32_WCE
00048 #include "wce-ldap-help.h"
00049 #endif
00050
00051
00052
00053
00054 #define ldap_init(a,b) win_ldap_init(a,b)
00055 #define ldap_sasl_bind(a, b, c, d, e, f, g) \
00056 win_ldap_sasl_bind(a, b, c, d, e, f, g)
00057 #define ldap_sasl_bind_s(a, b, c, d, e, f, g) \
00058 win_ldap_sasl_bind_s(a, b, c, d, e, f, g)
00059 #define ldap_parse_sasl_bind_result ( a, b, c, d, e ) \
00060 win_ldap_parse_sasl_bind_result((a), (b), (c), (d), (e))
00061 #define ldap_get_dn(a, b) win_ldap_get_dn(a,b)
00062 #define ldap_memfree(a) win_ldap_memfree(a)
00063 #define ldap_mods_free(a, b) win_ldap_mods_free(a, b)
00064 #define ldap_first_attribute(a, b, c) \
00065 win_ldap_first_attribute(a, b, c)
00066 #define ldap_get_values_len(a, b, c) \
00067 win_ldap_get_values_len(a, b, c)
00068 #define ldap_next_attribute(a, b, c ) \
00069 win_ldap_next_attribute(a, b, c)
00070 #define ldap_parse_result(a, b, c, d, e, f, g, h) \
00071 win_ldap_parse_result(a, b, c, d, e, f, g, h)
00072 #define ldap_parse_extended_result(a, b, c, d, e) \
00073 win_ldap_parse_extended_result(a, b, c, d, e)
00074 #define ldap_add_ext(a, b, c, d, e, f) \
00075 win_ldap_add_ext((a), (b), (c), (d), (e), (f))
00076 #define ldap_add_ext_s(a, b, c, d, e) \
00077 win_ldap_add_ext_s((a), (b), (c), (d), (e))
00078 # define ldap_compare_ext_s(a, b, c, d, e, f) \
00079 win_ldap_compare_ext_s((a), (b), (c), (d), (e), (f))
00080 # define ldap_compare_ext(a, b, c, d, e, f, g) \
00081 win_ldap_compare_ext((a), (b), (c), (d), (e), (f), (g))
00082 # define ldap_modify_ext_s(a, b, c, d, e ) \
00083 win_ldap_modify_ext_s((a), (b), (c), (d), (e))
00084 # define ldap_search_ext(a, b, c, d, e, f, g, h, i, j, k) \
00085 win_ldap_search_ext((a), (b), (c), (d), (e), (f), (g), (h), (i), (j), (k))
00086 #define ldap_rename_ext( a, b, c, d, e, f, g, h ) \
00087 win_ldap_rename_ext((a), (b), (c), (d), (e), (f), (g), (h) )
00088 #define ldap_rename( a, b, c, d, e, f, g, h ) \
00089 ldap_rename_ext((a), (b), (c), (d), (e), (f), (g), (h) )
00090 #define ldap_delete_ext(a, b, c, d, e ) \
00091 win_ldap_delete_ext((a), (b), (c), (d), (e) )
00092 #define ldap_modify_ext(a, b, c, d, e, f ) \
00093 win_ldap_modify_ext( (a), (b), (c), (d), (e), (f))
00094 #define ldap_abandon_ext(a, b, c, d) \
00095 win_ldap_abandon_ext((a), (b), (c), (d))
00096 #define ldap_controls_free(a) win_ldap_controls_free(a)
00097
00098
00099
00100 #ifdef _WIN32_WCE
00101 # define win_ldap_init(a,b) \
00102 my_win_ldap_initA ((a), (b))
00103 # define win_ldap_simple_bind_s(a,b,c) \
00104 my_win_ldap_simple_bind_sA ((a),(b),(c))
00105
00106
00107
00108
00109
00110
00111
00112
00113
00114 # define win_ldap_search_st(a,b,c,d,e,f,g,h) \
00115 my_win_ldap_search_stA ((a), (b), (c), (d), (e), (f), (g), (h))
00116 # define win_ldap_first_attribute(a,b,c) \
00117 my_win_ldap_first_attributeA ((a),(b),(c))
00118 # define win_ldap_next_attribute(a,b,c) \
00119 my_win_ldap_next_attributeA ((a),(b),(c))
00120 # define win_ldap_get_values_len(a,b,c) \
00121 my_win_ldap_get_values_lenA ((a),(b),(c))
00122 # define win_ldap_get_dn(a,b) \
00123 my_win_ldap_get_dnA((a),(b))
00124 # define win_ldap_parse_extended_result(a, b, c, d, e ) \
00125 my_win_ldap_parse_extended_resultA((a), (b), (c), (d), (e))
00126 # define win_ldap_memfree(a) free(a)
00127 # define win_ldap_controls_free(a) \
00128 my_win_ldap_controls_freeA((a))
00129 # define win_ldap_mods_free(a, b) \
00130 my_win_ldap_mods_freeA((a), (b))
00131 # define win_ldap_parse_result(a, b, c, d, e, f, g, h ) \
00132 my_win_ldap_parse_resultA((a), (b), ((ulong *) c), (d), (e), (f), (g), (h))
00133 # define win_ldap_search_ext(a, b, c, d, e, f, g, h, i, j, k) \
00134 my_win_ldap_search_extA((a), (b), (c), (d), (e), (f), (g), (h), (i), (j), (k))
00135 # define win_ldap_add_ext_s(a, b, c, d, e) \
00136 my_win_ldap_add_ext_sA((a), (b), (c), (d), (e))
00137 # define win_ldap_add_ext(a, b, c, d, e, f) \
00138 my_win_ldap_add_extA((a), (b), (c), (d), (e), ( (ulong * ) f))
00139 #define win_ldap_rename_ext( a, b, c, d, e, f, g, h ) \
00140 ldap_rename_extA((a), (b), (c), (d), (e), (f), (g), ( ( ulong * ) h) )
00141 #define win_ldap_delete_ext( a, b, c, d, e ) \
00142 ldap_delete_extA((a), (b), (c), (d), ( ( ulong* ) e) )
00143 #define win_ldap_modify_ext( a, b, c, d, e, f ) \
00144 ldap_modify_extA( (a), (b), (c), (d), (e), ( ( ulong * ) f) )
00145 #define win_ldap_modify_ext_s( a, b, c, d, e ) \
00146 ldap_modify_ext_sA( (a), (b), (c), (d), (e) )
00147 # define win_ldap_compare_ext(a, b, c, d, e, f, g) \
00148 my_win_ldap_compare_extA((a), (b), (c), NULL, (d), (e), (f), ( ( ulong* ) g))
00149 #define win_ldap_compare_ext_s(a, b, c, d, e, f) \
00150 my_win_ldap_compare_ext_sA( (a), (b), (c), NULL, (d), (e), (f) )
00151 #define win_ldap_abandon_ext(a, b, c, d) \
00152 ldap_abandon((a), (b))
00153 #else
00154
00155
00156 # define LDAPControl LDAPControlA
00157 # define LDAPMod LDAPModA
00158 # define win_ldap_init(a,b) ldap_initA ((a), (b))
00159 # define win_ldap_simple_bind_s(a,b,c) ldap_simple_bind_sA ((a), (b), (c))
00160 # define win_ldap_sasl_bind(a, b, c, d, e, f, g) \
00161 ldap_sasl_bindA(a, b, c, d, e, f, g)
00162 # define win_ldap_sasl_bind_s(a, b, c, d, e, f, g) \
00163 ldap_sasl_bind_sA(a, b, c, d, e, f, g)
00164 # define win_ldap_search_st(a,b,c,d,e,f,g,h) \
00165 ldap_search_stA ((a), (b), (c), (d), (e), (f), (g), (h))
00166 # define win_ldap_search_ext(a, b, c, d, e, f, g, h, i, j, k) \
00167 my_win_ldap_search_ext((a), (b), (c), (d), (e), (f), (g), (h), (i), (j), (k))
00168 # define win_ldap_get_dn(a, b) ldap_get_dnA((a), (b))
00169 # define win_ldap_first_attribute(a,b,c) ldap_first_attributeA ((a), (b), (c))
00170 # define win_ldap_next_attribute(a,b,c) ldap_next_attributeA ((a), (b), (c))
00171 # define win_ldap_get_values_len(a,b,c) ldap_get_values_lenA ((a), (b), (c))
00172 # define win_ldap_memfree(a) ldap_memfreeA ((a))
00173 # define win_ldap_err2string(a) ldap_err2stringA((a))
00174 # define win_ldap_controls_free(a) ldap_controls_freeA((a))
00175 # define win_ldap_mods_free(a, b) ldap_mods_freeA((a), (b))
00176 # define win_ldap_add_ext(a, b, c, d, e, f) \
00177 ldap_add_extA((a), (b), (c), (d), (e), ((ulong*)f))
00178 # define win_ldap_add_ext_s(a, b, c, d, e) \
00179 ldap_add_ext_sA((a), (b), (c), (d), (e))
00180 # define win_ldap_parse_extended_result(a, b, c, d, e ) \
00181 ldap_parse_extended_resultA((*a), (b), (c), (d), (e))
00182 # define win_ldap_parse_result(a, b, c, d, e, f, g, h ) \
00183 ldap_parse_resultA((a), (b), ((ulong *)c), (d), (e), (f), (g), (h))
00184 # define win_ldap_modify_ext_s(a, b, c, d, e ) \
00185 ldap_modify_ext_sW((a), (b), (c), (d), (e))
00186 # define win_ldap_compare_ext_s(a, b, c, d, e, f ) \
00187 ldap_compare_ext_sA((a), (b), (c), (d), (e), (f))
00188 #endif
00189 #endif