ReactOS 0.4.15-dev-5672-gf73ac17
wldap32.h File Reference
#include "wine/heap.h"
#include "wine/unicode.h"
Include dependency graph for wldap32.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

ULONG map_error (int) DECLSPEC_HIDDEN
 
static charstrdupU (const char *src)
 
static WCHARstrdupW (const WCHAR *src)
 
static LPWSTR strAtoW (LPCSTR str)
 
static LPSTR strWtoA (LPCWSTR str)
 
static charstrWtoU (LPCWSTR str)
 
static LPWSTR strUtoW (char *str)
 
static void strfreeA (LPSTR str)
 
static void strfreeW (LPWSTR str)
 
static void strfreeU (char *str)
 
static DWORD strarraylenA (LPSTR *strarray)
 
static DWORD strarraylenW (LPWSTR *strarray)
 
static DWORD strarraylenU (char **strarray)
 
static LPWSTRstrarrayAtoW (LPSTR *strarray)
 
static LPSTRstrarrayWtoA (LPWSTR *strarray)
 
static char ** strarrayWtoU (LPWSTR *strarray)
 
static LPWSTRstrarrayUtoW (char **strarray)
 
static void strarrayfreeA (LPSTR *strarray)
 
static void strarrayfreeW (LPWSTR *strarray)
 
static void strarrayfreeU (char **strarray)
 

Variables

HINSTANCE hwldap32 DECLSPEC_HIDDEN
 

Function Documentation

◆ map_error()

ULONG map_error ( int  error)

Definition at line 40 of file error.c.

41{
42 switch (error)
43 {
44#ifdef HAVE_LDAP_H
61#endif
62 default: return error;
63 }
64}
#define error(str)
Definition: mkdosfs.c:1605
#define LDAP_SERVER_DOWN
Definition: winldap.h:101
#define LDAP_REFERRAL_LIMIT_EXCEEDED
Definition: winldap.h:117
#define LDAP_MORE_RESULTS_TO_RETURN
Definition: winldap.h:115
#define LDAP_USER_CANCELLED
Definition: winldap.h:108
#define LDAP_DECODING_ERROR
Definition: winldap.h:104
#define LDAP_TIMEOUT
Definition: winldap.h:105
#define LDAP_LOCAL_ERROR
Definition: winldap.h:102
#define LDAP_CLIENT_LOOP
Definition: winldap.h:116
#define LDAP_AUTH_UNKNOWN
Definition: winldap.h:106
#define LDAP_PARAM_ERROR
Definition: winldap.h:109
#define LDAP_NO_MEMORY
Definition: winldap.h:110
#define LDAP_NO_RESULTS_RETURNED
Definition: winldap.h:114
#define LDAP_CONTROL_NOT_FOUND
Definition: winldap.h:113
#define LDAP_NOT_SUPPORTED
Definition: winldap.h:112
#define LDAP_CONNECT_ERROR
Definition: winldap.h:111
#define LDAP_FILTER_ERROR
Definition: winldap.h:107
@ WLDAP32_LDAP_USER_CANCELLED
@ WLDAP32_LDAP_DECODING_ERROR
@ WLDAP32_LDAP_MORE_RESULTS_TO_RETURN
@ WLDAP32_LDAP_AUTH_UNKNOWN
@ WLDAP32_LDAP_LOCAL_ERROR
@ WLDAP32_LDAP_PARAM_ERROR
@ WLDAP32_LDAP_NOT_SUPPORTED
@ WLDAP32_LDAP_NO_RESULTS_RETURNED
@ 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

◆ strarrayAtoW()

static LPWSTR * strarrayAtoW ( LPSTR strarray)
inlinestatic

Definition at line 134 of file wldap32.h.

135{
136 LPWSTR *strarrayW = NULL;
137 DWORD size;
138
139 if (strarray)
140 {
141 size = sizeof(WCHAR*) * (strarraylenA( strarray ) + 1);
142 if ((strarrayW = heap_alloc( size )))
143 {
144 LPSTR *p = strarray;
145 LPWSTR *q = strarrayW;
146
147 while (*p) *q++ = strAtoW( *p++ );
148 *q = NULL;
149 }
150 }
151 return strarrayW;
152}
static void * heap_alloc(size_t len)
Definition: appwiz.h:65
#define NULL
Definition: types.h:112
unsigned long DWORD
Definition: ntddk_ex.h:95
GLdouble GLdouble GLdouble GLdouble q
Definition: gl.h:2063
GLsizeiptr size
Definition: glext.h:5919
GLfloat GLfloat p
Definition: glext.h:8902
static DWORD strarraylenA(LPSTR *strarray)
Definition: wldap32.h:113
static LPWSTR strAtoW(LPCSTR str)
Definition: wldap32.h:50
char * LPSTR
Definition: xmlstorage.h:182
__wchar_t WCHAR
Definition: xmlstorage.h:180
WCHAR * LPWSTR
Definition: xmlstorage.h:184

