Hello, I have code that has been working on windows 2000-2008 and xp-7 but for some reason on 2012 server the service fails to start. Here is the onstart code. Any ideas? Thanks in advance.
Protected Overrides Sub onstart(ByVal args() As String)
Dim now As Date = DateTime.Now
Dim dueTime As Integer ' milliseconds to the next top of hour
dueTime = 900000 - (now.Minute Mod 15) * 60000 - now.Second * 1000 - now.Millisecond
Dim oCallback As New TimerCallback(AddressOf OnTimedEvent)
oTimer = New System.Threading.Timer(oCallback, Nothing, dueTime, 900000)
EventLogToMonitor("Application")
EventLogToMonitor("Security")
EventLogToMonitor("System")
Dim myThreadDelegate As New ThreadStart(AddressOf OnTimedEvent)
Dim myThread As New Thread(myThreadDelegate)
myThread.Start()
End Sub