다음을 통해 공유


Understanding the Architecture of the IIS ADSI Extension Model

ADSI extensibility is based on the COM aggregation model. Extensions must satisfy all COM rules. Please consult the COM SDK for more detailed information.

Your extension object is an aggregate, or inner object. ADSI is an aggregator, also known as an outer object or provider. The aggregate (your ADSI extension object) delegates its IUnknown to the aggregator's (ADSI's) IUnknown.

ADSI extensions add the following enhancements to COM aggregation:

  • Extensibility provides a way for extension writers to extend ADSI objects independently. An extension writer can register extensions in ADSI without worrying about the existence of other extensions.

  • In the COM aggregation model, the aggregator must record the aggregate's CLSID. ADSI relaxes this requirement by acting as the aggregator for all of its extensions. Because all of the extensions have a single aggregator, they are siblings to each other, and are not nested.

  • Clients find one object, one IDispatch. Extension writers are encouraged to support the IDispatch or dual interface. However, there should only be one IDispatch on a given object. ADSI integrates and collects the IDispatch interfaces from existing extensions, and presents them as one IDispatch interface to the Automation controller. Each extension, when aggregated, must reroute its IDispatch calls to ADSI's IDispatch.

All these solutions are possible because of services provided by the ADSI Object manager, which resides on each ADSI provider.

ADSI supports two types of extension binding:

  • Early Binding. This type of extension binding has some limitations. The extension consumers must use tools or scripting hosts that support early binding, such as Visual C++? or Visual Basic?. For example, early binding does not support calls from an ASP page using VBScript. This requires late binding.

  • Late Binding. A more robust level of binding for extensions, late binding satisfies all binding requirements by implementing an additional interface, IADsExtension. The extension consumers can use any tools that are able to act as an Automation controller, such as Windows? Script Host, Active Server Pages, HTML with VBScript; as well as Visual C++ and Visual Basic.