MAPIClientLibraries 2.0 API Documentation

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

- File List
- Globals

Functions
FXICS.c File Reference

Fast Transfer and Incremental Change Synchronization operations. More...

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

## Functions
_PUBLIC_ enum MAPISTATUS | FXCopyFolder (mapi_object_t *obj, uint8_t copyFlags, uint8_t sendOptions, mapi_object_t *obj_source_context)
_PUBLIC_ enum MAPISTATUS | FXCopyMessages (mapi_object_t *obj, mapi_id_array_t *message_ids, uint8_t copyFlags, uint8_t sendOptions, mapi_object_t *obj_source_context)
_PUBLIC_ enum MAPISTATUS | FXCopyProperties (mapi_object_t *obj, uint8_t level, uint32_t copyFlags, uint8_t sendOptions, struct SPropTagArray *properties, mapi_object_t *obj_source_context)
_PUBLIC_ enum MAPISTATUS | FXCopyTo (mapi_object_t *obj, uint8_t level, uint32_t copyFlags, uint8_t sendOptions, struct SPropTagArray *excludes, mapi_object_t *obj_source_context)
_PUBLIC_ enum MAPISTATUS | FXDestConfigure (mapi_object_t *obj, enum FastTransferDestConfig_SourceOperation sourceOperation, mapi_object_t *obj_destination_context)
_PUBLIC_ enum MAPISTATUS | FXGetBuffer (mapi_object_t *obj_source_context, uint16_t maxSize, enum TransferStatus *transferStatus, uint16_t *progressStepCount, uint16_t *totalStepCount, DATA_BLOB *blob)
| Get data from source fast transfer object.
_PUBLIC_ enum MAPISTATUS | FXPutBuffer (mapi_object_t *obj_dest_context, DATA_BLOB *blob, uint16_t *usedSize)
| Send data to a destination fast transfer object.
_PUBLIC_ enum MAPISTATUS | GetLocalReplicaIds (mapi_object_t *obj_store, uint32_t IdCount, struct GUID *ReplGuid, uint8_t GlobalCount[6])
_PUBLIC_ enum MAPISTATUS | ICSSyncConfigure (mapi_object_t *obj, enum SynchronizationType sync_type, uint8_t send_options, uint16_t sync_flags, uint32_t sync_extraflags, DATA_BLOB restriction, struct SPropTagArray *property_tags, mapi_object_t *obj_sync_context)
_PUBLIC_ enum MAPISTATUS | ICSSyncGetTransferState (mapi_object_t *obj, mapi_object_t *obj_sync_context)
_PUBLIC_ enum MAPISTATUS | ICSSyncOpenCollector (mapi_object_t *folder, bool isContentsCollector, mapi_object_t *obj_collector)
_PUBLIC_ enum MAPISTATUS | ICSSyncUploadStateBegin (mapi_object_t *obj_sync_context, enum StateProperty state_property, uint32_t length)
| Initialize an ICS Initial State upload.
_PUBLIC_ enum MAPISTATUS | ICSSyncUploadStateContinue (mapi_object_t *obj_sync_context, DATA_BLOB state)
| Send data for an ICS Initial State upload.
_PUBLIC_ enum MAPISTATUS | ICSSyncUploadStateEnd (mapi_object_t *obj_sync_context)
| Signal completion of an ICS Initial State upload.
_PUBLIC_ enum MAPISTATUS | SetLocalReplicaMidsetDeleted (mapi_object_t *obj_folder, const struct GUID ReplGuid, const uint8_t GlobalCountLow[6], const uint8_t GlobalCountHigh[6])
_PUBLIC_ enum MAPISTATUS | TellVersion (mapi_object_t *obj_store, uint16_t version[3])

## Detailed Description

Fast Transfer and Incremental Change Synchronization operations.

## Function Documentation

_PUBLIC_ enum MAPISTATUS FXCopyFolder | ( | mapi_object_t * | obj,
|  | uint8_t | copyFlags,
|  | uint8_t | sendOptions,
|  | mapi_object_t * | obj_source_context
| ) |  |

Prepare a server for Fast Transfer transmission of a folder hierachy

This function is used to configure a server for a fast-transfer folder hierachy send operation. This could be the origin server in a server->client->server copy, or for a server to client download.

This operation copies the folder object, and any sub-objects (including folder properties and messages). It can optionally copy sub-folders, depending on copyFlags.

Parameters

  obj | the source object for the operation (folder)
  copyFlags | flags that change the copy behaviour (see below)
  sendOptions | flags that change the format of the transfer (see FXCopyMessages)
  obj_source_context | the fast transfer source context for future ROPs

