EventSink: OneWorldTransientEventSink.cls
This code illustrates how to create a COM+ component:
Option Strict Off Option Explicit On <System.Runtime.InteropServices.ProgId ("OneWorldTransientEventSink_NET.OneWorldTransientEventSink")> Public Class OneWorldTransientEventSink Implements EventClass.IOWEvent Public Event OneWorldEvent(ByVal EventName As String, ByVal Data As String) Public Sub IOWEvent_OneWorldEvent(ByVal EventName As String, ByVal Data As String) Implements EventClass.IOWEvent.OneWorldEvent Dim flsObject As New Scripting.FileSystemObject Dim varEventFile As Scripting.TextStream Dim strEventFile As String strEventFile = "C:\temp\eventDataPer.xml" 'UPGRADE_WARNING: Dir has a new behavior. Click for more: 'ms-help://MS.VSCC.2003/commoner/redir/redirect.htm?keyword= "vbup1041"' If Dir(strEventFile) = "" Then varEventFile = flsObject.CreateTextFile(strEventFile, False, False) Else varEventFile = flsObject.OpenTextFile(strEventFile, Scripting.IOMode.ForWriting, False) End If varEventFile.WriteLine(Data) varEventFile.Close() RaiseEvent OneWorldEvent(EventName, Data) End Sub End Class