다음을 통해 공유


Navigating the Events Sample Source Code

Topic Last Modified: 2006-06-11

The following files contain the source code for the Exchange Store Events sample application and are installed along with the Exchange Server 2003 Software Development Kit (SDK) in the following directory: \Program Files\Exchange SDK\SDK\Samples\Events\. For each source file, a list of the functions or subprocedures relevant to Exchange store events and their descriptions is given.

Visual C++ event sinks (ExEv.cpp)

Function Description

CExEv::OnSave(IExStoreEventInfo * pEventInfo, BSTR bstrURLItem, LONG lFlags)

Implements the asynchronous save event sink.

CExEv::OnDelete(IExStoreEventInfo * pEventInfo, BSTR bstrURLItem, LONG lFlags)

Implements the asynchronous delete event sink.

CExEv::OnSyncSave(IExStoreEventInfo * pEventInfo, BSTR bstrURLItem, LONG lFlags)

Implements the synchronous save event sink.

CExEv::OnSyncDelete(IExStoreEventInfo * pEventInfo, BSTR bstrURLItem, LONG lFlags)

Implements the synchronous delete event sink.

CExEv::OnTimer(BSTR bstrURLItem, LONG lFlags)

Implements the system timer event sink.

CExEv::OnMDBStartUp(BSTR bstrMDBGuid, BSTR bstrMDBName, LONG lFlags)

Implements the system MDB start up event sink.

CExEv::OnMDBShutDown(BSTR bstrMDBGuid, LONG lFlags)

Implements the system MDB shut down event sink.

Visual Basic asynchronous event sinks (AsyncEvents.cls)

Subprocedure Description

IExStoreAsyncEvents_OnSave(ByVal pEventInfo As Exoledb.IExStoreEventInfo, ByVal bstrURLItem As String, ByVal lFlags As Long)

Implements the asynchronous save event sink.

IExStoreAsyncEvents_OnDelete(ByVal pEventInfo As Exoledb.IExStoreEventInfo, ByVal bstrURLItem As String, ByVal lFlags As Long)

Implements the asynchronous delete event sink.

sendMessage(ByVal strTo As String, ByVal strFrom As String, ByVal strSubject As String, ByVal strBody As String)

Sends a notification e-mail message to the "sampleuser" account.

Visual Basic synchronous event sinks (SyncEvents.cls)

Subprocedure Description

IExStoreSyncEvents_OnSyncSave(ByVal pEventInfo As Exoledb.IExStoreEventInfo, ByVal bstrURLItem As String, ByVal lFlags As Long)

Implements the synchronous save event sink.

IExStoreSyncEvents_OnSyncDelete(ByVal pEventInfo As Exoledb.IExStoreEventInfo, ByVal bstrURLItem As String, ByVal lFlags As Long)

Implements the synchronous delete event sink.

sendMessage(ByVal strTo As String, ByVal strFrom As String, ByVal strSubject As String, ByVal strBody As String)

Sends a notification e-mail message to the "sampleuser" account.

Visual Basic system event sinks (SystemEvents.cls)

Subprocedure Description

IExStoreSystemEvents_OnMDBStartUp(ByVal bstrMDBGuid As String, ByVal bstrMDBName As String, ByVal lFlags As Long)

Implements the system OnMDBStartUp event sink.

IExStoreSystemEvents_OnMDBShutDown(ByVal bstrMDBGuid As String, ByVal lFlags As Long)

Implements the system OnMDBShutDown event sink.

IExStoreSystemEvents_OnTimer( ByVal bstrURLItem As String, ByVal lFlags As Long)

Implements the system timer event sink.

sendMessage(ByVal strTo As String, ByVal strFrom As String, ByVal strSubject As String, ByVal strBody As String)

Sends a notification e-mail message to the "sampleuser" account.

Visual Basic event registration (frmEventSample.frm)

Subprocedure Description

cmdCreateAsyncEvtReg_Click()

Creates an asynchronous event registration item.

cmdCreateSystemEvtReg_Click()

Creates a system event registration item.

cmdCreateSyncEvtReg_Click()

Creates a synchronous event registration item.

cmdDelEvtReg_Click()

Deletes an event registration item.

cmdDisEvtReg_Click()

Disables/enables an event registration item.