Platform SDK: Exchange 2000 Server |
[This is preliminary documentation and subject to change.]
Called by a store event source when an item is being saved.
[Visual Basic, VBScript] Sub OnSyncSave( pEventInfo As IExStoreEventInfo, bstrURLItem As String, lFlags As Long ) [C++] HRESULT OnSyncSave( IExStoreEventInfo * pEventInfo, BSTR bstrURLItem, LONG lFlags ); [IDL] HRESULT OnSyncSave( [in] IExStoreEventInfo * pEventInfo, [in] BSTR bstrURLItem, [in] LONG lFlags );
Decimal Value | C++ Enum Equivalent | Meaning |
---|---|---|
2 | EVT_IS_COLLECTION | The item being saved is a collection. |
1 | EVT_NEW_ITEM | The item being saved is new. |
4 | EVT_REPLICATED_ITEM | The item is being saved as a result of replication. |
67108864 | EVT_SYNC_ABORTED | Synchronous aborted event. |
16777216 | EVT_SYNC_BEGIN | Synchronous begin event. |
33554432 | EVT_SYNC_COMMITTED | Synchronous committed event. |
8 | EVT_IS_DELIVERED | The item is being saved as the result of message delivery. |
1073741824 | EVT_INVALID_URL | The URL passed to the sink is invalid. |
1024 | EVT_DRAFT_CREATE | The item being saved is a newly created draft. |
2048 | EVT_DRAFT_SAVE | The item being saved is a draft. |
4096 | EVT_DRAFT_CHECKIN | The item being saved is a draft check in. |
2147483648 | EVT_ERROR | An error occurred in the event. |
You return one of the following values:
Return Value | C++ Enum Equivalent | Description |
---|---|---|
S_OK | S_OK | Continue with the transaction |
67108864 | EVT_SYNC_ABORTED | Abort the event |
To register for this event, you need to set the registration item's eventmethod property to "OnSyncSave" (C++ constant = EVT_ON_SYNC_SAVE).
This event supports the following Registration Item properties:
See The Registration Item for more information on registration properties.
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 fired 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 commit or abort. See Synchronous OLE DB Store Events for more information.