Referenced by ldap_count_valuesA(), ldap_search_ext_sA(), ldap_search_extA(), ldap_search_sA(), ldap_search_stA(), and ldap_searchA().

◆ strarrayfreeA()

static void strarrayfreeA ( LPSTR strarray)
inlinestatic

Definition at line 214 of file wldap32.h.

215{
216 if (strarray)
217 {
218 LPSTR *p = strarray;
219 while (*p) strfreeA( *p++ );
220 heap_free( strarray );
221 }
222}
static BOOL heap_free(void *mem)
Definition: appwiz.h:75
static void strfreeA(LPSTR str)
Definition: wldap32.h:98

Referenced by ldap_value_freeA().

◆ strarrayfreeU()

static void strarrayfreeU ( char **  strarray)
inlinestatic

Definition at line 234 of file wldap32.h.

235{
236 if (strarray)
237 {
238 char **p = strarray;
239 while (*p) strfreeU( *p++ );
240 heap_free( strarray );
241 }
242}
static void strfreeU(char *str)
Definition: wldap32.h:108

Referenced by ldap_get_valuesW(), ldap_search_ext_sW(), ldap_search_extW(), ldap_search_stW(), ldap_search_sW(), and ldap_searchW().

◆ strarrayfreeW()

static void strarrayfreeW ( LPWSTR strarray)
inlinestatic

Definition at line 224 of file wldap32.h.

225{
226 if (strarray)
227 {
228 LPWSTR *p = strarray;
229 while (*p) strfreeW( *p++ );
230 heap_free( strarray );
231 }
232}
static void strfreeW(LPWSTR str)
Definition: wldap32.h:103

Referenced by ldap_count_valuesA(), ldap_search_ext_sA(), ldap_search_extA(), ldap_search_sA(), ldap_search_stA(), ldap_searchA(), and ldap_value_freeW().

◆ strarraylenA()

static DWORD strarraylenA ( LPSTR strarray)
inlinestatic

Definition at line 113 of file wldap32.h.

114{
115 LPSTR *p = strarray;
116 while (*p) p++;
117 return p - strarray;
118}

Referenced by strarrayAtoW().

◆ strarraylenU()

static DWORD strarraylenU ( char **  strarray)
inlinestatic

Definition at line 127 of file wldap32.h.

128{
129 char **p = strarray;
130 while (*p) p++;
131 return p - strarray;
132}

Referenced by strarrayUtoW().

◆ strarraylenW()

static DWORD strarraylenW ( LPWSTR strarray)
inlinestatic

Definition at line 120 of file wldap32.h.

121{
122 LPWSTR *p = strarray;
123 while (*p) p++;
124 return p - strarray;
125}

Referenced by strarrayWtoA(), and strarrayWtoU().

◆ strarrayUtoW()

static LPWSTR * strarrayUtoW ( char **  strarray)
inlinestatic

Definition at line 194 of file wldap32.h.

195{
196 LPWSTR *strarrayW = NULL;
197 DWORD size;
198
199 if (strarray)
200 {
201 size = sizeof(WCHAR*) * (strarraylenU( strarray ) + 1);
202 if ((strarrayW = heap_alloc( size )))
203 {
204 char **p = strarray;
205 LPWSTR *q = strarrayW;
206
207 while (*p) *q++ = strUtoW( *p++ );
208 *q = NULL;
209 }
210 }
211 return strarrayW;
212}
static DWORD strarraylenU(char **strarray)
Definition: wldap32.h:127
static LPWSTR strUtoW(char *str)
Definition: wldap32.h:86

Referenced by ldap_explode_dnW(), ldap_get_optionW(), ldap_get_valuesW(), ldap_parse_referenceW(), and ldap_parse_resultW().

◆ strarrayWtoA()

