Public Sub Write(ByVal text As String) Dim txt As New StreamWriter("C:\Dummy.txt") txt.WriteLine(text) txt.Close() End Sub
Imports ServiceDLLPublic Class Service1 Dim cl As New Class1() Protected Overrides Sub OnStart(ByVal args() As String) cl.Write("Service Started At : " + DateAndTime.Now) End Sub Protected Overrides Sub OnStop() cl.Write("Service Stoped At : " + DateAndTime.Now) End SubEnd Class