IStoreFolder.c File Reference

Open messages. More...

#include "libmapi/libmapi.h"
#include "libmapi/libmapi_private.h"

Functions

_PUBLIC_ enum MAPISTATUS OpenMessage (mapi_object_t *obj_store, mapi_id_t id_folder, mapi_id_t id_message, mapi_object_t *obj_message, uint8_t ulFlags)
 
_PUBLIC_ enum MAPISTATUS ReloadCachedInformation (mapi_object_t *obj_message)
 

Detailed Description

Open messages.

Function Documentation

_PUBLIC_ enum MAPISTATUS OpenMessage ( mapi_object_t obj_store,
mapi_id_t  id_folder,
mapi_id_t  id_message,
mapi_object_t obj_message,
uint8_t  ulFlags 
)

Opens a specific message and retrieves a MAPI object that can be used to get or set message properties.

This function opens a specific message defined by a combination of object store, folder ID, and message ID and which read/write access is defined by ulFlags.

Parameters
obj_storethe store to read from
id_folderthe folder ID
id_messagethe message ID
obj_messagethe resulting message object
ulFlagsPossible ulFlags values:
  • 0x0: read only access
  • 0x1: ReadWrite
  • 0x3: Create
  • 0x4: OpenSoftDeleted
Returns
MAPI_E_SUCCESS on success, otherwise MAPI error.
Note
Developers may also call GetLastError() to retrieve the last MAPI error code. Possible MAPI error codes are:
  • MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
  • MAPI_E_INVALID_PARAMETER: obj_store is undefined
  • MAPI_E_CALL_FAILED: A network problem was encountered during the transaction
See Also
MAPIInitialize, GetLastError
Examples:
fetchappointment.c, and fetchmail.c.

References mapi_obj_message::cValues, emsmdb_get_SRow(), emsmdb_transaction_wrapper(), get_TypedString(), mapi_session::mapi_ctx, mapi_object_get_handle(), mapi_object_get_logon_id(), mapi_object_get_session(), mapi_object_set_handle(), mapi_object_set_logon_id(), mapi_object_set_session(), mapi_obj_message::NormalizedSubject, OPENCHANGE_CHECK_NOTIFICATION, OPENCHANGE_RETVAL_IF, PR_INTERNET_CPID, PR_RECIPIENT_TYPE, mapi_object::private_data, mapi_obj_message::SPropTagArray, SPropTagArray_add(), SRow_addprop(), mapi_obj_message::SRowSet, and mapi_obj_message::SubjectPrefix.

Referenced by GetUserFreeBusyData().

_PUBLIC_ enum MAPISTATUS ReloadCachedInformation ( mapi_object_t obj_message)

Retrieve the message properties for an already open message.

This function is very similar to OpenMessage, but works on an already open message object.

Parameters
obj_messagethe message object to retrieve the properties for.
Returns
MAPI_E_SUCCESS on success, otherwise MAPI error.
Note
Developers may also call GetLastError() to retrieve the last MAPI error code. Possible MAPI error codes are:
  • MAPI_E_NOT_INITIALIZED: MAPI subsystem has not been initialized
  • MAPI_E_INVALID_PARAMETER: obj_store is undefined
  • MAPI_E_CALL_FAILED: A network problem was encountered during the transaction
See Also
OpenMessage

References mapi_obj_message::cValues, emsmdb_get_SRow(), emsmdb_transaction_wrapper(), mapi_session::mapi_ctx, mapi_object_get_handle(), mapi_object_get_logon_id(), mapi_object_get_session(), OPENCHANGE_CHECK_NOTIFICATION, OPENCHANGE_RETVAL_IF, PR_INTERNET_CPID, PR_RECIPIENT_TYPE, mapi_object::private_data, mapi_obj_message::SPropTagArray, SPropTagArray_add(), SRow_addprop(), and mapi_obj_message::SRowSet.


Creative Commons License
Creative Commons Attribution icon Creative Commons Share Alike icon
This content is licensed under the Creative Commons
Attribution ShareAlike License v. 3.0:
http://creativecommons.org/licenses/by-sa/3.0/