API Requirements S_OK Function was successfully called Visual Basic sample code Option Explicit Dim WithEvents evtLogger As TCEVENTLOGGERLib.TcEventLog ' form load Private Sub Form_Load() ' get the one and only event logger Set evtLogger = New TcEventLog End Sub ' event method Private Sub evtLogger_OnShutdown(ByVal shutdownParm As Variant) Debug.Print shutdownParm End Sub 9.3.5.9 OnNewEventConfiguration _ITcEventLogEvents [ } 144] This event method is called on all clients that implement and connect this event interface when all active events are cleared. This methods is called whenever the ITcEventLog::Reset Method was called and any Eventformatter has been reinitialized.
The method is not called when ITcEventLog::Reset was called but no Formatter was reloaded. HRESULT OnNewEventConfiguration(); Parameters S_OK Function was successfully called C# sample code using TCEVENTLOGGERLib; . . . TcEventLog tcEventLogger = new TcEventLog(); tcEventLogger.OnNewEventConfiguration += new _ITcEventLogEvents_OnNewEventConfigurationEventHandler(tcEventLogger_OnNewEventConfiguration); . . . void tcEventLogger_OnNewEventConfiguration() { Console.WriteLine("tcEventLogger_OnNewEventConfiguration"); } 9.3.6 ITcEnumEvents The ITcEnumEvents interface is used to iterate through a list of events.
The interface derives from IUnknown so that it could be used by all languages that support COM custom interfaces. TcEventLogger 150 Version: 1.1 index TcEventHeader [} 181] item Description 0 REASON INVALID _ Invalid 1 REASON TCSTOP _ The TwinCAT system shuts down 2 REASON SYSSHUTDOWN _ The operating systems shuts down