次の方法で共有


IMAPIMessageSite::SubmitMessage

This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This page may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

Requests that the current message be queued for delivery.

HRESULT SubmitMessage(
  ULONG ulFlags
);

Parameters

  • ulFlags
    [in] A bitmask of flags that controls how a message is submitted. The following flag can be set:

    • FORCE_SUBMIT
      MAPI should submit the message even if it might not be sent immediately.

Return Value

  • S_OK
    The call succeeded and has returned the expected value or values.

Remarks

Form objects call the IMAPIMessageSite::SubmitMessage method to request that a message be queued for delivery. The message site should call the IPersistMessage::HandsOffMessage method before submitting the message. The message does not need to have been previously saved, because SubmitMessage should cause the message to be saved if the message has been modified. After the return of SubmitMessage, the form must check for a current message and then dismiss itself if none exists.

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

MFCMAPI Reference

For MFCMAPI sample code, see the following table.

File

Function

Comment

MyMAPIFormViewer.cpp

CMyMAPIFormViewer::SubmitMessage

MFCMAPI uses the IMAPIMessageSite::SubmitMessage method to save the message. First, it calls the IPersistMessage::HandsOffMessage method, and then it calls SubmitMessage.

See Also

Reference

IPersistMessage::HandsOffMessage

IMAPIMessageSite : IUnknown

Concepts

MFCMAPI as a Code Sample

MAPI Form Interfaces