ldap_create_vlv_controlA function (winldap.h)

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

Syntax

WINLDAPAPI INT LDAPAPI ldap_create_vlv_controlA(
  [in]  PLDAP         ExternalHandle,
  [in]  PLDAPVLVInfo  VlvInfo,
  [in]  UCHAR         IsCritical,
  [out] PLDAPControlA *Control
);

Parameters

[in] ExternalHandle

An LDAP session handle, as obtained from a call to ldap_init.

[in] VlvInfo

The address of an LDAPVLVInfo structure whose contents are used to construct the value of the control created.

[in] IsCritical

If this value is not zero, the control created will have its criticality set to TRUE.

[out] Control

A result parameter assigned the address of an LDAPControl structure that contains the request control (LDAP_CONTROL_VLVREQUEST) created by this function.

Return value

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.

Note

The winldap.h header defines ldap_create_vlv_control as an alias which automatically selects the ANSI or Unicode version of this function based on the definition of the UNICODE preprocessor constant. Mixing usage of the encoding-neutral alias with code that not encoding-neutral can lead to mismatches that result in compilation or runtime errors. For more information, see Conventions for Function Prototypes.

Requirements

Requirement Value
Minimum supported client Windows Vista
Minimum supported server Windows Server 2008
Target Platform Windows
Header winldap.h
Library Wldap32.lib
DLL Wldap32.dll

See also

LDAPControl

LDAPVLVInfo

LDAP_CONTROL_VLVREQUEST

LDAP_CONTROL_VLVRESPONSE

Searching with the LDAP VLV Control

ldap_create_sort_control

ldap_parse_vlv_control

ldap_search_ext

ldap_search_ext_s