ReactOS 0.4.16-dev-125-g798ea90
delete.c File Reference
#include "config.h"
#include "wine/port.h"
#include <stdarg.h>
#include "windef.h"
#include "winbase.h"
#include "winnls.h"
#include "winldap_private.h"
#include "wldap32.h"
#include "wine/debug.h"
Include dependency graph for delete.c:

Go to the source code of this file.

Functions

 WINE_DEFAULT_DEBUG_CHANNEL (wldap32)
 
ULONG CDECL ldap_deleteA (WLDAP32_LDAP *ld, PCHAR dn)
 
ULONG CDECL ldap_deleteW (WLDAP32_LDAP *ld, PWCHAR dn)
 
ULONG CDECL ldap_delete_extA (WLDAP32_LDAP *ld, PCHAR dn, PLDAPControlA *serverctrls, PLDAPControlA *clientctrls, ULONG *message)
 
ULONG CDECL ldap_delete_extW (WLDAP32_LDAP *ld, PWCHAR dn, PLDAPControlW *serverctrls, PLDAPControlW *clientctrls, ULONG *message)
 
ULONG CDECL ldap_delete_ext_sA (WLDAP32_LDAP *ld, PCHAR dn, PLDAPControlA *serverctrls, PLDAPControlA *clientctrls)
 
ULONG CDECL ldap_delete_ext_sW (WLDAP32_LDAP *ld, PWCHAR dn, PLDAPControlW *serverctrls, PLDAPControlW *clientctrls)
 
ULONG CDECL ldap_delete_sA (WLDAP32_LDAP *ld, PCHAR dn)
 
ULONG CDECL ldap_delete_sW (WLDAP32_LDAP *ld, PWCHAR dn)
 

Function Documentation

◆ 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}
#define NULL
Definition: types.h:112
ULONG CDECL ldap_delete_ext_sW(WLDAP32_LDAP *ld, PWCHAR dn, PLDAPControlW *serverctrls, PLDAPControlW *clientctrls)
Definition: delete.c:280
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
uint32_t ULONG
Definition: typedefs.h:59
int ret
@ WLDAP32_LDAP_PARAM_ERROR
@ WLDAP32_LDAP_NOT_SUPPORTED
static void strfreeW(LPWSTR str)
Definition: wldap32.h:103
__wchar_t WCHAR
Definition: xmlstorage.h:180

◆ 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}
static UINT map_error(DWORD error)
Definition: service.c:35
#define debugstr_w
Definition: kernel32.h:32
#define LDAPControl
Definition: winldap.h:620
#define ldap_delete_ext_s
Definition: winldap.h:654
static void strfreeU(char *str)
Definition: wldap32.h:108
static char * strWtoU(LPCWSTR str)
Definition: wldap32.h:74

Referenced by ldap_delete_ext_sA().

◆ 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
Definition: tftpd.h:60
@ WLDAP32_LDAP_NO_MEMORY

◆ 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

Referenced by ldap_delete_extA().

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

Referenced by ldap_delete_sA().

◆ 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
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_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}
#define msg(x)
Definition: auth_time.c:54
#define LDAP_SUCCESS
Definition: winldap.h:59

Referenced by ldap_deleteA().

◆ WINE_DEFAULT_DEBUG_CHANNEL()

WINE_DEFAULT_DEBUG_CHANNEL ( wldap32  )