copyflags can be zero or more of the following:

- FastTransferCopyFolder_CopySubfolders to recursively copy any sub-folders and contained messages
- FastTransferCopyFolder_NoGhostedContent to omit any ghosted content when copying public folders

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: one of the function parameters is invalid
  - MAPI_E_CALL_FAILED: A network problem was encountered during the transaction

References mapi_object_get_handle(), mapi_object_get_logon_id(), mapi_object_get_session(), mapi_object_set_handle(), mapi_object_set_logon_id(), and mapi_object_set_session().

_PUBLIC_ enum MAPISTATUS FXCopyMessages | ( | mapi_object_t * | obj,
|  | mapi_id_array_t * | message_ids,
|  | uint8_t | copyFlags,
|  | uint8_t | sendOptions,
|  | mapi_object_t * | obj_source_context
| ) |  |

Prepare a server for Fast Transfer transmission of a list of messages

This function is used to configure a server for a fast-transfer message send operation. This could be the origin server in a server->client->server copy, or for a server to client download.

This operation copies the message objects, and any sub-objects (including attachments and embedded messages).

Parameters

  obj | the source object for the operation (folder)
  message_ids | the message IDs for the messages to copy.
  copyFlags | flags that change the copy behaviour (see below)
  sendOptions | flags that change the format of the transfer (see below)
  obj_source_context | the fast transfer source context for future ROPs

copyflags can be zero or more of the following:

- FastTransferCopyMessage_Move - configure output for move
- FastTransferCopyMessage_BestBody - output message bodies in original format (if not set, output in RTF)
- FastTransferCopyMessage_SendEntryId - include message and change identification in the output stream

sendOptions can be zero or more of the following:

- FastTransfer_Unicode - enable Unicode output
- FastTransfer_UseCpid (not normally used directly - implied by ForUpload)
- FastTransfer_ForUpload - (enable Unicode, and advise the server that transfer is server->client->server)
- FastTransfer_RecoverMode - advise the server that the client supports recovery mode
- FastTransfer_ForceUnicode - force Unicode output
- FastTransfer_PartialItem - used for synchronisation download

If the FastTransfer_ForUpload is set, the next call must be TellVersion()

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: one of the function parameters is invalid
  - MAPI_E_CALL_FAILED: A network problem was encountered during the transaction

References mapi_id_array_get(), mapi_object_get_handle(), mapi_object_get_logon_id(), mapi_object_get_session(), mapi_object_set_handle(), mapi_object_set_logon_id(), and mapi_object_set_session().

_PUBLIC_ enum MAPISTATUS FXCopyProperties | ( | mapi_object_t * | obj,
|  | uint8_t | level,
|  | uint32_t | copyFlags,
|  | uint8_t | sendOptions,
|  | struct SPropTagArray * | properties,
|  | mapi_object_t * | obj_source_context
| ) |  |

Prepare a server for Fast Transfer transmission of the properties of a folder, message or attachment

This function is used to configure a server for a fast-transfer download of properties. This could be the origin server in a server->client->server copy, or for a server to client download.

This operation copies the specified properties of the source object. It can optionally copy properties of sub-objects, depending on Level.

Parameters

  obj | the source object for the operation (folder, message or attachment)
  level | whether to copy properties of sub-objects of folders or messages (set to 0) or not (set to any other value)
  copyFlags | flags that change the copy behaviour (see below)
  sendOptions | flags that change the format of the transfer (see FXCopyMessages)
  properties | the list of properties to transfer
  obj_source_context | the fast transfer source context for future ROPs

copyflags may be the following:

- FastTransferCopyProperties_Move to configure as part of a move operation

Be careful in setting level to something other than zero. In particular, if level is non-zero for a message, then the list of recipients, and any attachments or embedded messages, will not be transferred.

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: one of the function parameters is invalid
  - MAPI_E_CALL_FAILED: A network problem was encountered during the transaction

References mapi_object_get_handle(), mapi_object_get_logon_id(), mapi_object_get_session(), mapi_object_set_handle(), mapi_object_set_logon_id(), and mapi_object_set_session().

_PUBLIC_ enum MAPISTATUS FXCopyTo | ( | mapi_object_t * | obj,
|  | uint8_t | level,
|  | uint32_t | copyFlags,
|  | uint8_t | sendOptions,
|  | struct SPropTagArray * | excludes,
|  | mapi_object_t * | obj_source_context
| ) |  |

Prepare a server for Fast Transfer transmission of a folder, message or attachment

This function is used to configure a server for a fast-transfer download of a folder, message or attachment. This could be the origin server in a server->client->server copy, or for a server to client download.

