Platform SDK: Active Directory, ADSI, and Directory Services

IDsAdminNewObjExt::Initialize

The Initialize method initializes the interface with information about the container where the object will be created, the class of the object to be created, the IDsAdminNewObj interface pointer, the wizard information structure and, possibly, the copy source.

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

Parameters

pADsContainerObj
[in] Pointer to the IADsContainer interface of an existing 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 the copy will be made, if a copy operation is required. If a copy operation is not required, this parameter must be NULL.

Note  The copy operation is supported on user objects only.

lpszClassName
[in] Pointer to a 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.
*pDsAdminNewObj
[in] Pointer to the IDsAdminNewObj interface that supplies information about the rest of the wizard. You can use the QueryInterface method to find the primary extensions to this pointer, in order to obtain an IDsAdminNewObjPrimarySite interface pointer.
pDispInfo
[in] Pointer to a DSA_NEWOBJ_DISPINFO structure.

Return Values

If the method is successful, the return value is S_OK.

If an error occurs, the return value is a COM error code. For more information, see Error Handling. If the error code returned is a failure HRESULT, the COM object will be released.

Requirements

  Windows NT/2000: Requires Windows 2000.
  Header: Declared in Dsadmin.h.

See Also

IDsAdminNewObj, IDsAdminNewObjExt, IDsAdminNewObjPrimarySite, IUnknown_QueryInterface