大网数据广告活动
域与目录服务

The IADs and IDirectoryObject Interfaces

· 52CE 我爱测

ADSI clients manage and manipulate directory service objects by using one of two COM interfaces IADs or IDirectoryObject.

ADSI clients manage and manipulate directory service objects by using one of two COM interfaces: IADs or IDirectoryObject. IADs is an IDispatch interface intended for use by late-bound clients such as those written in Microsoft Visual Basic, Java, and various scripting languages. IDirectoryObject is a vtable interface that provides direct access to objects by early bound clients such as those written in C and C++.

Each ADSI object must implement both IADs and IDirectoryObject. ADSI clients written in languages such as C or C++, which are able to directly access vtables, can use either interface, but not both in the same application. ADSI clients written in Visual Basic or Java are limited to using IADs.

The IADs interface enables late-bound clients to take advantage of the inherent housekeeping features of the ADSI object model. Among these features is the property cache, which enables clients to read and write properties without going over the wire for each call. In addition, client applications gain the use of powerful UI and ActiveX control libraries and a simpler style of programming. In return, late-bound clients must use the VARIANT data type, which precludes using the richer native data types provided by ADSI.

The IDirectoryObject interface enables early bound clients to take full advantage of native directory-service data types at the cost of foregoing a slight performance advantage from using the property cache. In return, the IDirectoryObject interface provides direct, on-the-wire access to object properties through a single request, rather than through individual get and put calls.

Source: Microsoft Learn / Windows Win32 documentation by Microsoft and contributors. Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.

资料来源与适用范围

资料来源
Microsoft Learn / Windows Win32 documentation
适用范围
Windows Win32 API · Source date 05/31/2018
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY 4.0 (documentation), MIT (code samples)

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。