BUG: IADsSyntax Not Exposed for Some Active Directory Syntaxes (289896)



The information in this article applies to:

  • Microsoft Windows 2000 Server
  • Microsoft Windows 2000 Advanced Server
  • Microsoft Windows 2000 Datacenter Server

This article was previously published under Q289896

SYMPTOMS

The following Active Directory syntaxes do not expose the IADsSyntax interface:

ReplicaLink
Sid
ObjectSecurityDescriptor
Enumeration
DNWithOctetString

STATUS

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

MORE INFORMATION

You can use the IADsSyntax interface to process the property values of any instance of an Active Directory Services Interface (ADSI) schema class object. The IADsSyntax interface specifies methods to identify and modify the available Automation data types that are used to represent its data. ADSI defines a standard set of syntax objects that can be used uniformly across multiple directory service implementations. IADsSyntax supports the OleAutoDataType method, which can be used to determine the automation data type constant VT_xxxx (explained further in the VARTYPE reference later in this article). For the syntaxes listed in the "Symptoms" section of this article, the IADsSyntax interface is not exposed, and an attempt to obtain an IADsSyntax object will generate an 0x80005000 error. Here is a Microsoft Visual Basic sample demonstrating this:
Private Sub Form_Load()
Dim obj As IADs
Dim cl As IADsClass
Dim pr As IADsProperty
Dim sy As IADsSyntax
Dim sc As IADsContainer
 
Set obj = GetObject("LDAP://cn=MyMailbox,cn=Users,dc=MyDomain,cc=com")
Set cl = GetObject(obj.Schema)
Set sc = GetObject(cl.Parent)
Set pr = sc.GetObject("Property", "ntSecurityDescriptor")
Set sy = GetObject(sc.ADsPath & "/" & pr.Syntax)
MsgBox "pr.syntax is " & pr.Syntax
'
' alternately you can replace the last two lines with this line to
' test the available syntaxes.  Simply replace objectsecuritydescriptor
' with any of the other syntaxes listed in MSDN under 

' "Syntaxes for Active Directory Attributes" (see the "References" section
' below)
'
'Set sy = GetObject("LDAP://schema/objectsecuritydescriptor")

MsgBox "Automation data types: " & sy.OleAutoDataType
End Sub
				

Modification Type:MajorLast Reviewed:2/12/2004
Keywords:kbDSWADSI2003Swept kbbug kbnofix KB289896 kbAudDeveloper