The SCHEMA container contains Syntax objects that determine what syntax a property can take in the schema. Active Directory defines a set of standard syntax objects that can be used uniformly across namespaces.
The syntax object must support the IADs interface and one additional interface, IADsSyntax.
The IADsSyntax interface is used to get and set the properties of the Syntax object. The interface definition is as follows:
[ object, uuid(IID_IADsSyntax), oleautomation, dual ]
interface IADsSyntax: IADs
{
// Read-write properties
[propget]
HRESULT OleAutoDataType ([out, retval]long *plOleAutoDataType);
[propput]
HRESULT OleAutoDataType ([in]long lOleAutoDataType);
};
Method | Description |
OleAutoDataType | Gets and sets a long containing the value of the VT_xxx constant for the OLE Automation Virtual Type representing this syntax. Provider syntaxes that cannot be mapped to an OLE Automation Virtual Type should be mapped to an array of unsigned bytes. (VT_UI1|VT_ARRAY). |
The following are the standard syntax definitions.
Name | IDL type representation | Remarks |
Boolean | boolean | |
Counter | long | Differs from Integer in that any value added is added to the total, and any value deleted is deleted from the total. |
AdsPath | BSTR | Values uniquely identify objects. |
EmailAddress | BSTR | |
FaxNumber | BSTR | Should comply with the international format E.123, with an optional bit string formatted according to T.30 |
Integer | long | |
Interval | long | Value represents interval of time, in seconds. -1 = Unlimited. |
List | VARIANT | Value is an ordered sequence of strings. The VARIANT contains a SAFEARRAY of BSTRs. |
Method | Identifies a function available on this COM object. | |
NetAddress | BSTR | A network address, represented as a string using the following syntax: <NetAddress>::=<AddrType>":"<AddrValue> The values of <AddrType> and the syntax of <AddrValue> are provider-specific, but should follow the implementation guidelines in section 0 , below. |
OctetString | VARIANT | Values are uninterpreted byte strings. The VARIANT contains a SAFEARRAY of unsigned chars. |
Path | BSTR | Value is a file system path. |
PhoneNumber | BSTR | |
PostalAddress | BSTR | Value is a postal address, typically 6 lines of 30 chars each. Carriage return characters are allowed. The following format is recommended: Line 1: Name Line 2: Street Address or Post Office Box Number Line 3: State or Province Name Line 4: Postal Code Line 5: Country Name |
SmallInterval | long | Value represents interval of time, in milliseconds. |
String | BSTR | |
Time | DATE |
6.1.5.2.1 NetAddress Implementation Guidelines
NetAddress is a provider-specific BSTR composed of two substrings separated by a colon (":"). The left-hand substring indicates the address type, and the right-hand substring is a string representation of an address of that type.Address Type | Address Type String | Address Value String Format | Resultant NetAddress String |
TCP/IP | "IP" | Dotted decimal string, for example "100.201.301.45" | "IP:100.201.301.45" |
IPX | "IPX" | dotted decimal string containing NetNumber.Address.Socket, for example "10.123456.80" | "IPX:10.123456.80" |