Implementing an OnMdbShutdown Event Sink
Implementing an OnMdbShutdown Event Sink
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.
The following code handles and logs the OnMdbShutdown system event. See Store Event Sink Bit Flags for more information.
Visual Basic
Private Sub IExStoreSystemEvents_OnMDBShutDown(ByVal bstrMDBGuid As String, ByVal lFlags As Long) Dim FSO As Object Dim EvtLog As String Dim EvtFile 'log file EvtLog = Environ("SystemDrive") & "\OnMDBShutDown.log" 'Creates new log file %SystemDrive%\OnMDBShutDown.log or opens it if exists Set FSO = CreateObject("Scripting.FileSystemObject") Set EvtFile = FSO.OpenTextFile(EvtLog, 8, True) 'Append incoming event info into log file EvtFile.WriteLine ("[VB Event Sink] OnMDBShutDown()") EvtFile.WriteLine (" MDB Guid " & bstrMDBGuid) EvtFile.WriteLine (" lFlags: " & "0x" & Hex(lFlags)) EvtFile.WriteBlankLines (1) 'Before Quit EvtFile.Close Set FSO = Nothing End Sub
Send us your feedback about the Microsoft Exchange Server 2003 SDK.
Build: June 2007 (2007.618.1)
© 2003-2006 Microsoft Corporation. All rights reserved. Terms of use.