Directory Services

Dual Interfaces

Use COM interfaces to access the properties and methods on any provider ADSI objects. A read-only property maps to an interface entry of the form get_<PropertyName>. A read/write property maps to two interface entries of the form get_<PropertyName> and put_<PropertyName>.

All methods on a COM interface must:

To retain compatibility with Automation controllers, all parameters and return types should be within the subset defined by the Automation VARIANT data type. For more information, see VARIANT and VARIANTARGS in the Microsoft Platform SDK.

A provider Active Directory object can expose interfaces that use data types other than those in the VARIANT subset. However, Automation controllers such as Visual Basic are not able to call those interfaces. Most ADSI provider interfaces are derived from IDispatch and can be used as IDispatch interface pointers. However, the IDirectoryObject, IDirectorySearch, and IADsExtension ADSI interfaces are not derived from IDispatch.