Platform SDK: MAPI |
The IPersistMessage::Save method saves a revised form back to the message from which it was loaded or created.
See IPersistMessage : IUnknown.
HRESULT Save( LPMESSAGE pMessage, ULONG fSameAsLoad );
Form viewers call the IPersistMessage::Save method to save a revised form back to the message from which it was loaded or created.
Save should only be called when the form is its Normal state.
Do not commit the saved changes; it is up to the caller to perform the commit. Never make changes to the properties belonging to the form's message except during the Save call.
If fSameAsLoad is set to TRUE, you can save the changes to the form's existing message. If fSameAsLoad is set to FALSE, you must copy all of the properties from the original message into the message pointed to by pMessage before performing the save. Use the original message's IMAPIProp::CopyTo method to copy the properties.
When all of the properties have been copied, enter the No Scribble state. If no errors occur, return S_OK. Otherwise, return the error from the failed action.
If Save is called when the form is in any state other than Normal, return E_UNEXPECTED.
For more information on saving storage objects, see the documentation on the IPersistStorage methods in the OLE Programmer's Reference.