Platform SDK: MAPI |
How your message store provider creates and stores messages in the underlying storage mechanism depends heavily on the underlying storage mechanism itself. In general, you need only to write code to preserve the properties of a message and their values.
When creating a new message, the message store provider needs to create it with the required properties for messages. A list of these properties can be found in the documentation for IMAPIFolder : IMAPIContainer. After that, client applications add any additional properties with IMAPIProp methods.
When saving a message to the underlying storage mechanism, the message store provider needs to iterate over the message's properties, and save them to the underlying storage mechanism such that they can be fully recovered if the message is later opened.
MAPI requires that the properties on IMessage objects are transacted, meaning that changes made to them do not become permanent until the IMAPIProp::SaveChanges method is called on the message object. The message store provider is responsible for implementing this behavior. Usually this is not difficult; it simply means holding properties in memory while they are being modified and committing them to the underlying storage mechanism when SaveChanges is called.
Some properties on message objects have special semantics for client applications with respect to the SaveChanges method:
It is the responsibility of the message store provider to implement the correct semantics for such properties.