Important: |
---|
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.
Syntax
ULONG ldap_compare_ext_s( LDAP* ld, UNICODE PTCHAR dn, UNICODE PTCHAR Attr, UNICODE PTCHAR Value, struct berval* Data, LDAPControl** ServerControls, LDAPControl** ClientControls ); |
Parameters
- ld
-
[in] Session handle.
- dn
-
[in] Distinguished name of the entry to compare.
- Attr
-
[in] Attribute to compare.
- Value
-
[in] String attribute value to be compared to the attribute value. If it is not null, the data must be null.
- Data
-
[in] The bervalattribute value to be compared to the attribute value. If it is not null, the value must be null.
- ServerControls
-
[in] List of LDAP server controls.
- ClientControls
-
[in] List of LDAP client controls.
Return 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.
Remarks
This function initiates a synchronous compare operation, comparing the value of an attribute to a known value. The parameters and effects of this function include those of the ldap_compare_sfunction. The extended routine includes additional parameters to support client and server controls and the comparison of binary values.
Use the Valueparameter for comparing string values or use the Dataparameter for comparing raw binary data. Set the unused parameter to NULL. If neither parameter is NULL, the compare operation will use the value in the Dataparameter.
In a multithreading environment, calls to this function are thread-safe.
Requirements
Header | winldap.h |
Library | wldap32.lib |
Windows Embedded CE | Windows CE .NET 4.0 and later |
Windows Mobile | Windows Mobile Version 5.0 and later |