Supporting Multiple Client Access to Messages in Message Stores
It is possible for multiple client applications to open a given message simultaneously. Message store providers do not have to follow any particular rules for governing such access. However, if the client applications modify the message and save their changes, the store provider should follow certain rules:
-
Allow the first call to the IMAPIProp::SaveChanges method to proceed as if it were the only client that has the message open.
-
On the subsequent SaveChanges calls by other clients, the message store provider should ignore the changes and return MAPI_E_OBJECT_CHANGED.
-
Allow client applications to respond to a MAPI_E_OBJECT_CHANGED return code by calling SaveChanges again with the FORCE_SAVE flag. If a client application does this, the message store provider should replace the previous changes with the new ones.
Alternatively, the message store provider can detect the conflict and present an interface which allows the user to choose whether to keep the original message, overwrite the original message with the new changes, or save the new changes to another location.