IADsNameTranslate interface (iads.h)

The IADsNameTranslate interface translates distinguished names (DNs) among various formats as defined in the ADS_NAME_TYPE_ENUM enumeration. The feature is available to objects in Active Directory.

Name translations are performed on the directory server. To translate a DN, communicate with the server by means of an IADsNameTranslate object, and specify which object is of interest and what format is desired. The following is the general process for using the IADsNameTranslate interface.

First, create an instance of the IADsNameTranslate object.

Second, initialize the IADsNameTranslate object by specifying the directory server using the
IADsNameTranslate::Init or IADsNameTranslate::InitEx methods.

Third, set the directory object on the server by specifying the name with the IADsNameTranslate::Set method and the format with the IADsNameTranslate::SetEx method.

Fourth, retrieve the object name in the specified format with the IADsNameTranslate::Get or IADsNameTranslate::GetEx method.

The following code example shows how to create an IADsNameTranslate object in Visual C++, Visual Basic, and VBScript/Active Server Pages.

Note  The format elements as defined in the ADS_NAME_TYPE_ENUM enumeration and used by IADsNameTranslate are not equivalent and are non-interchangeable with the format elements used by the DsCrackName function. Do not confuse the proper use of these similarly named but non-interchangeable element formats.
 

Inheritance

The IADsNameTranslate interface inherits from the IDispatch interface. IADsNameTranslate also has these types of members:

Methods

The IADsNameTranslate interface has these methods.

 
IADsNameTranslate::Get

Retrieves the name of a directory object in the specified format.
IADsNameTranslate::GetEx

Gets the object names in the specified format.
IADsNameTranslate::Init

Initializes a name translate object by binding to a specified directory server, domain, or global catalog, using the credentials of the current user.
IADsNameTranslate::InitEx

Initializes a name translate object by binding to a specified directory server, domain, or global catalog, using the specified user credential.
IADsNameTranslate::Set

Directs the directory service to set up a specified object for name translation.
IADsNameTranslate::SetEx

Establishes an array of objects for name translation.

Requirements

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

See also

ADS_NAME_TYPE_ENUM

CoCreateInstance

IADsNameTranslate Property Methods

IADsNameTranslate Interface

IADsNameTranslate::Get

IADsNameTranslate::GetEx

IADsNameTranslate::Init

IADsNameTranslate::InitEx

IADsNameTranslate::Set

IADsNameTranslate::SetEx

IDispatch