Implement ldap_err2string.
This commit is contained in:
parent
d344162f41
commit
38d350ef00
|
@ -1,3 +1,4 @@
|
|||
Makefile
|
||||
libwldap32.def
|
||||
wldap32.dll.dbg.c
|
||||
wldap32.res
|
||||
|
|
|
@ -4,7 +4,7 @@ SRCDIR = @srcdir@
|
|||
VPATH = @srcdir@
|
||||
MODULE = wldap32.dll
|
||||
IMPORTLIB = libwldap32.$(IMPLIBEXT)
|
||||
IMPORTS = kernel32
|
||||
IMPORTS = user32 kernel32
|
||||
EXTRALIBS = @LDAPLIBS@
|
||||
|
||||
C_SRCS = \
|
||||
|
@ -15,6 +15,8 @@ C_SRCS = \
|
|||
main.c \
|
||||
search.c
|
||||
|
||||
RC_SRCS = wldap32.rc
|
||||
|
||||
@MAKE_DLL_RULES@
|
||||
|
||||
### Dependencies:
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
|
||||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
#include "winuser.h"
|
||||
#include "winnls.h"
|
||||
|
||||
#ifdef HAVE_LDAP_H
|
||||
|
@ -39,8 +40,38 @@
|
|||
#include "winldap_private.h"
|
||||
#include "wldap32.h"
|
||||
|
||||
extern HINSTANCE hwldap32;
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(wldap32);
|
||||
|
||||
PCHAR ldap_err2stringA( ULONG err )
|
||||
{
|
||||
static char buf[256] = "";
|
||||
|
||||
TRACE( "(0x%08lx)\n", err );
|
||||
|
||||
if (err <= WLDAP32_LDAP_REFERRAL_LIMIT_EXCEEDED)
|
||||
LoadStringA( hwldap32, err, buf, 256 );
|
||||
else
|
||||
LoadStringA( hwldap32, WLDAP32_LDAP_LOCAL_ERROR, buf, 256 );
|
||||
|
||||
return buf;
|
||||
}
|
||||
|
||||
PWCHAR ldap_err2stringW( ULONG err )
|
||||
{
|
||||
static WCHAR buf[256] = { 0 };
|
||||
|
||||
TRACE( "(0x%08lx)\n", err );
|
||||
|
||||
if (err <= WLDAP32_LDAP_REFERRAL_LIMIT_EXCEEDED)
|
||||
LoadStringW( hwldap32, err, buf, 256 );
|
||||
else
|
||||
LoadStringW( hwldap32, WLDAP32_LDAP_LOCAL_ERROR, buf, 256 );
|
||||
|
||||
return buf;
|
||||
}
|
||||
|
||||
/*
|
||||
* NOTES: does nothing
|
||||
*/
|
||||
|
|
|
@ -26,6 +26,8 @@
|
|||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
|
||||
HINSTANCE hwldap32;
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(wldap32);
|
||||
|
||||
BOOL WINAPI DllMain( HINSTANCE hinst, DWORD reason, LPVOID reserved )
|
||||
|
@ -35,6 +37,7 @@ BOOL WINAPI DllMain( HINSTANCE hinst, DWORD reason, LPVOID reserved )
|
|||
switch (reason)
|
||||
{
|
||||
case DLL_PROCESS_ATTACH:
|
||||
hwldap32 = hinst;
|
||||
DisableThreadLibraryCalls( hinst );
|
||||
break;
|
||||
case DLL_PROCESS_DETACH:
|
||||
|
|
|
@ -120,6 +120,8 @@ ULONG ldap_bindA(WLDAP32_LDAP*,PCHAR,PCHAR,ULONG);
|
|||
ULONG ldap_bindW(WLDAP32_LDAP*,PWCHAR,PWCHAR,ULONG);
|
||||
ULONG ldap_bind_sA(WLDAP32_LDAP*,PCHAR,PCHAR,ULONG);
|
||||
ULONG ldap_bind_sW(WLDAP32_LDAP*,PWCHAR,PWCHAR,ULONG);
|
||||
PCHAR ldap_err2stringA(ULONG);
|
||||
PWCHAR ldap_err2stringW(ULONG);
|
||||
WLDAP32_LDAP *ldap_initA(const PCHAR,ULONG);
|
||||
WLDAP32_LDAP *ldap_initW(const PWCHAR,ULONG);
|
||||
WLDAP32_LDAP *ldap_openA(PCHAR,ULONG);
|
||||
|
|
|
@ -0,0 +1,25 @@
|
|||
/*
|
||||
* Top level resource file for WLDAP32
|
||||
*
|
||||
* Copyright 2005 Hans Leidekker
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
#include "winuser.h"
|
||||
|
||||
#include "wldap32_En.rc"
|
|
@ -19,6 +19,9 @@
|
|||
@ cdecl ldap_bind_s(ptr str str long) ldap_bind_sA
|
||||
@ cdecl ldap_bind_sA(ptr str str long)
|
||||
@ cdecl ldap_bind_sW(ptr wstr wstr long)
|
||||
@ cdecl ldap_err2string(long) ldap_err2stringA
|
||||
@ cdecl ldap_err2stringA(long)
|
||||
@ cdecl ldap_err2stringW(long)
|
||||
@ cdecl ldap_init(str long) ldap_initA
|
||||
@ cdecl ldap_initA(str long)
|
||||
@ cdecl ldap_initW(wstr long)
|
||||
|
|
|
@ -0,0 +1,123 @@
|
|||
/*
|
||||
* English resources for WLDAP32
|
||||
*
|
||||
* Copyright 2005 Hans Leidekker
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
LANGUAGE LANG_ENGLISH, SUBLANG_DEFAULT
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
{
|
||||
0 "Success"
|
||||
1 "Operations Error"
|
||||
2 "Protocol Error"
|
||||
3 "Time Limit Exceeded"
|
||||
4 "Size Limit Exceeded"
|
||||
5 "Compare False"
|
||||
6 "Compare True"
|
||||
7 "Authentication Method Not Supported"
|
||||
8 "Strong Authentication Required"
|
||||
9 "Referral (v2)"
|
||||
10 "Referral"
|
||||
11 "Administration Limit Exceeded"
|
||||
12 "Unavailable Critical Extension"
|
||||
13 "Confidentiality Required"
|
||||
14 ""
|
||||
15 ""
|
||||
16 "No Such Attribute"
|
||||
17 "Undefined Type"
|
||||
18 "Inappropriate Matching"
|
||||
19 "Constraint Violation"
|
||||
20 "Attribute Or Value Exists"
|
||||
21 "Invalid Syntax"
|
||||
22 ""
|
||||
23 ""
|
||||
24 ""
|
||||
25 ""
|
||||
26 ""
|
||||
27 ""
|
||||
28 ""
|
||||
29 ""
|
||||
30 ""
|
||||
31 ""
|
||||
32 "No Such Object"
|
||||
33 "Alias Problem"
|
||||
34 "Invalid DN Syntax"
|
||||
35 "Is Leaf"
|
||||
36 "Alias Dereference Problem"
|
||||
37 ""
|
||||
38 ""
|
||||
39 ""
|
||||
40 ""
|
||||
41 ""
|
||||
42 ""
|
||||
43 ""
|
||||
44 ""
|
||||
45 ""
|
||||
46 ""
|
||||
47 ""
|
||||
48 "Inappropriate Authentication"
|
||||
49 "Invalid Credentials"
|
||||
50 "Insufficient Rights"
|
||||
51 "Busy"
|
||||
52 "Unavailable"
|
||||
53 "Unwilling To Perform"
|
||||
54 "Loop Detected"
|
||||
55 ""
|
||||
56 ""
|
||||
57 ""
|
||||
58 ""
|
||||
59 ""
|
||||
60 "Sort Control Missing"
|
||||
61 "Index range error"
|
||||
62 ""
|
||||
63 ""
|
||||
64 "Naming Violation"
|
||||
65 "Object Class Violation"
|
||||
66 "Not allowed on Non-leaf"
|
||||
67 "Not allowed on RDN"
|
||||
68 "Already Exists"
|
||||
69 "No Object Class Mods"
|
||||
70 "Results Too Large"
|
||||
71 "Affects Multiple DSAs"
|
||||
72 ""
|
||||
73 ""
|
||||
74 ""
|
||||
75 ""
|
||||
76 ""
|
||||
77 ""
|
||||
78 ""
|
||||
79 ""
|
||||
80 "Other"
|
||||
81 "Server Down"
|
||||
82 "Local Error"
|
||||
83 "Encoding Error"
|
||||
84 "Decoding Error"
|
||||
85 "Timeout"
|
||||
86 "Auth Unknown"
|
||||
87 "Filter Error"
|
||||
88 "User Cancelled"
|
||||
89 "Parameter Error"
|
||||
90 "No Memory"
|
||||
91 "Can't connect to the LDAP server"
|
||||
92 "Operation not supported by this version of the LDAP protocol"
|
||||
93 "Specified control was not found in message"
|
||||
94 "No result present in message"
|
||||
95 "More results returned"
|
||||
96 "Loop while handling referrals"
|
||||
97 "Referral hop limit exceeded"
|
||||
}
|
Loading…
Reference in New Issue