This operation copies the source object, potentially omitting some properties. It can optionally copy sub-objects, depending on Level.

Parameters

  obj | the source object for the operation (folder, message or attachment)
  level | whether to copy sub-objects of folders or messages (set to 0) or not (set to any other value)
  copyFlags | flags that change the copy behaviour (see below)
  sendOptions | flags that change the format of the transfer (see FXCopyMessages)
  excludes | the list of properties to exclude from the transfer
  obj_source_context | the fast transfer source context for future ROPs

copyflags can be zero or more of the following:

- FastTransferCopyTo_Move to configure as part of a move operation
- FastTransferCopyTo_BestBody to use original format for message bodies (if not set, use RTF instead)

Be careful in setting level to something other than zero. In particular, if level is non-zero for a message, then the list of recipients, and any attachments or embedded messages, will not be transferred.

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: one of the function parameters is invalid
  - MAPI_E_CALL_FAILED: A network problem was encountered during the transaction

References mapi_object_get_handle(), mapi_object_get_logon_id(), mapi_object_get_session(), mapi_object_set_handle(), mapi_object_set_logon_id(), and mapi_object_set_session().

_PUBLIC_ enum MAPISTATUS FXDestConfigure | ( | mapi_object_t * | obj,
|  | enum FastTransferDestConfig_SourceOperation | sourceOperation,
|  | mapi_object_t * | obj_destination_context
| ) |  |

Prepare a server for Fast Transfer receive

This function is used to configure a server for fast-transfer receive operation. This could be the target server in a server->client->server copy, or for a client->server upload.

Parameters

  obj | the target object for the upload (folder, message or attachment)
  sourceOperation | the type of transfer (one of FastTransferDest_CopyTo, FastTransferDest_CopyProperties,FastTransferDest_CopyMessages or FastTransferDest_CopyFolder)
  obj_destination_context | the fast transfer context for future ROPs.

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: one of the function parameters is invalid
  - MAPI_E_CALL_FAILED: A network problem was encountered during the transaction

References mapi_object_get_handle(), mapi_object_get_logon_id(), mapi_object_get_session(), mapi_object_set_handle(), mapi_object_set_logon_id(), and mapi_object_set_session().

_PUBLIC_ enum MAPISTATUS FXGetBuffer | ( | mapi_object_t * | obj_source_context,
|  | uint16_t | maxSize,
|  | enum TransferStatus * | transferStatus,
|  | uint16_t * | progressStepCount,
|  | uint16_t * | totalStepCount,
|  | DATA_BLOB * | blob
| ) |  |

Get data from source fast transfer object.

Fast transfers are done in blocks, each block transfered over a call to FXGetBuffer. If the block is small, it will fit into a single call, and the transferStatus will indicate completion. However larger transfers will require multiple calls.

Parameters

  obj_source_context | the source object (from FXCopyTo, FXCopyProperties, FXCopyFolder or FXCopyMessages)
  maxSize | the maximum size (pass 0 to indicate maximum available size)
  transferStatus | result of the transfer
  progressStepCount | the approximate number of steps (of totalStepCount) completed
  totalStepCount | the approximate number of steps (total)
  blob | this part of the transfer

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: one of the function parameters is invalid
  - MAPI_E_CALL_FAILED: A network problem was encountered during the transaction

References mapi_object_get_handle(), mapi_object_get_logon_id(), and mapi_object_get_session().

_PUBLIC_ enum MAPISTATUS FXPutBuffer | ( | mapi_object_t * | obj_dest_context,
|  | DATA_BLOB * | blob,
|  | uint16_t * | usedSize
| ) |  |

Send data to a destination fast transfer object.

Fast transfers are done in blocks, each block transfered over a call to FXGetBuffer. If the block is small, it will fit into a single call, and the transferStatus will indicate completion. However larger transfers will require multiple calls.

Parameters

  obj_dest_context | the destination object (from FXDestConfigure)
  blob | this part of the transfer
  usedSize | how many bytes of this part of the transfer that were used (only less than the total if an error occurred)

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: one of the function parameters is invalid
  - MAPI_E_CALL_FAILED: A network problem was encountered during the transaction

References mapi_object_get_handle(), mapi_object_get_logon_id(), and mapi_object_get_session().

_PUBLIC_ enum MAPISTATUS GetLocalReplicaIds | ( | mapi_object_t * | obj_store,
|  | uint32_t | IdCount,
|  | struct GUID * | ReplGuid,
|  | uint8_t | GlobalCount[6]
| ) |  |

Reserves a range of IDs to be used by a local replica

