Compartilhar via


ldap_search_init_page (Windows CE 5.0)

Send Feedback

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

PLDAPSearch ldap_search_init_page(LDAP*ExternalHandle,UNICODE PTCHARDistinguishedName,ULONGScopeOfSearch,UNICODE PTCHARSearchFilter,UNICODE PTCHARAttributeList[],ULONGAttributesOnly,LDAPControl** ServerControls,LDAPControl** ClientControls,ULONGPageTimeLimit,ULONGTotalSizeLimit,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 Values

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 toldap_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

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

See Also

LDAPSearch | ldap_search_abandon_page | LDAPSortKey

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.