BUG: Error 80072116 When You Use the Set Method of the NameTranslate API (317982)



The information in this article applies to:

  • Microsoft Windows 2000 Server SP1
  • Microsoft Windows 2000 Server SP2
  • Microsoft Windows 2000 Server SP3
  • Microsoft Active Directory Services Interface, Microsoft Active Directory Client
  • Microsoft Active Directory Services Interface, System Component
  • 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.

MORE INFORMATION

Steps to Reproduce the Problem

  1. Start the Active Directory Users and Computers snap-in.
  2. Right-click the Users container, and then create a new contact object.
  3. Set Last name to the string test\test, set User logon name to test, and then click OK.
  4. Run the ADSI Edit snap-in, and then confirm the value of the canonicalName attribute of the test\test contact object.
  5. 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 = "microsoft.com/Users/test\test"
    
    Set objTrans = CreateObject("NameTranslate")
    
    With objTrans
    	.Init ADS_NAME_TYPE_NT4 , ""
    	.Set ADS_NAME_TYPE_CANONICAL , strDNSPath
    	strADsPath = .Get(ADS_NAME_TYPE_1779)
    End With
    
    MsgBox strADsPath
    Set objTrans = Nothing
    					
  6. Note that you receive the error message that is listed in the "Symptoms" section of this article.

Modification Type:MajorLast Reviewed:2/12/2004
Keywords:kbDSWADSI2003Swept kbBug kbenv kberrmsg kbnofix KB317982 kbAudDeveloper