Parameters

  obj_store | pointer on the store MAPI object
  IdCount | ID range length to reserve
  ReplGuid | pointer to the GUID structure returned by the server
  GlobalCount | byte array that specifies the first allocated field

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: one of the function parameters is invalid
  - MAPI_E_CALL_FAILED: A network problem was encountered during the transaction

References mapi_object_get_handle(), mapi_object_get_logon_id(), and mapi_object_get_session().

_PUBLIC_ enum MAPISTATUS ICSSyncConfigure | ( | mapi_object_t * | obj,
|  | enum SynchronizationType | sync_type,
|  | uint8_t | send_options,
|  | uint16_t | sync_flags,
|  | uint32_t | sync_extraflags,
|  | DATA_BLOB | restriction,
|  | struct SPropTagArray * | property_tags,
|  | mapi_object_t * | obj_sync_context
| ) |  |

Prepare a server for ICS download

This function is used to configure a server for ICS (Incremental Change Synchronization) download. You use the synchronization context handle for other ICS and Fast Transfer operations.

Parameters

  obj | the target object for the upload (folder)
  sync_type | the type of synchronization that will be performed (just folder contents, or whole folder hierachy)
  send_options | flags that change the format of the transfer (see FXCopyMessages)
  sync_flags | flags that change the behavior of the transfer (see below)
  sync_extraflags | additional flags that change the behavior of the transfer (see below)
  restriction | a Restriction structure to limit downloads (only for sync_type == SynchronizationType_Content)
  property_tags | the properties to exclude (or include, if SynchronizationFlag_OnlySpecifiedProperties flag is set) in the download
  obj_sync_context | the resulting synchronization context handle

sync_flags can be zero or more of the following:

- SynchronizationFlag_Unicode to use Unicode format (must match in send_options)
- SynchronizationFlag_NoDeletions - whether to download changes about message deletion
- SynchronizationFlag_IgnoreNoLongerInScope - whether to download changes for messages that have gone out of scope.
- SynchronizationFlag_ReadState - server to download changes to read state
- SynchronizationFlag_FAI server to download changes to FAI messages
- SynchronizationFlag_Normal - server to download changes to normal messages
- SynchronizationFlag_OnlySpecifiedProperties - set means to include only properties that are listed in property_tags, not-set means to exclude properties that are listed in property_tags
- SynchronizationFlag_NoForeignIdentifiers - ignore persisted values (usually want this set)
- SynchronizationFlag_BestBody - format for outputting message bodies (set means original format, not-set means output in RTF)
- SynchronizationFlag_IgnoreSpecifiedOnFAI - ignore property_tags restrictions for FAI messages
- SynchronizationFlag_Progress - whether to output progress information.

Note
  SynchronizationFlag_IgnoreNoLongerInScope, SynchronizationFlag_ReadState, SynchronizationFlag_FAI, SynchronizationFlag_Normal, SynchronizationFlag_OnlySpecifiedProperties, SynchronizationFlag_BestBody and SynchronizationFlag_IgnoreSpecifiedOnFAI are only valid if the synchronization type is SynchronizationType_Content.

sync_extraflags can be zero or more of the following:

- SynchronizationExtraFlag_Eid - whether the server includes the PR_FID / PR_MID in the download
- SynchronizationExtraFlag_MessageSize - whether the server includes the PR_MESSAGE_SIZE property in the download (only for sync_type == SynchronizationType_Content)
- SynchronizationExtraFlag_Cn - whether the server includes the PR_CHANGE_NUM property in the download.
- SynchronizationExtraFlag_OrderByDeliveryTime - whether the server sends messages sorted by delivery time (only for sync_type == SynchronizationType_Content)

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: one of the function parameters is invalid
  - MAPI_E_CALL_FAILED: A network problem was encountered during the transaction

References mapi_object_get_handle(), mapi_object_get_logon_id(), mapi_object_get_session(), mapi_object_set_handle(), mapi_object_set_logon_id(), and mapi_object_set_session().

_PUBLIC_ enum MAPISTATUS ICSSyncGetTransferState | ( | mapi_object_t * | obj,
|  | mapi_object_t * | obj_sync_context
| ) |  |

obtain an object to get the sync transfer state

Parameters

  obj | the source object
  obj_sync_context | the synchronization transfer state object

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: one of the function parameters is invalid
  - MAPI_E_CALL_FAILED: A network problem was encountered during the transaction

References mapi_object_get_handle(), mapi_object_get_logon_id(), mapi_object_get_session(), mapi_object_set_handle(), mapi_object_set_logon_id(), and mapi_object_set_session().

