Platform SDK: Active Directory, ADSI, and Directory Services

ADSI Constants

Active Directory Service Interfaces (ADSI) defines and uses the following constants.

ADSI Constant Value Description
ADS_ATTR_APPEND 3 Instructs the directory service to append the new value(s) to the existing attribute(s). The attribute and this constant are specified in an ADS_ATTR_INFO array. For more information about using this constant, see Modifying Attributes with ADSI.
ADS_ATTR_CLEAR 1 Instructs the directory service to remove attribute value(s) from an object. The attribute and this constant are specified in an ADS_ATTR_INFO array. For more information about using this constant, see Modifying Attributes with ADSI.
ADS_ATTR_DELETE 4 Instructs the directory service to delete the named attribute value(s) as specified in an ADS_ATTR_INFO array. For more information about using this constant, see Modifying Attributes with ADSI.
ADS_ATTR_UPDATE 2 Instructs the directory service to update the named attribute value(s) as specified in an ADS_ATTR_INFO array. For more information about using this constant, see Modifying Attributes with ADSI.
ADS_EXT_INITCREDENTIALS 1 A control code that indicates that the custom data supplied to the IADsExtension::Operate method contains user credentials.
ADS_EXT_INITIALIZE_COMPLETE 2 A control code used with IADsExtension::Operate to indicate that extensions can perform any necessary initialization, depending on the functionality supported by the parent object.
ADS_EXT_MAXEXTDISPID 16777215 The highest DISPID an extension object can use for its methods and properties.
ADS_EXT_MINEXTDISPID 1 The lowest DISPID an extension object can use for its methods and properties.
DBPROPFLAGS_ADSISEARCH 0x0000C000 Used to work with the OLE DB provider.

Remarks

The ADS_ATTR_* constants are used by non-Automation clients in C/C++. Specifically, the IDirectoryObject::SetObjectAttributes method uses these constants to specify operations to be performed on given attributes. On the other hand, the ADS_PROPERTY_* constants, as defined in the ADS_PROPERTY_OPERATION_ENUM enumeration, are used by Automation clients in, for example, Visual Basic® or Visual Basic® Scripting Edition (VBScript).

Specifying ADS_ATTR_UPDATE triggers a server side operation that can be computationally intensive. An example would be to initiate the operation to update a long list of group membership. In general, you should refrain from using this operation unless the modification involves a small number of attributes in the directory. To modify a long list of group memberships, the more efficient approach would be to read the list from the underlying directory, make modifications, and store the updated list back to the directory.