libmapi/IStoreFolder.c File Reference

Open messages. More...

#include <libmapi/libmapi.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_store the store to read from
id_folder the folder ID
id_message the message ID
obj_message the resulting message object
ulFlags Possible ulFlags values:

  • 0x0: read only access
  • 0x1: ReadWrite
  • 0x3: Create
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_provider::ctx, mapi_obj_message::cValues, mapi_session::emsmdb, emsmdb_get_SRow(), emsmdb_transaction(), global_mapi_ctx, mapi_ctx::lp_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(), OPENCHANGE_CHECK_NOTIFICATION, OPENCHANGE_RETVAL_IF, PR_INTERNET_CPID, PR_RECIPIENT_TYPE, mapi_object::private_data, SPropTagArray_add(), SRow_addprop(), and mapi_obj_message::SRowSet.

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_message the 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_provider::ctx, mapi_obj_message::cValues, mapi_session::emsmdb, emsmdb_get_SRow(), emsmdb_transaction(), global_mapi_ctx, mapi_ctx::lp_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, 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/