Share via


LDAPMod (Compact 2013)

3/26/2014

This structure holds information needed to perform a modification operation.

Syntax

typedef struct ldapmod {
  ULONG mod_op;
  PWCHAR mod_type;
  union {
    PWCHAR* modv_strvals;
    struct berval** modv_bvals;
    } mod_vals;
} LDAPMod, *PLDAPMod;

Members

  • mod_op
    Specifies a value to indicate the modification operation to perform. The following table shows the possible values.

    Value

    Description

    LDAP_MOD_ADD (0x00)

    Adds a value to the entry.

    LDAP_MOD_DELETE (0x01)

    Deletes a value in the entry.

    LDAP_MOD_REPLACE (0x02)

    Replaces a value in the entry.

    You can use the bitwise OR operator to combine the operation value with LDAP_MOD_BVALUES to indicate that the mod_vals union uses the modv_bvals member. If LDAP_MOD_BVALUES is not set, the union uses the modv_strvals member.

  • mod_type
    Pointer to a null-terminated string that specifies the name of the attribute to modify.
  • mod_vals
    Pointer to an array of values (if any) to add, delete, or replace. If mop_op does not include the LDAP_MOD_BVALUES flag, the modv_strvals member is a pointer to an array of null-terminated strings. If mop_op includes LDAP_MOD_BVALUES, the modv_bvals member is a pointer to an array of berval pointers, which is useful for specifying binary values.

Remarks

Assign values to the fields of this structure before you call one of the modification functions (ldap_addXXX or ldap_modifyXXX).

A call to the ldap_modify_s function with the LDAP_MOD_REPLACE operation does not delete an attribute when it is passed a null pointer. However, LDAP_MOD_DELETE deletes the entire attribute when mod_vals is set to NULL.

Requirements

Header

winldap.h

See Also

Reference

LDAP Structures
berval
ldap_add
ldap_modify
ldap_modify_s