ReactOS  0.4.15-dev-1197-g8081ba9
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 
252 exit:
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
static void strfreeW(LPWSTR str)
Definition: wldap32.h:103
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define debugstr_a
Definition: kernel32.h:31
int ret
static LPWSTR strAtoW(const char *str)
unsigned int ULONG
Definition: retypes.h:1
void exit(int exitcode)
Definition: _exit.c:33

◆ 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 
308 exit:
309  strfreeU( dnU );
310  controlarrayfreeU( serverctrlsU );
311  controlarrayfreeU( clientctrlsU );
312 
313 #endif
314  return ret;
315 }
static char * strWtoU(LPCWSTR str)
Definition: wldap32.h:74
static void strfreeU(char *str)
Definition: wldap32.h:108
#define LDAPControl
Definition: winldap.h:620
#define debugstr_w
Definition: kernel32.h:32
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
int ret
#define ldap_delete_ext_s
Definition: winldap.h:654
unsigned int ULONG
Definition: retypes.h:1
static UINT map_error(DWORD error)
Definition: service.c:35
void exit(int exitcode)
Definition: _exit.c:33

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 
148 exit:
149  strfreeW( dnW );
150  controlarrayfreeW( serverctrlsW );
151  controlarrayfreeW( clientctrlsW );
152 
153 #endif
154  return ret;
155 }
Definition: tftpd.h:59
static void strfreeW(LPWSTR str)
Definition: wldap32.h:103
ULONG CDECL ldap_delete_extW(WLDAP32_LDAP *ld, PWCHAR dn, PLDAPControlW *serverctrls, PLDAPControlW *clientctrls, ULONG *message)
Definition: delete.c:178
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define debugstr_a
Definition: kernel32.h:31
int ret
static LPWSTR strAtoW(const char *str)
unsigned int ULONG
Definition: retypes.h:1
void exit(int exitcode)
Definition: _exit.c:33

◆ 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 
210 exit:
211  strfreeU( dnU );
212  controlarrayfreeU( serverctrlsU );
213  controlarrayfreeU( clientctrlsU );
214 
215 #endif
216  return ret;
217 }
Definition: tftpd.h:59
static char * strWtoU(LPCWSTR str)
Definition: wldap32.h:74
static void strfreeU(char *str)
Definition: wldap32.h:108
#define LDAPControl
Definition: winldap.h:620
#define ldap_delete_ext
Definition: winldap.h:652
#define debugstr_w
Definition: kernel32.h:32
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
int ret
unsigned char dummy
Definition: maze.c:118
unsigned int ULONG
Definition: retypes.h:1
static UINT map_error(DWORD error)
Definition: service.c:35
void exit(int exitcode)
Definition: _exit.c:33

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 }
static void strfreeW(LPWSTR str)
Definition: wldap32.h:103
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define debugstr_a
Definition: kernel32.h:31
ULONG CDECL ldap_delete_sW(WLDAP32_LDAP *ld, PWCHAR dn)
Definition: delete.c:357
int ret
static LPWSTR strAtoW(const char *str)
unsigned int ULONG
Definition: retypes.h:1

◆ 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 }
static char * strWtoU(LPCWSTR str)
Definition: wldap32.h:74
static void strfreeU(char *str)
Definition: wldap32.h:108
#define debugstr_w
Definition: kernel32.h:32
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
int ret
#define ldap_delete_ext_s
Definition: winldap.h:654
unsigned int ULONG
Definition: retypes.h:1
static UINT map_error(DWORD error)
Definition: service.c:35

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 }
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
static void strfreeW(LPWSTR str)
Definition: wldap32.h:103
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
ULONG CDECL ldap_deleteW(WLDAP32_LDAP *ld, PWCHAR dn)
Definition: delete.c:84
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define debugstr_a
Definition: kernel32.h:31
int ret
static LPWSTR strAtoW(const char *str)
unsigned int ULONG
Definition: retypes.h:1

◆ 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 }
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
static char * strWtoU(LPCWSTR str)
Definition: wldap32.h:74
static void strfreeU(char *str)
Definition: wldap32.h:108
#define ldap_delete_ext
Definition: winldap.h:652
#define debugstr_w
Definition: kernel32.h:32
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
int ret
#define LDAP_SUCCESS
Definition: winldap.h:59
#define msg(x)
Definition: auth_time.c:54
unsigned int ULONG
Definition: retypes.h:1

Referenced by ldap_deleteA().

◆ WINE_DEFAULT_DEBUG_CHANNEL()

WINE_DEFAULT_DEBUG_CHANNEL ( wldap32  )