static LPSTR * strarrayWtoA ( LPWSTR strarray)
inlinestatic

Definition at line 154 of file wldap32.h.

155{
156 LPSTR *strarrayA = NULL;
157 DWORD size;
158
159 if (strarray)
160 {
161 size = sizeof(LPSTR) * (strarraylenW( strarray ) + 1);
162 if ((strarrayA = heap_alloc( size )))
163 {
164 LPWSTR *p = strarray;
165 LPSTR *q = strarrayA;
166
167 while (*p) *q++ = strWtoA( *p++ );
168 *q = NULL;
169 }
170 }
171 return strarrayA;
172}
static LPSTR strWtoA(LPCWSTR str)
Definition: wldap32.h:62
static DWORD strarraylenW(LPWSTR *strarray)
Definition: wldap32.h:120

Referenced by ldap_explode_dnA(), ldap_get_optionA(), ldap_get_valuesA(), ldap_parse_referenceA(), and ldap_parse_resultA().

◆ strarrayWtoU()

static char ** strarrayWtoU ( LPWSTR strarray)
inlinestatic

Definition at line 174 of file wldap32.h.

175{
176 char **strarrayU = NULL;
177 DWORD size;
178
179 if (strarray)
180 {
181 size = sizeof(char*) * (strarraylenW( strarray ) + 1);
182 if ((strarrayU = heap_alloc( size )))
183 {
184 LPWSTR *p = strarray;
185 char **q = strarrayU;
186
187 while (*p) *q++ = strWtoU( *p++ );
188 *q = NULL;
189 }
190 }
191 return strarrayU;
192}
static char * strWtoU(LPCWSTR str)
Definition: wldap32.h:74

Referenced by ldap_search_ext_sW(), ldap_search_extW(), ldap_search_stW(), ldap_search_sW(), and ldap_searchW().

◆ strAtoW()

static LPWSTR strAtoW ( LPCSTR  str)
inlinestatic

Definition at line 50 of file wldap32.h.

51{
52 LPWSTR ret = NULL;
53 if (str)
54 {
55 DWORD len = MultiByteToWideChar( CP_ACP, 0, str, -1, NULL, 0 );
56 if ((ret = heap_alloc( len * sizeof(WCHAR) )))
58 }
59 return ret;
60}
#define CP_ACP
Definition: compat.h:109
#define MultiByteToWideChar
Definition: compat.h:110
GLenum GLsizei len
Definition: glext.h:6722
const WCHAR * str
int ret

Referenced by strarrayAtoW().

◆ strdupU()

static char * strdupU ( const char src)
inlinestatic

Definition at line 34 of file wldap32.h.

35{
36 char *dst;
37 if (!src) return NULL;
38 if ((dst = heap_alloc( (strlen( src ) + 1) * sizeof(char) ))) strcpy( dst, src );
39 return dst;
40}
ACPI_SIZE strlen(const char *String)
Definition: utclib.c:269
char * strcpy(char *DstString, const char *SrcString)
Definition: utclib.c:388
GLenum src
Definition: glext.h:6340
GLenum GLenum dst
Definition: glext.h:6340

Referenced by ldap_encode_sort_controlA().

◆ strdupW()

static WCHAR * strdupW ( const WCHAR src)
inlinestatic

Definition at line 42 of file wldap32.h.

43{
44 WCHAR *dst;
45 if (!src) return NULL;
46 if ((dst = heap_alloc( (strlenW( src ) + 1) * sizeof(WCHAR) ))) strcpyW( dst, src );
47 return dst;
48}
#define strlenW(s)
Definition: unicode.h:28
#define strcpyW(d, s)
Definition: unicode.h:29

◆ strfreeA()

static void strfreeA ( LPSTR  str)
inlinestatic

Definition at line 98 of file wldap32.h.

99{
100 heap_free( str );
101}

Referenced by ldap_memfreeA(), and strarrayfreeA().

◆ strfreeU()

◆ strfreeW()

◆ strUtoW()

static LPWSTR strUtoW ( char str)
inlinestatic

◆ strWtoA()

static LPSTR strWtoA ( LPCWSTR  str)
inlinestatic

◆ strWtoU()

Variable Documentation

◆ DECLSPEC_HIDDEN

HINSTANCE hwldap32 DECLSPEC_HIDDEN
extern

Definition at line 289 of file d3dcompiler_private.h.