Compartir a través de


ldap_search_ext_s (Windows CE 5.0)

Send Feedback

This function searches the LDAP directory and returns a requested set of attributes for each entry matched.

ULONG ldap_search_ext_s(LDAP* ld,UNICODE PTCHARbase,ULONGscope,UNICODE PTCHARfilter,UNICODE PTCHARattrs[],ULONGattrsonly,LDAPControl** ServerControls,LDAPControl** ClientControls,struct l_timeval* timeout,ULONGSizeLimit,LDAPMessage** res);

Parameters

  • ld
    [in] Session handle.
  • base
    [in] Distinguished name of the entry at which to start the search.
  • scope
    [in] Specifies one of the following values to indicate the scope of the search.
    Value Description
    LDAP_SCOPE_BASE Searches the base entry only.
    LDAP_SCOPE_ONELEVEL Searches all entries in the first level below the base entry, excluding the base entry.
    LDAP_SCOPE_SUBTREE Searches the base entry and all entries in the tree below the base.
  • filter
    [in] Pointer to a null-terminated string that specifies the search filter.
  • attrs
    [in] Null-terminated array of strings indicating which attributes to return for each matching entry. Pass NULL to retrieve all available attributes.
  • attrsonly
    [in] Boolean value that should be zero if both attribute types and values are to be returned and nonzero if only types are wanted.
  • ServerControls
    [in] List of LDAP server controls.
  • ClientControls
    [in] List of client controls.
  • timeout
    [in] Specifies both the local search time-out value in seconds and the operation time limit that is sent to the server within the search request.
  • SizeLimit
    [in] Limit on the number of entries to return from the search. A value of zero means no limit.
  • res
    [out] Contains the results of the search upon completion of the call.

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 a synchronous search operation. The parameters and effects of this function include those of ldap_search_s. The extended routine includes additional parameters to support client and server controls and to specify size and time limits for each search operation.

You can use the ldap_set_option function with the ld session handle to set the LDAP_OPT_DEREF option that determines how the search is performed. Two other search options, LDAP_OPT_SIZELIMIT and LDAP_OPT_TIMELIMIT, are ignored in favor of the SizeLimit and TimeLimit option parameters in this function.

Upon completion of the search operation, ldap_search_ext_s returns to the caller. Use ldap_search_ext if you prefer to have the operation carried out asynchronously.

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

Requirements

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

See Also

ldap_search_ext | ldap_search_s

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.