Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

OnDelete Method

Exchange Server 2003

This is fired by a store when an item is deleted.

Applies To

Type Library

EXOLEDB Type Library

DLL Implemented In

EXOLEDB.DLL

Syntax

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

[C++]HRESULT OnDelete
(
    IExStoreEventInfo* pEventInfo,
    BSTR bstrURLItem,
    LONG lFlags
);

Parameters

pEventInfo
A pointer to an IExStoreEventInfo interface that can be used to obtain additional information related to the event.
bstrURLItem
A string containing the URL of the deleted item. The URL item cannot be opened because the item has already been deleted.
lFlags

The following (bitwise AND) flags can give you additional information about the delete event.

Decimal Value C++ Enum Equivalent Description
2 EVT_IS_COLLECTION The item being deleted is a collection.
4 EVT_REPLICATED_ITEM The item is being replicated from another location.
16 EVT_SOFTDELETE The item was moved to the Recycle Bin (soft delete).
32 EVT_HARDDELETE The item was permanently deleted (hard delete).
64 EVT_INITNEW This flag is set at the first firing of the event. (This is useful for initialization purposes. It is set only once during the lifetime of a created event sink.)
256 EVT_MOVE The delete was part of a move operation.

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 "OnDelete" (C++ constant = EVT_ON_DELETE).

This event supports the following Event Registration Items properties:

Criteria Field

Enabled Field

EventMethod Field

MatchScope Field

ScriptUrl Field

SinkClass Field

See Event Registration Items for more information about registration properties.

Remarks

This event also fires as the delete part of a move operation. This event does not fire when the item's parent folder is moved or deleted.

See the IAsyncNotify Interface for information about processing asynchronous events in a Component Object Model (COM) object.

Show:
© 2014 Microsoft. All rights reserved.