IADs::Put

Saves the value for a property for an Active Directory object by name into the property cache. Use IADs::PutEx to save multi-valued properties to the property cache or to remove a property from an object. These values are not persisted to the underlying directory service until a IADs::SetInfo is called.

HRESULT IADs::Put(
  BSTR bstrName, //Name of the property
  VARIANT vProp  //Value of the property
);
 

Parameter

bstrName
[in] Name of the property as defined in the ADSI Schema Class Object for this object, for example "FullName".
vProp
[in] Value of the property.

Return Values

This method supports the standard return values E_FAIL and E_UNEXPECTED, as well as the following:

S_OK
The property value has been set successfully.

QuickInfo

  Windows NT: Use version 4.0 and later.
  Windows CE: Unsupported.
  Header: Declared in iads.h.

See Also

IADs::Get, IADs::GetEx, IADs::PutEx, ADSI Property Object, Property Cache