Directory Services

Registering the Object Creation Extension

When an Active Directory® object creation extension DLL is created, it must be registered with the Windows registry and Active Directory to make COM and the Active Directory administrative MMC snap-ins aware of the extension.

Registering in the Windows Registry

Like all COM servers, an object creation extension must be registered in the Windows registry. The extension is registered under the following key:

HKEY_CLASSES_ROOT - CLSID - <CLSID>

<CLSID> is the string representation of the CLSID as produced by the StringFromCLSID function. Under the <CLSID> key, there is an InProcServer32 key that identifies the object as a 32-bit in-proc server. Under the InProcServer32 key, the location of the DLL is specified in the default value and the threading model is specified in the ThreadingModel value. All object creation extension must use the Apartment threading model.

Registering with Active Directory

Object creation extension registration is specific to one locale. If the object creation extension applies to all locales, it must be registered in the object class's displaySpecifier object in all of the locale subcontainers in the DisplaySpecifiers container. If the object creation extension is localized for a certain locale, register it in the displaySpecifier object in that locale's subcontainer. For more information about the DisplaySpecifiers container and locales, see Display Specifiers and DisplaySpecifiers Container.

There are two DisplaySpecifier attributes that an object creation extension can be registered under. These are creationWizard and createWizardExt.

The creationWizard attribute identifies primary object creation extensions to replace the existing or native object creation wizard in Active Directory administrative snap-ins. A primary creation extension provides the first set of pages and is hosted in the same way as native pages. This attribute is single-valued and requires the following format:

<CLSID>

The <CLSID> is the string representation of the COM object's CLSID as produced by the StringFromCLSID function.

The createWizardExt attribute identifies secondary object creation extensions. A secondary creation extension adds wizard pages to the native pages or primary extension. This attribute is multi-valued and requires the following format:

<order number>,<CLSID>

The <order number> is an unsigned number that represents the page's position in the wizard. When a creation wizard is displayed, the values are sorted using a comparison of each value's <order number>. If more than one value has the same <order number>, those pages are loaded in the order they are read from Active Directory. If possible, you should use a non-existing <order number> (that is, one that has not been used by other values in the property). There is no prescribed starting position, and gaps are allowed in the <order number> sequence.

The <CLSID> is the string representation of the COM object's CLSID as produced by the StringFromCLSID function.