Directory Services


The IDsAdminNewObjPrimarySite::CreateNew method enables a primary object creation extension to create a temporary Microsoft® Active Directory® directory service object. This object is then passed to each object creation extension in the extension's IDsAdminNewObjExt::SetObject method.

HRESULT CreateNew( 
  LPCWSTR pszName


[in] Pointer to a WCHAR string that contains the name of the object to be created.

Return Values

If the method succeeds, S_OK is returned. If the method fails, an OLE-defined error code is returned. This method fails if the calling extension is not a primary object creation extension.


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

IDsAdminNewObjPrimarySite, IDsAdminNewObjExt::SetObject