Directory Services

ldap_create_vlv_control

The ldap_create_vlv_control function is used to create the request control (LDAP_CONTROL_VLVREQUEST) on the server.

INT ldap_create_vlv_control(
  LDAP* ld,
  LDAPVLVInfo* Vlvinfop,
  char IsCritical,
  LDAPControl** ctrlp
);

Parameters

ld
[in] An LDAP session handle, as obtained from a call to ldap_init.
Vlvinfop
[in] The address of an LDAPVLVInfo structure whose contents are used to construct the value of the control created.
IsCritical
[in] If this value is not zero, the control created will have its criticality set to TRUE.
ctrlp
[out] A result parameter assigned the address of an LDAPControl structure that contains the request control (LDAP_CONTROL_VLVREQUEST) created by this function.

Return Values

The ldap_create_vlv_control function returns an LDAP error code to indicate failure, or LDAP_SUCCESS if successful.

Remarks

When a VLV search is conducted, the client must use this function to create a new VLV control that can be included in the search request sent to the server. The server will assign a contextID for this VLV search, passed to the client. When the VLV search is completed, you should use ldap_control_free to free the control returned by ldap_create_vlv_control, and ldap_controls_free to free the array of controls, including the VLV response control, returned by ldap_parse_result.

For more information, and a code example for this function, see Example Code for Using LDAP VLV.

Requirements

Client: Included in Windows XP.
Server: Included in Windows Server 2003.
Unicode: Implemented as Unicode and ANSI versions.
Header: Declared in Winldap.h.
Library: Use Wldap32.lib.

See Also

ldap_parse_vlv_control, LDAPVLVInfo, Searching with the LDAP VLV Control, LDAP_CONTROL_VLVREQUEST, LDAP_CONTROL_VLVRESPONSE, ldap_search_ext, ldap_search_ext_s, ldap_create_sort_control, LDAPControl