Platform SDK: MAPI

IMAPIMessageSite::GetMessage

The IMAPIMessageSite::GetMessage method returns the current message.

Quick Info

See IMAPIMessageSite : IUnknown.

HRESULT GetMessage(
  LPMESSAGE FAR * ppmsg  
);
 

Parameters

ppmsg
[out] Pointer to a pointer to the returned interface for the message.

Return Values

S_OK
The call succeeded and has returned the expected value or values.
S_FALSE
No message currently exists for the calling form.

Remarks

Forms call the IMAPIMessageSite::GetMessage method to obtain a message interface for the current message. The current message is the same message as was previously passed in the IPersistMessage::InitNew, IPersistMessage::Load, or IPersistMessage::SaveCompleted method.

GetMessage returns S_FALSE if no message currently exists. This state can occur after calls to the IPersistMessage::HandsOffMessage method or before the next call to IPersistMessage::Load or IPersistMessage::SaveCompleted is made.

For a list of interfaces related to form servers, see MAPI Form Interfaces.

See Also

IPersistMessage : IUnknown