Microsoft KB Archive/289896

= BUG: IADsSyntax Not Exposed for Some Active Directory Syntaxes =

Article ID: 289896

Article Last Modified on 2/12/2004

-

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 &quot;Symptoms&quot; 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(&quot;LDAP://cn=MyMailbox,cn=Users,dc=MyDomain,cc=com&quot;) Set cl = GetObject(obj.Schema) Set sc = GetObject(cl.Parent) Set pr = sc.GetObject(&quot;Property&quot;, &quot;ntSecurityDescriptor&quot;) Set sy = GetObject(sc.ADsPath & &quot;/&quot; & pr.Syntax) MsgBox &quot;pr.syntax is &quot; & 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

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

MsgBox &quot;Automation data types: &quot; & sy.OleAutoDataType End Sub

