IADsNameTranslate interface

The IADsNameTranslateinterface 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 IADsNameTranslateobject by specifying the directory server using the
IADsNameTranslate::Initor 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::Getor 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.


The IADsNameTranslate interface has these methods.

Method Description
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.


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

See Also



IADsNameTranslate Property Methods

IADsNameTranslate Interface