Directory Services |
The LDAPMod structure holds data required to perform a modification operation.
typedef struct ldapmod {
ULONG mod_op;
PWCHAR mod_type;
union {
PWCHAR* modv_strvals;
struct berval** modv_bvals;
} mod_vals; } LDAPMod,
*PLDAPMod;
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.
Value | Meaning |
---|---|
LDAP_MOD_ADD (0x00) | Adds a value to the entry. The supplied values are appended to the existing values in the attribute. |
LDAP_MOD_DELETE (0x01) | Deletes a value in the entry. The supplied values are deleted from the current attribute values. |
LDAP_MOD_REPLACE (0x02) | Replaces a value in the entry. The supplied values replace the existing attribute values. |
Assign values to the fields of the LDAPMod structure before you call one of the modification functions ( ldap_add*, or ldap_modify*).
ldap_modify* with the LDAP_MOD_REPLACE operation does not delete an attribute when passed a null pointer. However, LDAP_MOD_DELETE deletes the entire attribute when mod_vals is set to NULL.
When passing a LDAPMod structure into the ldap_add* functions, only the LDAP_MOD_BVALUES flag is significant. Creating a new object implies adding values to it.
Client: Included in Windows XP and
Windows 2000 Professional.
Server: Included in Windows Server 2003 and
Windows 2000 Server.
Redistributable: Requires Active Directory Client Extension
on Windows NT 4.0 SP6a and Windows 95/98/Me.
Unicode: Declared as Unicode and ANSI structures.
Header: Declared in Winldap.h.
berval, Data Structures, ldap_add, ldap_modify, ldap_modify_s, Modifying a Directory Entry