Directory Services


The IDsAdminNewObjExt::WriteData method is called to enable the object creation wizard extension to write its data into a Microsoft® Active Directory® directory service object.

HRESULT WriteData( 
  HWND hWnd,
  ULONG uContext


[in] The window handle used as the parent window for possible error messages.
[in] Specifies the context in which WriteData is called. This will be one of the following values.
Value Meaning
DSA_NEWOBJ_CTX_PRECOMMIT WriteData is called prior to the new Active Directory object being commited to persistent storage. This is the context during which a secondary object creation extension should write its data.
DSA_NEWOBJ_CTX_POSTCOMMIT WriteData is called after the new Active Directory object has been commited to persistent storage.
DSA_NEWOBJ_CTX_CLEANUP There has been a failure during the write process of the temporary object and the temporary object is recreated.

Return Values

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


A pointer to the temporary Active Directory object is supplied to the extension when the IDsAdminNewObjExt::SetObject method is called.

A secondary object creation extension should not commit the data set during the WriteData method by calling IADs::SetInfo. The primary object creation extension will commit all of the data for the Active Directory object when all of the extensions have added their data.


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

IDsAdminNewObjExt, IDsAdminNewObjExt::SetObject