推广 热搜: 行业  机械  设备    系统  教师  经纪  参数    蒸汽 

IADs::PutEx method (iads.h)

   日期:2024-12-23     移动:http://dh99988.xhstdz.com/mobile/quote/85417.html

The IADs::PutEx method modifies the values of an attribute in the ADSI attribute cache. For example, for properties that allow multiple values, you can append additional values to an existing set of values, modify the values in the set, remove specified values from the set, or delete values from the set.

IADs::PutEx method (iads.h)



Control code that indicates the mode of modification: Append, Replace, Remove, and Delete. For more information and a list of values, see ADS_PROPERTY_OPERATION_ENUM.

Contains a BSTR that specifies the property name.

Contains a VARIANT array that contains the new value or values of the property. A single-valued property is represented as an array with a single element. If InControlCode is set to ADS_PROPERTY_CLEAR, the value of the property specified by vProp is irrelevant.

This method supports standard return values, as well as the following.

For more information, see ADSI Error Codes.

PutEx is usually used to set values on multi-value attributes. Unlike the IADs::Put method, with PutEx, you are not required to get the attribute values before you modify them. However, because PutEx only makes changes to attributes values contained in the ADSI property cache, you must use IADs::SetInfo after each PutEx call in order to commit changes to the directory.

PutEx enables you to append values to an existing set of values in a multi-value attribute using ADS_PROPERTY_APPEND. When you update, append, or delete values to a multi-value attribute, you must use an array.

Active Directory does not accept duplicate values on a multi-valued attribute. If you call PutEx to append a duplicate value to a multi-valued attribute of an Active Directory object, the PutEx call succeeds, but the duplicate value is ignored.

Similarly, if you use PutEx to delete one or more values from a multi-valued property of an Active Directory object, the operation succeeds, that is, it will not produce an error, even if any or all of the specified values are not set on the property.

 

Examples

The following code example shows how to use the IADs.PutEx method.


The following code example shows how to use the IADs::PutEx method.



Requirement Value Minimum supported client Windows Vista Minimum supported server Windows Server 2008 Target Platform Windows Header iads.h DLL Activeds.dll

IADs

IADs::Get

IADs::GetEx

IADs::Put

本文地址:http://dh99988.xhstdz.com/quote/85417.html    物流园资讯网 http://dh99988.xhstdz.com/ , 查看更多

特别提示:本信息由相关用户自行提供,真实性未证实,仅供参考。请谨慎采用,风险自负。


0相关评论
相关最新动态
推荐最新动态
点击排行
网站首页  |  关于我们  |  联系方式  |  使用协议  |  版权隐私  |  网站地图  |  排名推广  |  广告服务  |  积分换礼  |  网站留言  |  RSS订阅  |  违规举报  |  鄂ICP备2020018471号