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

ADSI Extension Architecture

· 52CE 我爱测

ADSI extensions are based on the COM aggregation model with several enhancements. Extensions must adhere to all COM rules. For more information, see the COM specification.

ADSI extensions are based on the COM aggregation model with several enhancements. Extensions must adhere to all COM rules. For more information, see the COM specification.

Here is a review of the COM aggregation model.

com aggregation model

An aggregate, also known as an inner object, is an object that an aggregator creates. Your extension object is an aggregate.

An aggregator, also known as an outer object, is an object that creates an aggregate. ADSI is an aggregator.

The inner object delegates its IUnknown to the aggregator's IUnknown.

ADSI extensions add the following enhancements to COM aggregation to satisfy its requirements:

  • Enables each extension writer to extend ADSI objects. An extension writer can register its extension with ADSI and not be affected by the existence of other extensions. In the COM aggregation model, the aggregator must have the aggregate's CLSID. ADSI relaxes this requirement by making itself act as the aggregator for all extensions. Therefore, instead of forming a layer of nested components, extensions are at the same level.
  • Allows one object, one IDispatch. Automation support is one of the most important features of ADSI. Automation support is achieved because ADSI supports the IDispatch interface. Extension writers are encouraged to support the IDispatch interface. However, there should be only one IDispatch interface on a given object. ADSI integrates and collects the many IDispatch interfaces from different extensions and presents them as one consistent IDispatch to the Automation controller. Each extension, when aggregated, must re-route its IDispatch calls to the IDispatch provided by ADSI.

All these solutions are possible because of services that the ADSI Object Manager provides, which reside on each ADSI provider.

The following figure shows the ADSI Extension Model architecture.

adsi extension model architecture

ADSI supports two levels of extension:

  • Early Binding Support. This is the first level of extension. An extension must support registration and implement new interfaces. The extension consumers must use tools or scripting hosts that support early binding, for example, Visual C++ , Visual Basic.
  • Late Binding Support. This happens when an extension satisfies all early binding requirements, and implements an additional interface, IADsExtension. Extension implementers can use any tool that operates as an Automation controller, such as the Windows Script Host, Active Server Pages, or HTML with VBScript.

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)

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

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