beckhoff — 9.3.8.3 SrcId

API Visual Basic sample code ' get the one and only event logger Dim evtLogger As TCEVENTLOGGERLib.TcEventLog Set evtLogger = New TCEVENTLOGGERLib.TcEventLog ' get the most recent active event Dim evt As TcEvent Set evt = evtLogger.GetLastEvent ' get the message in English Dim strMessage As String strMessage = evt.GetMsgString(1033) Debug.Print strMessage Remarks Most standard formatter like the XML base formatter (TcEventFormatter.TcXmlFormatter) will try to return a string for the default language if the requested language does not exist in the configuration of the formatter. *LCID: for more information see MSDN Library 9.3.8.2 Id ITcEvent [ } 157] The property returns the event id.

Together with the source id the event id describes one event. HRESULT Id([out, retval] long *pVal); Parameters pVal [out, retval] Pointer to a long value that receives the event id. Return Values S_OK Function was successfully called E_POINTER pVal was no valid pointer. Visual Basic sample code ' get the one and only event logger Dim evtLogger As TCEVENTLOGGERLib.TcEventLog Set evtLogger = New TCEVENTLOGGERLib.TcEventLog ' get the most rescnt active event Dim evt As TcEvent Set evt = evtLogger.GetLastEvent ' get the event id Dim id As Long id = evt.id Debug.Print id 9.3.8.3 SrcId ITcEvent [ } 157] TcEventLogger 159 Version: 1.1