Partager via


IMAPIFolder::DeleteMessages (Compact 7)

3/12/2014

This method deletes one or more messages from the current folder.

Syntax

HRESULT DeleteMessages (
  LPENTRYLIST lpMsgList,
  ULONG ulUIParam,
  LPMAPIPROGRESS lpProgress,
  ULONG ulFlags
);

Parameters

  • lpMsgList
    [in] Pointer to a reference to an ENTRYLIST structure that contains the number of messages to delete and an array of ENTRYID structures that identifies the messages. Cannot be NULL.
  • ulUIParam
    [in] Ignored.
  • lpProgress
    [in] Ignored.
  • ulFlags
    [in] Ignored.

Return Value

The following table shows the possible return values.

Value Description

S_OK

The method succeeded.

MAPI_W_PARTIAL_COMPLETION

The call succeeded, but not all of the messages were successfully deleted. When this warning is returned, the call must be handled as successful.

MAPI_E_INVALID_PARAMETER

One or more of the parameters is invalid.

MAPI_E_NOT_FOUND

No messages were deleted because the folder, store, or message ID is not correct or the ENTRYID structure contains a message that was deleted.

E_FAIL

The method failed due to an unspecified error.

E_INVALIDARG

The method failed because one or more of the arguments is not valid.

E_OUTOFMEMORY

The method failed because it needs more memory resources.

E_UNEXPECTED

The method failed due to an unexpected error.

Remarks

When the DeleteMessages method is unable to complete, do not assume that the method did not work. DeleteMessages might have deleted one or more of the messages before encountering the error.

Requirements

Header

mapidefs.h

Library

cemapi.lib

See Also

Reference

IMAPIFolder