beckhoff — 9.3.8.9 SourceName

API Parameters pVal [out, retval] Pointer to a long value that receives the millisecond part of the event date and time. 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 recent active event Dim evt As TcEvent Set evt = evtLogger.GetLastEvent ' get the millisecond part Dim timeMs As Long timeMs = evt.Ms Debug.Print timeMs 9.3.8.9 SourceName ITcEvent [ } 157] The property SourceName returns the formatted source name for the requested language.

Internally it calls the method ITcLogFormatter::GetSourceName of the formatter that was assigned when the event was issued from a COM client or through an ADS call to the TcEventLog [ } 128] object of the TcEventLogger. HRESULT SourceName([in] long langId, [out,retval] BSTR* szName); Parameters langId [in] The language Id of the requested language. The requested language should be tagged by *LCIDs. The next table shows a sample for some language ids. In the configuration of the event formatter the languages are tagged by the same language id szName [out, retval] Pointer to an BSTR string that returns the formatted string for the event source name.

Return Values S_OK Function was successfully called TcEventLogger 163 Version: 1.1 LCID Description 1031 German 1033 US English 1034 Spanish - Spain 1036 French