次の方法で共有


ldap_search_init_page (Windows Embedded CE 6.0)

1/6/2010

This function initializes a search block for a simple paged-results search.

Syntax

PLDAPSearch ldap_search_init_page(
  LDAP* ExternalHandle,
  UNICODE PTCHAR DistinguishedName,
  ULONG ScopeOfSearch,
  UNICODE PTCHAR SearchFilter,
  UNICODE PTCHAR AttributeList[],
  ULONG AttributesOnly,
  LDAPControl** ServerControls,
  LDAPControl** ClientControls,
  ULONG PageTimeLimit,
  ULONG TotalSizeLimit,
  LDAPSortKey** SortKeys
);

Parameters

  • ExternalHandle
    [in] Session handle.
  • DistinguishedName
    [in] Distinguished name of the entry at which to start the search.
  • ScopeOfSearch
    [in] Specifies a value to indicate the scope of the search. The following table shows the possible values.

    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.

  • SearchFilter
    [in] Pointer to a null-terminated string that specifies the search filter.
  • AttributeList
    [in] Null-terminated array of strings indicating which attributes to return for each matching entry. Pass NULL to retrieve all available attributes.
  • AttributesOnly
    [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.
  • PageTimeLimit
    [in] Amount of time the client will wait for the server to return a page.
  • TotalSizeLimit
    [in] Maximum number of entries the client will accept.
  • SortKeys
    [in] Pointer to an LDAPSortKey structure, which specifies the attribute type, the ordering rule, and the direction for the search.

Return Value

If this function succeeds, it returns a pointer to an LDAPSearch structure.

If this function fails, the return value is NULL. Use LdapGetLastError or GetLastError to retrieve the error code.

Remarks

Call ldap_search_init_page to begin a paged-results search. When the function returns, use the returned handle in calls to ldap_get_paged_count, ldap_get_next_page, and ldap_get_next_page_s.

To determine whether a server supports paged-results searches, select the supportedControl property of the root for an object identifier of 1.2.840.113556.1.4.319.

Requirements

Header winldap.h
Library wldap32.lib
Windows Embedded CE Windows CE .NET 4.0 and later

See Also

Reference

LDAP Search Functions
LDAPSearch
ldap_search_abandon_page
LDAPSortKey