MAPIClientLibraries 2.0 API Documentation

- Main Page
- Related Pages
- Data Structures
- Files
- Examples

- File List
- Globals

Functions
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_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 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 emsmdb_get_SRow(), get_TypedString(), 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(), SPropTagArray_add(), and SRow_addprop().

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 emsmdb_get_SRow(), mapi_object_get_handle(), mapi_object_get_logon_id(), mapi_object_get_session(), SPropTagArray_add(), and SRow_addprop().

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