ldap_compare_s (Windows CE 5.0)
This function determines whether an attribute for a given entry holds a known value.
ULONG ldap_compare_s(LDAP* ld,UNICODE PTCHARdn,UNICODE PTCHARattr,UNICODE PTCHARvalue);
Parameters
- ld
[in] Session handle. - dn
[in] Distinguished name of the entry. - attr
[in] Attribute to compare. - value
[in] String attribute value to compare to the attribute value.
Return Values
If this function succeeds, and the attribute and known values match, the return value is LDAP_COMPARE_TRUE. If the values do not match, the return value is LDAP_COMPARE_FALSE.
If this function fails, it returns an error code. See the LDAP_RETCODE enumeration for a list of possible return values.
Remarks
This function initiates a synchronous compare operation, comparing the value of an attribute to a known string value. Use the ldap_compare_ext_s function if you need to compare binary values. Use ldap_compare or ldap_compare_ext to carry out an asynchronous compare operation.
In a multithreading environment, calls to ldap_compare_s are thread-safe.
When connecting to an LDAP 2 server, the application must perform a bind operation, (by calling one of the ldap_bind or ldap_simple_bind routines) before attempting any other operations.
Requirements
OS Versions: Windows CE .NET 4.0 and later.
Header: Winldap.h.
Link Library: Wldap32.lib.
See Also
LDAP_RETCODE | ldap_bind | ldap_compare | ldap_compare_ext | ldap_compare_ext_s | ldap_simple_bind
Send Feedback on this topic to the authors