IDsAdminCreateObj::Initialize method

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.

Syntax

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

Parameters

pADsContainerObj

Pointer to an IADsContainer interface that represents the container where the object will be created. This parameter must not be NULL.

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. The copy operation is only supported for user objects.

lpszClassName

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 Value

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

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

See Also

IADsContainer

IDsAdminCreateObj

IDsAdminCreateObj::CreateModal