I am using the following code but the ldap_get_values funtions returns me the following error LDAP_DECODING_ERROR.
if (ldap_search_s (m_pLdapConnection, tcsDN, LDAP_SCOPE_SUBTREE, SearchFilter, pattribs, 0, &lMsg) == LDAP_SUCCESS)
{
(tcspValue = ldap_get_values (m_pLdapConnection, lMsg, (PTSTR) tcsInit)) != NULL)
}
can you please help me ??
3 2293
Are you missing some code?
if (ldap_search_s (m_pLdapConnection, tcsDN, LDAP_SCOPE_SUBTREE, SearchFilter, pattribs, 0, &lMsg) == LDAP_SUCCESS)
{
(tcspValue = ldap_get_values (m_pLdapConnection, lMsg, (PTSTR) tcsInit)) != NULL)
}
Maybe it's should be this way?? -
if (ldap_search_s (m_pLdapConnection, tcsDN, LDAP_SCOPE_SUBTREE, SearchFilter, pattribs, 0, &lMsg) == LDAP_SUCCESS)
-
{
-
if ((tcspValue = ldap_get_values (m_pLdapConnection, lMsg, (PTSTR) tcsInit)) != NULL)
-
{
-
/* got the values*/
-
}
-
else
-
{
-
/* error */
-
}
-
-
}
-
The actual code is like this. -
if (ldap_search_s (m_pLdapConnection, tcsDN, LDAP_SCOPE_SUBTREE, SearchFilter, pattribs, 0, &lMsg) == LDAP_SUCCESS)
-
{
-
int flag = 0;
-
for ( e = ldap_first_entry ( m_pLdapConnection, lMsg); e != NULL; e = ldap_next_entry ( m_pLdapConnection, e ) )
-
{
-
flag = 1;
-
TCHAR tcsInit [MAX_PATH] = {0};
-
_tcscpy (tcsInit, _T("objectCategory"));
-
if ( ( tcspValue = ldap_get_values (m_pLdapConnection, lMsg, (PTSTR) tcsInit)) != NULL )
-
{
-
for ( int i = 0; tcspValue[i] != NULL ; i++ )
-
{ //Success
-
}
-
}
-
else
-
{
-
//failure
-
}
-
}
-
else
-
//failure
-
}
-
else
-
//failure
-
-
Plz help folks. it's urgent.
Are you missing some code?
Maybe it's should be this way?? -
if (ldap_search_s (m_pLdapConnection, tcsDN, LDAP_SCOPE_SUBTREE, SearchFilter, pattribs, 0, &lMsg) == LDAP_SUCCESS)
-
{
-
if ((tcspValue = ldap_get_values (m_pLdapConnection, lMsg, (PTSTR) tcsInit)) != NULL)
-
{
-
/* got the values*/
-
}
-
else
-
{
-
/* error */
-
}
-
-
}
-
How do you know you are getting an LDAP_DECODING_ERROR when all I see is a test for LDAP_SUCCESS??
Sign in to post your reply or Sign up for a free account.
Similar topics
by: newbie |
last post by:
Hi all ,
I'm using CDO from my vb component to fire email. The problem is
whenever one of the email addresses in to, or cc is wrong then none of
the mails are fired even to the correct...
|
by: eje |
last post by:
IsNumeric(value) should return false if value "can not be
successfully converted to a Double." Instead I get the
following error message: "Input string was not in a
correct format."
I use the...
|
by: Börni |
last post by:
Hi,
I'm just wondering why one cant do something like this outside of an
function:
alert(document.getElementById("edit"));
this just gives null, but inside a function it works.
|
by: IMS.Rushikesh |
last post by:
Hi All,
I am trying to execute below code but it gives me an COMException
///// Code Start ////
public string GetName(Excel.Range range)
{
try
{
if (range.Name != null)
|
by: vips |
last post by:
Page_Load
datagrid1.datasource=dataset1
//I am filling the datagrid and it works fine when page is displayed
end
---------------
|
by: aamircheema |
last post by:
Hi,
When I compile my program adding -O option, the running time of my
program is much smaller. For example if i compile my program like this
g++ -Wall -g prog2.cc avltree.cc cells_list.cc...
|
by: Tejas |
last post by:
Hi,
I am using ldap_get_values() call to get the user attributes from
LDAP.
This call is returning the user attributes in UTF-8 encoding and its a
PCHAR*. For normal English characters this...
|
by: Pradeep |
last post by:
Hi All,
I am facing an issue where length method of std::string class gives a
junk value when used in a expression.
Here's an example. The code should not go into the for loop but it
does...
|
by: Peng Yu |
last post by:
Hi,
I don't understand why rbegin() -rend() gives a negative number.
Since rbegin() + 1 gives the one before the last element, I think
rbegin() - rend() should give a positive number.
...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
| |