大网数据广告活动
域与目录服务

Modifying Attributes with ADSI

· 52CE 我爱测

To modify attribute values, ADSI provides the IADs.Put and IADs.PutEx methods. These methods modify the data on the client-side cache. The IADs.SetInfo method must be called to commit the changes to the directory.

To modify attribute values, ADSI provides the IADs.Put and IADs.PutEx methods. These methods modify the data on the client-side cache. The IADs.SetInfo method must be called to commit the changes to the directory.

Note:
When multiple attribute changes are committed in a single call to IADs.SetInfo, if any single attribute cannot be modified, none of the attributes will be modified. For example, if you modify the sn and givenName attributes and clear the telephoneNumber attribute of a user object without any subsequent calls to the SetInfo method, the changes are entered when you call SetInfo. If one or more of the modifications are not allowed and therefore cannot be performed, then none of the collective modifications made to the attributes are entered during the call to SetInfo.

The IADs.Put method takes an attribute name and a variant parameter. Use this method to set attributes that contain both single and multiple values.

The IADs.PutEx method provides control over operations on multi-valued attributes. You can append, delete, update, and clear existing values. The IADs.PutEx method always expects a variant array of attribute values. However, you can use this method to set an attribute with a single value as well.

The IADs.PutEx method uses the operations specified by the ADS_PROPERTY_OPERATION_ENUM enumeration.

Source: Microsoft Learn / Windows Win32 documentation by Microsoft and contributors. Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.

资料来源与适用范围

资料来源
Microsoft Learn / Windows Win32 documentation
适用范围
Windows Win32 API · Source date 05/31/2018
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY 4.0 (documentation), MIT (code samples)

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。