Partager via


IMsgStore::AbortSubmit

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.

Attempts to remove a message from the outgoing queue.

AbortSubmit(
  ULONG cbEntryID,
  LPENTRYID lpEntryID,
  ULONG ulFlags
);

Parameters

  • cbEntryID
    [in] The byte count in the entry identifier pointed to by the lpEntryID parameter.

  • lpEntryID
    [in] A pointer to the entry identifier of the message to remove from the outgoing queue.

  • ulFlags
    [in] Reserved; must be zero.

Return Value

  • S_OK
    The message was successfully removed from the outgoing queue.

  • MAPI_E_NOT_IN_QUEUE
    The message identified by lpEntryID is no longer in the message store's outgoing queue, typically because it has already been sent.

  • MAPI_E_UNABLE_TO_ABORT
    The message identified by lpEntryID is locked by the MAPI spooler, and the operation cannot be aborted.

Remarks

The IMsgStore::AbortSubmit method attempts to remove a submitted message from the message store's outgoing queue.

Notes to Callers

After a message is submitted, aborting the submission by calling AbortSubmit is the only action that can be performed on the message. Do not expect AbortSubmit to always succeed. Depending on how the underlying messaging system is implemented, it might not be possible to cancel the sending of the message.

MFCMAPI Reference

For MFCMAPI sample code, see the following table.

File

Function

Comment

FolderDlg.cpp

CFolderDlg::OnAbortSubmit

MFCMAPI uses the IMsgStore::AbortSubmit method to abort the submission of the selected message.

See Also

Reference

IMessage::SubmitMessage

IMsgStore : IMAPIProp

Concepts

MFCMAPI as a Code Sample