Directory Services

IDsAdminCreateObj::Initialize

The IDsAdminCreateObj::Initialize method initializes an IDsAdminCreateObj object with data about the container where the object will be created, the class of the object to be created and, possibly, the source object to copy from.

HRESULT Initialize( 
  IADsContainer* pADsContainerObj,
  IADs pADsCopySource,
  LPCWSTR lpszClassName
);

Parameters

pADsContainerObj
[in] Pointer to an IADsContainer interface that represents the container where the object will be created. This parameter must not be NULL.
pADsCopySource
[in] 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. The copy operation is only supported for user objects.
lpszClassName
[in] Pointer to a WCHAR string that contains 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".

Return Values

If the method succeeds, S_OK is returned. If the method fails, an OLE-defined error code is returned.

Remarks

The IDsAdminCreateObj::Initialize method must be called before IDsAdminCreateObj::CreateModal can be called.

Requirements

Client: Included in Windows XP and Windows 2000 Professional.
Server: Included in Windows Server 2003 and Windows 2000 Server.
Header: Declared in Dsadmin.h.

See Also

IDsAdminCreateObj, IADsContainer, IDsAdminCreateObj::CreateModal