IExchangeImportHierarchyChanges::ImportFolderChange
The ImportFolderChange method accepts a folder change notification from the synchronizer.
HRESULT ImportFolderChange(
ULONG cValue,
LPSPropValue lpPropArray
);
Parameters
-
cValue
-
Input parameter. The number of MAPI SPropValue array elements in lpPropArray.
-
lpPropArray
-
Input parameter. Points to an array of SPropValue structures, each of which contains a property tag and its value.
The array must contain at least the PR_PARENT_SOURCE_KEY, PR_SOURCE_KEY, PR_CHANGE_KEY, PR_PREDECESSOR_CHANGE_LIST, and MAPI PR_DISPLAY_NAME properties.
Return Values
See Return Values.
In addition, ImportFolderChange can return one of the following values:
-
SUCCESS_SUCCESS
-
The method completed successfully.
-
SYNC_E_CONFLICT
-
A conflict has occurred.
-
SYNC_E_ERROR
-
An unknown error occurred.
-
SYNC_NO_PARENT
-
Cannot locate the parent folder indicated by PR_PARENT_SOURCE_KEY.
-
SYNC_OBJECT_DELETED
-
The object has been deleted.
Remarks
The ImportFolderChange method is called by the synchronizer to import either a new folder or update an existing folder. This method should not be called from the agent.
To implement the ImportFolderChange method for a collector
-
Search for the folder whose PR_SOURCE_KEY property matches the PR_PARENT_SOURCE_KEY property.
-
If this folder does not exist, return SYNC_E_NO_PARENT.
-
Search for a folder that matches the PR_SOURCE_KEY property.
-
If the folder has been deleted, return SYNC_E_OBJECT_DELETED.
-
If the folder does not exist, create it as a sub-folder of the parent folder (specified by the PR_PARENT_SOURCE_KEY property).
-
If the folder exists and the imported change key (specified by the PR_CHANGE_KEY property) already appears in the predecessor change list, discard the change and return SUCCESS_SUCCESS.
-
If the folder exists and the imported change key does not appear in the predecessor change list (specified by the PR_PREDECESSOR_CHANGE_LIST property), but the predecessor change list of the existing folder is contained with the predecessor change list of the imported folder, replace the existing properties with the new properties.
-
If the folder exists, a conflict is detected, and conflicts are not allowed, return SYNC_E_CONFLICT.
-
If the folder exists, a conflict is detected, and conflicts are allowed, use the modification times of the conflicting properties to determine whether to update or ignore the property.
-
Return SUCCESS_SUCCESS.
See Also
IExchangeImportHierarchyChanges