Compartilhar via


ldap_compare_ext (Windows CE 5.0)

Send Feedback

This function determines whether an attribute for a given entry holds a known value.

ULONG ldap_compare_ext(LDAP* ld,UNICODE PTCHARdn,UNICODE PTCHARAttr,UNICODE PTCHARValue,struct berval* Data,LDAPControl** ServerControls,LDAPControl** ClientControls,ULONG* MessageNumber);

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.
  • Data
    [in] The berval attribute value to be compared to the attribute value.
  • ServerControls
    [in] List of LDAP server controls.
  • ClientControls
    [in] List of client controls.
  • MessageNumber
    [out] Message identifier for the compare operation.

Return Values

If this function succeeds, the return value is LDAP_SUCCESS.

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 an asynchronous 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 function. The extended routine includes additional parameters to support client and server controls, comparison of binary values, and thread safety.

Use the Value parameter for comparing string values or use the Data parameter 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 Data parameter.

If successful, ldap_compare_ext passes back the message identifier for the operation in the MessageNumber parameter. Call the ldap_result function with the message identifier to obtain the result of the comparison. If you prefer to have the function return the compare result directly, use the synchronous extended compare function ldap_compare_ext_s.

In a multithreading environment, calls to ldap_compare_ext are thread-safe.

Requirements

OS Versions: Windows CE .NET 4.0 and later.
Header: Winldap.h.
Link Library: Wldap32.lib.

See Also

LDAP_RETCODE | berval | ldap_compare | ldap_compare_ext_s | ldap_result

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.