Centreon_EventLog_2_Syslog.MyService.OnStart C# (CSharp) Method

OnStart() protected method

Set things in motion so your service can do its work.
protected OnStart ( string args ) : void
args string
return void
        protected override void OnStart(string[] args)
        {
            try
            {
                prog = new Program();
                Thread t = new Thread(prog.Start);
                t.Start();
            }
            catch (Exception ex)
            {
                EventLog.WriteEntry("EventToSyslog problem", ex.Message, EventLogEntryType.Error, 15);
            }
        }