_PUBLIC_ enum MAPISTATUS ICSSyncOpenCollector | ( | mapi_object_t * | folder,
|  | bool | isContentsCollector,
|  | mapi_object_t * | obj_collector
| ) |  |

Prepare a folder for ICS upload

Parameters

  folder | the folder for the collector creation
  isContentsCollector | true for contents collector, false for hierachy collector
  obj_collector | pointer to the resulting ICS collector

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: one of the function parameters is invalid
  - MAPI_E_CALL_FAILED: A network problem was encountered during the transaction

References mapi_object_get_handle(), mapi_object_get_logon_id(), mapi_object_get_session(), mapi_object_set_handle(), mapi_object_set_logon_id(), and mapi_object_set_session().

_PUBLIC_ enum MAPISTATUS ICSSyncUploadStateBegin | ( | mapi_object_t * | obj_sync_context,
|  | enum StateProperty | state_property,
|  | uint32_t | length
| ) |  |

Initialize an ICS Initial State upload.

This is one of three operations (along with ICSSyncUploadStateContinue and ICSSyncUploadStateEnd) used to send the initial state for an ICS download to the server.

Parameters

  obj_sync_context | the synchronization context (from ICSSyncConfigure)
  state_property | the type of ICS state that will be uploaded (see below)
  length | the length (in bytes) of the ICS state that will be uploaded

state_property can be one of the following:

- PidTagIdsetGiven
- PidTagCnsetSeen
- PidTagCnsetSeenFAI
- PidTagCnsetRead

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: one of the function parameters is invalid
  - MAPI_E_CALL_FAILED: A network problem was encountered during the transaction

References mapi_object_get_handle(), mapi_object_get_logon_id(), and mapi_object_get_session().

_PUBLIC_ enum MAPISTATUS ICSSyncUploadStateContinue | ( | mapi_object_t * | obj_sync_context,
|  | DATA_BLOB | state
| ) |  |

Send data for an ICS Initial State upload.

This is one of three operations (along with ICSSyncUploadStateBegin and ICSSyncUploadStateEnd) used to send the initial state for an ICS download to the server.

Parameters

  obj_sync_context | the synchronization context (from ICSSyncConfigure)
  state | the state data for this part of the upload

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: one of the function parameters is invalid
  - MAPI_E_CALL_FAILED: A network problem was encountered during the transaction

References mapi_object_get_handle(), mapi_object_get_logon_id(), and mapi_object_get_session().

_PUBLIC_ enum MAPISTATUS ICSSyncUploadStateEnd | ( | mapi_object_t * | obj_sync_context | ) |

Signal completion of an ICS Initial State upload.

This is one of three operations (along with ICSSyncUploadStateBegin and ICSSyncUploadStateContinue) used to send the initial state for an ICS download to the server.

Parameters

  obj_sync_context | the synchronization context (from ICSSyncConfigure)

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: one of the function parameters is invalid
  - MAPI_E_CALL_FAILED: A network problem was encountered during the transaction

References mapi_object_get_handle(), mapi_object_get_logon_id(), and mapi_object_get_session().

_PUBLIC_ enum MAPISTATUS SetLocalReplicaMidsetDeleted | ( | mapi_object_t * | obj_folder,
|  | const struct GUID | ReplGuid,
|  | const uint8_t | GlobalCountLow[6],
|  | const uint8_t | GlobalCountHigh[6]
| ) |  |

Mark a range of Message Ids as deleted / unused

This function allows the client to specify that a specific range of message identifiers will never be used on a particular folder. This allows the server to make optimisations for message identifier sets during incremental change synchronisation operations.

Parameters

  obj_folder | pointer to the folder MAPI object
  ReplGuid | the GUID for the MIDSET
  GlobalCountLow | lower end of the range to be marked as deleted
  GlobalCountHigh | upper end of the range to be marked as deleted

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: one of the function parameters is invalid
  - MAPI_E_CALL_FAILED: A network problem was encountered during the transaction

References mapi_object_get_handle(), mapi_object_get_logon_id(), and mapi_object_get_session().

_PUBLIC_ enum MAPISTATUS TellVersion | ( | mapi_object_t * | obj_store,
|  | uint16_t | version[3]
| ) |  |

Advise a server of the "other server" version

This function is used to set up a fast server-client-server transfer.

Parameters

  obj_store | pointer to the store MAPI object
  version | the server version

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: one of the function parameter is invalid
  - MAPI_E_CALL_FAILED: A network problem was encountered during the transaction

References mapi_object_get_handle(), mapi_object_get_logon_id(), and mapi_object_get_session().

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