IDsAdminNewObjExt::Initialize method (dsadmin.h)

The IDsAdminNewObjExt::Initialize method initializes an object creation wizard extension.

Syntax

HRESULT Initialize(
  [in] IADsContainer         *pADsContainerObj,
  [in] IADs                  *pADsCopySource,
  [in] LPCWSTR               lpszClassName,
  [in] IDsAdminNewObj        *pDsAdminNewObj,
  [in] LPDSA_NEWOBJ_DISPINFO pDispInfo
);

Parameters

[in] pADsContainerObj

Pointer to the IADsContainer interface of an existing container where the object are created. This parameter must not be NULL. If this object is to be kept beyond the scope of this method, the reference count must be incremented by calling IUnknown::AddRef or IUnknown::QueryInterface.

[in] pADsCopySource

Pointer to the IADs interface of the object from which a copy is made. If the new object is not copied from another object, this parameter is NULL. For more information about copy operations, see the Remarks section. If this object is to be kept beyond the scope of this method, the reference count must be incremented by calling IUnknown::AddRef or IUnknown::QueryInterface.

[in] lpszClassName

Pointer to a WCHAR string containing the LDAP name of the object class to be created. This parameter must not be NULL. Supported values are: "user", "computer", "printQueue", "group", and "contact".

[in] pDsAdminNewObj

Pointer to an IDsAdminNewObj interface that contains additional data about the wizard. You can also obtain the IDsAdminNewObjPrimarySite interface of the primary extension by calling QueryInterface with IID_IDsAdminNewObjPrimarySite on this interface. If this object is to be kept beyond the scope of this method, the reference count must be incremented by calling IUnknown::AddRef or IUnknown::QueryInterface.

[in] pDispInfo

Pointer to a DSA_NEWOBJ_DISPINFO structure that contains additional data about the object creation wizard.

Return value

Returns S_OK if successful or an OLE-defined error code otherwise.

Remarks

An object in Active Directory Domain Services can either be created from nothing or copied from an existing object. If the new object is created from an existing object, pADsCopySource will contain a pointer to the object from which the copy is made. If the new object is not being copied from another object, pADsCopySource will be NULL. The copy operation is only supported for user objects.

Requirements

Requirement Value
Minimum supported client Windows Vista
Minimum supported server Windows Server 2008
Target Platform Windows
Header dsadmin.h
DLL DSAdmin.dll

See also

DSA_NEWOBJ_DISPINFO

IADs

IADsContainer

IDsAdminNewObj

IDsAdminNewObjExt

IDsAdminNewObjPrimarySite

IUnknown::AddRef

IUnknown::QueryInterface