beckhoff — 9.3.8.10 FmtProgId

API E_POINTER szName 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 source name in English Dim name As String name = evt.SourceName(1033) Debug.Print name 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.10 FmtProgId ITcEvent [ } 157] The property returns the Formatter ProgId. The ProgId is the link to the chosen formatter. The formatter was chosen when the event was issued from the PLC function block (or other ADS device) or from a call to a Report EventFunktion like IT [ } 137]cEventLogC [ } 137] :: ReportEvent [ } 138] , ITcEventC3 [ } 141] :: ReportEventEx [ } 143] or ITcEventLog [ } 129] :: ReportEvent [ } 129] . HRESULT FmtProgId([out, retval] BSTR *pVal); Parameters pVal [out, retval] Pointer to an BSTR String that receives the formatter ProgId. 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 formatter ProgId TcEventLogger 164 Version: 1.1