Platform SDK: Exchange Server

IExchExtMessageEvents::OnWrite

Replaces or enhances the behavior of Microsoft Exchange when writing information to a message.

Quick Info

See IExchExtMessageEvents : IUnknown.

HRESULT OnWrite(
  LPEXCHEXTCALLBACK lpeecb  
);
 

Parameters

lpeecb
[in] Pointer to the IExchExtCallback interface. The lpeecb parameter is used to determine information about the message being written and the window whose controls are to be saved.

Return Values

S_OK
The extension object replaced Microsoft Exchange behavior and handled writing out the information on its own. Microsoft Exchange will consider the task handled.
S_FALSE
The extension object did nothing or added additional behavior. Microsoft Exchange will continue to call extension objects or complete the work itself.

Remarks

Microsoft Exchange calls the IExchExtMessageEvents::OnWrite method when it is about to write 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 not continue to write the message, call another extension object’s OnWrite method, or display an error message. However, it will stop the user action that caused 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