The IPersistMessage::Load method loads the form for a specified message.
See IPersistMessage : IUnknown.
HRESULT Load(
LPMESSAGESITE pMessageSite,
LPMESSAGE pMessage,
ULONG ulMessageStatus,
ULONG ulMessageFlags
);
Form viewers call the IPersistMessage::Load method to load a form for an existing message.
Load is called only when a form is in one of the following states:
If a form viewer calls Load while the form is in any other state, the method returns E_UNEXPECTED.
If your form has a reference to an active message site other than the one that is passed into Load, release the original site because it will no longer be used. Store the pointers to the message site and message from the pMessageSite and pMessage parameters and call both objects' IUnknown::AddRef methods to increment their reference counts.
After AddRef has completed, store the properties from the ulMessageStatus and ulMessageFlags parameters into the form. Transition the form to its Normal state before displaying it and notify registered viewers by calling their IMAPIViewAdviseSink::OnNewMessage methods.
If no errors occur, return S_OK.
For more information on loading storage objects, see the documentation for the following methods in the OLE Programmer's Reference:
IPersistStorage::Load
IPersistStream::Load
IPersistFile::Load
PR_MESSAGE_FLAGS, PR_MSG_STATUS