Microsoft KB Archive/317982

= BUG: Error 80072116 When You Use the Set Method of the NameTranslate API =

Article ID: 317982

Article Last Modified on 2/12/2004

-

APPLIES TO


 * Microsoft Windows 2000 Service Pack 1
 * Microsoft Windows 2000 Service Pack 2
 * Microsoft Windows 2000 Service Pack 3
 * Microsoft Active Directory Service Interfaces 2.5
 * Microsoft Active Directory Service Interfaces 2.5
 * Microsoft Active Directory Service Interfaces 2.5

-



This article was previously published under Q317982



SYMPTOMS
When you are using the .Set method of the NameTranslate API against an object that contains escape characters (forward slash, /, or backward slash, \) in its canonical name, you may receive the following error message:

0x80072116 Name Translation: Could not find the name or insufficient right to see the name



CAUSE
This problem may occur because the Active Directory structure reads the forward slash (/) or the backward slash (\) character as an escape character. Although you can use an escape character to un-escape another escape character in Distinguished Names of objects, there is no way to escape these characters when you use the NameTranslate API against the Windows 2000 Active Directory.



STATUS
Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.



Steps to Reproduce the Problem
 Start the Active Directory Users and Computers snap-in. Right-click the Users container, and then create a new contact object. Set Last name to the string test\test, set User logon name to test, and then click OK. Run the ADSI Edit snap-in, and then confirm the value of the canonicalName attribute of the test\test contact object.  Write the following Microsoft VBScript program, and then run it on the test environment: Const ADS_NAME_TYPE_1779 = 1 Const ADS_NAME_TYPE_CANONICAL = 2 Const ADS_NAME_TYPE_NT4 = 3

Dim objTrans Dim strADsPath Dim strDNSPath

strDNSPath = &quot;microsoft.com/Users/test\test&quot;

Set objTrans = CreateObject(&quot;NameTranslate&quot;)

With objTrans .Init ADS_NAME_TYPE_NT4, &quot;&quot; .Set ADS_NAME_TYPE_CANONICAL, strDNSPath strADsPath = .Get(ADS_NAME_TYPE_1779) End With

MsgBox strADsPath Set objTrans = Nothing  Note that you receive the error message that is listed in the &quot;Symptoms&quot; section of this article.</li></ol>

Keywords: kberrmsg kbbug kbnofix kbenv kbdswadsi2003swept KB317982

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.