Platform SDK: Exchange 2000 Server |
[This is preliminary documentation and subject to change.]
Called by store when an item is being deleted.
[Visual Basic, VBScript] Sub OnSyncDelete( pEventInfo As IExStoreEventInfo, bstrURLItem As String, lFlags As Long ) [C++] HRESULT OnSyncDelete( IExStoreEventInfo * pEventInfo, BSTR bstrURLItem, LONG lFlags ); [IDL] HRESULT OnSyncDelete( [in] IExStoreEventInfo * pEventInfo, [in] BSTR bstrURLItem, [in] LONG lFlags );
Decimal Equivalent | C++ Enum Equivalent | Meaning |
---|---|---|
256 | EVT_MOVE | The item was moved over resulting in an implicit delete. |
512 | EVT_COPY | The item was copied over resulting in an implicit delete. |
32 | EVT_HARDDELETE | The item has left the information store (hard delete). |
16 | EVT_SOFTDELETE | The item has been moved to the dumpster (soft delete). |
2 | EVT_IS_COLLECTION | The item being deleted is a collection. |
33554432 | EVT_SYNC_COMMITTED | Synchronous committed event. |
67108864 | EVT_SYNC_ABORTED | Synchronous aborted event. |
1073741824 | EVT_INVALID_URL | The URL passed to the sink as invalid. |
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 "OnSyncDelete" (C++ constant = EVT_ON_SYNC_DELETE).
This event supports the following Registration Item properties:
This event is fired to an item being deleted from the store, or when an item is moved in the store. This event does not fired when the item's parent folder is moved or deleted.
The OnDelete event uses the EVT_HARDDELETE and EVT_SOFTDELETE flags to distinguish between hard and soft delete. A soft delete is defined as a delete that moves an item into the dumpster (the deleted folder within each folder). A hard delete is defined as a delete in which an item is completely removed from the store.
Aborting the transaction associated with this event will prevent the item from being deleted. If you abort an event that is the result of a move, then both the save and delete steps of the move will be aborted. This means that the original item will not be deleted and the new item will not be saved.
See Synchronous Events and Synchronous Event_Details for more information.