IDsAdminNewObjExt::WriteData method (dsadmin.h)

The IDsAdminNewObjExt::WriteData method enables the object creation wizard extension to write its data into an object in Active Directory Domain Services.

Syntax

HRESULT WriteData(
  [in] HWND  hWnd,
  [in] ULONG uContext
);

Parameters

[in] hWnd

The window handle used as the parent window for possible error messages.

[in] uContext

Specifies the context in which WriteData is called. This will be one of the following values.

DSA_NEWOBJ_CTX_PRECOMMIT

WriteData is called prior to the new object committed 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 object has been committed 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 value

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

Remarks

A pointer to the temporary 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 object when all of the extensions have added their data.

Requirements

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

See also

IDsAdminNewObjExt

IDsAdminNewObjExt::SetObject