cmc_act_on

The cmc_act_on function performs the specified operation on a message.

Quick Info

Header file: XCMC.H

CMC_return_code cmc_act_on (
  CMC_session_id session,                      
  CMC_message_reference * message_reference,   
  CMC_enum operation,                          
  CMC_flags act_on_flags,                      
  CMC_ui_id ui_id,                             
  CMC_extension FAR * act_on_extensions        
)
 

Parameters

session
[in] Session handle that represents a MAPI session. The value in the session parameter must be a valid session handle, not zero.
message_reference
[in] Pointer to a message reference that identifies the message to be acted upon. A null pointer or a pointer to a message reference of length zero is invalid for any operation requiring a message reference. If the message reference is invalid, the cmc_act_on function returns CMC_E_INVALID_MESSAGE_REFERENCE.
operation
[in] An enumeration variable that identifies the operation to perform on the message. Possible values are:
CMC_ACT_ON_DELETE
Marks the specified message for deletion from the mailbox. This operation requires a valid message_reference parameter.
CMC_ACT_ON_EXTENDED
The operation to be performed is specified in the act_on_extensions parameter.
act_on_flags
[in] Bitmask of option flags. The following flag can be set:
CMC_ERROR_UI_ALLOWED
Displays a dialog box on encountering recoverable errors. If this flag is not set, cmc_act_on does not display a dialog box and returns an error value instead.
ui_id
[in] A handle that cmc_act_on uses to present a dialog box for resolving processing questions.
act_on_extensions
[in, out] Pointer to an array of CMC_extension structures containing function extensions. On input, this array contains MAPI extensions to the standard cmc_act_on function. A value of NULL for the act_on_extensions parameter indicates the caller has no extensions for cmc_act_on and is expecting no extensions. You can use the CMC_X_COM_SAVE_MESSAGE extension to save a message to the receive folder.

On output, cmc_act_on writes to the array new information about its processing. It writes NULL if it generates no output extensions.

Return Values

CMC_E_FAILURE
There was a general failure that does not fit the description of any other return value.
CMC_E_INSUFFICIENT_MEMORY
Insufficient memory was available to complete the requested operation.
CMC_E_INVALID_ENUM
A CMC_enum value was invalid.
CMC_E_INVALID_FLAG
A flag set using a flags parameter was invalid.
CMC_E_INVALID_MESSAGE_REFERENCE
The specified message reference is invalid or no longer valid (for example, it has been deleted).
CMC_E_INVALID_PARAMETER
A function parameter was invalid.
CMC_E_INVALID_SESSION_ID
The specified session handle is invalid or no longer valid — for example, after logging off.
CMC_E_INVALID_UI_ID
The specified user interface identifier is invalid or no longer valid.
CMC_E_MESSAGE_IN_USE
The requested action could not be completed because the message was in use.
CMC_E_UNSUPPORTED_ACTION
The requested action is not supported by the current implementation.
CMC_E_UNSUPPORTED_FLAG
The flag requested is not supported.
CMC_E_UNSUPPORTED_FUNCTION_EXT
The function extension requested is not supported.

See Also

CMC_extension, CMC_X_COM_SAVE_MESSAGE