Share via


LDAP_CONTROL_VLVREQUEST control code

The LDAP_CONTROL_VLVREQUEST control is used to request virtual list view support from the server.

To use this control, set the members of the LDAPControl structure as follows:

PWCHAR ldctl_oid = LDAP_CONTROL_VLVREQUEST;
struct berval ldctl_value;
BOOLEAN ldctl_iscritical;

Members

ldctl_oid

LDAP_CONTROL_VLVREQUEST which is defined as "2.16.840.1.113730.3.4.9".

ldctl_value

Specifies a controlValue that is an OCTET string whose value is a BER-encoded sequence of parameters that the application uses to specify the LDAP_CONTROL_VLVREQUEST control. In the berval structure, set bv_val to a pointer to the sequence that contains the virtual list view data, and set bv_len to the length of the sequence. For more information, see the Remarks section.

ldctl_iscritical

Can be TRUE or FALSE depending on whether the search call is critical to your application.

Remarks

If this control is included in a SearchRequest message, a server-side sorting request control must also be present in the message. The ldctl_value field is set to the following BER-encoded sequence.

Sequence {
  beforeCount  INTEGER (0..maxInt),
  afterCount   INTEGER (0..maxInt),
  CHOICE {
    byoffset [0]            SEQUENCE {
      offset                  INTEGER (0 .. maxInt),
      contentCount            INTEGER (0 .. maxInt) },
    greaterThanOrEqual [1]  AssertionValue },
  contextID              OCTET STRING OPTIONAL }

The following table lists the sequence fields.

Sequence data Description
beforeCount
Indicates the number of entries before the target entry that the client requests the server to send.
afterCount
Indicates the number of entries after the target entry that the client requests the server to send.
offset and contentCount
Identifies the target entry. For more information, see LDAPVLVInfo.
greaterThanOrEqual
An attribute assertion value defined in LDAP 3. If present, this value is used to determine the target entry by comparing it to the values of the attribute specified in the sk_attrtype member of the LDAPSortKey structure. The first list entry that has a value that is more than the value is the target entry. When the sort order is reversed, using the sk_reverseorder member of the LDAPSortKey structure, then to be the target entry, this value must be less than or equal to the value of the attribute specified by sk_attrtype.
contextID
If present, this field contains the context ID for the session sent by the server in the last LDAP_CONTROL_VLVRESPONSE control. Because the context ID is valid only on the server that sent it, the client should never submit a context ID received from another connection, a closed connection, or a different server.

Use the ldap_create_sort_control function to create a sort control to pass to the server along with the LDAP_CONTROL_VLVREQUEST control, instead of attempting to format this control manually.

Requirements

Minimum supported client
Windows Vista
Minimum supported server
Windows Server 2008
Header
Winldap.h

See also

Using Controls