Export (0) Print
Expand All

OnSyncSave Method

Exchange Server 2003

OnSyncSave Method

This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.

Called by a store event source when an item is being saved.

Applies To

Type Library

EXOLEDB Type Library

DLL Implemented In

EXOLEDB.DLL

Syntax

        [Visual Basic]Sub OnSyncSave
(
    pEventInfo As IExStoreEventInfo,     bstrURLItem As String,     lFlags As LONG
)

        [C++]HRESULT OnSyncSave
(
    IExStoreEventInfopEventInfo,
    BSTR bstrURLItem,
    LONG lFlags
);

Parameters

pEventInfo
A pointer to an IExStoreEventInfo interface that can be used to obtain further information related to the event.
bstrURLItem
A string containing the URL of the item on which the event is occurring. This value is only valid if OLEDB or Distributed Authoring and Versioning (DAV) created the item; that is if the client set has the property PR_URL_COMP_NAME.
lFlags
The following (bitwise AND) flags can give you further information about the save event. You can also use hexidecimal equivalents of the decimal values.
Decimal ValueC++ Enum EquivalentMeaning
1EVT_NEW_ITEMThe item being saved is new.
2EVT_IS_COLLECTIONThe item being saved is a collection.
4EVT_REPLICATED_ITEMThe item is being saved as a result of replication.
8EVT_IS_DELIVEREDThe item is being saved as the result of message delivery.
64EVT_INITNEWThis flag is set at the first firing of the event sink. (Useful for initialization purposes. It is set only once during the lifetime of a created event sink.)
256EVT_MOVEThe item being saved is being moved.
512EVT_COPYThe item being saved is being copied.
1024EVT_DRAFT_CREATEThe item being saved is a newly created draft.
2048EVT_DRAFT_SAVEThe item being saved is a draft.
4096EVT_DRAFT_CHECKINThe item being saved is a draft check-in.
16777216EVT_SYNC_BEGINSynchronous begin event.
33554432EVT_SYNC_COMMITTEDSynchronous committed event.
67108864EVT_SYNC_ABORTEDSynchronous aborted event.
536870912EVT_INVALID_SOURCE_URLThe Source URL could not be obtained during a move operation.
1073741824EVT_INVALID_URLThe URL passed to the sink is invalid.
2147483648EVT_ERRORAn error occurred in the event.

Return Value

Returns S_OK if successful, or an error value otherwise.

Registration Properties

To register for this event, you need to set the registration item's EventMethod Field property to "OnSyncSave" (C++ constant = EVT_ON_SYNC_SAVE).

This event supports the following properties of Event Registration Items:

Criteria Field

Enabled Field

EventMethod Field

MatchScope Field

Priority Field

ScriptUrl Field

SinkClass Field

See Event Registration Items for more information about registration properties.

Remarks

This event is fired prior to the item being saved. This event is fired when a new item enters the store, when an existing item is saved, and when an item is moved or copied. This event does not fire when the item's parent folder is moved or copied.

Aborting the transaction associated with this event will cause the item to not be saved. If the event fired as a result of a move, aborting the transaction will abort the entire move; the original item will not be deleted and the new item will not be saved.

Synchronous events are always called twice, once for the transaction and once for the commit or abort action. See Synchronous Event Methods for more information.

Show:
© 2014 Microsoft