|This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.|
This function determines whether an attribute for a given entry holds a known value.
ULONG ldap_compare_s( LDAP* ld, UNICODE PTCHAR dn, UNICODE PTCHAR attr, UNICODE PTCHAR value );
[in] Session handle.
[in] Distinguished name of the entry.
[in] Attribute to compare.
[in] String attribute value to compare to the attribute value.
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_RETCODEenumeration for a list of possible return values.
This function initiates a synchronous compare operation, comparing the value of an attribute to a known string value. Use the ldap_compare_ext_sfunction if you need to compare binary values. Use ldap_compareor ldap_compare_extto carry out an asynchronous compare operation.
In a multithreading environment, calls to ldap_compare_sare thread-safe.
|Windows Embedded CE||Windows CE .NET 4.0 and later|
|Windows Mobile||Windows Mobile Version 5.0 and later|