Platform SDK: Exchange Server

IExchExtMessageEvents::OnWriteComplete

Enables extension objects to roll back the Microsoft Exchange default implementation of the IExchExtMessageEvents::OnWrite method in case of an error or to release resources allocated by OnWrite.

Quick Info

See IExchExtMessageEvents : IUnknown.

HRESULT OnWriteComplete(
  LPEXCHEXTCALLBACK lpeecb,   
  ULONG ulFlags               
);
 

Parameters

lpeecb
[in] Pointer to the IExchExtCallback interface. The lpeecb parameter is used to determine information about the message that was written and the window whose controls are to be saved.
ulFlags
EEME_FAILED
The check names operation could not be completed successfully. See the text provided in the definition of the IExchExtMessageEvents interface in this reference.
EEME_COMPLETE_FAILED
See the text provided in the definition of the IExchExtMessageEvents interface in this reference.

Return Values

S_OK
The extension object successfully rolled back the write operation and freed resources.
S_FALSE
The extension object did nothing or added additional behavior. Microsoft Exchange will continue to call extensions or complete the work itself.

Remarks

Microsoft Exchange calls the IExchExtMessageEvents::OnWriteComplete method after it has finished writing the contents of a standard form to the properties of a message. If an error occurs, the extension object should display an error message and return an error. Microsoft Exchange will then call each extension object again with OnWriteComplete with ulFlags = EEME_FAILED to indicate that the write operation failed.

The extension object should free resources used for the write operation.

This method should call the IExchExtCallback::GetObject method to determine the message identifier of the item being written and its container. The container is usually a folder, but it can also be a message or an information store.

See Also

IExchExtCallback::GetObject, IExchExtMessageEvents : IUnknown