API 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 of the event reset date and time Dim timeMs As Long timeMs = evt.MsReset Debug.Print timeMs 9.3.8.22 UserData ITcEvent [ } 157] The property returns the user defined data of the event. The user data was assigned when the event was issued from the PLC function block (or other ADS device) or from a call to a Report EventFunction like IT [ } 137]cEventLogC [ } 137] ::
ReportEvent [ } 138] , ITcEventC3 [ } 141] :: ReportEventEx [ } 143] or ITcEventLog [ } 129] :: ReportEvent [ } 129] with the TcEventFlags [ } 180] . HRESULT UserData([out, retval] long *pVal); Parameters pVal [out, retval] Pointer to a BOOL value that receives the confirmation flag. Itґs false if the value is 0, itґs true if the value is not equal to 0. 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 MustConfirm flag Dim mustConf As Long mustConf = evt.mustConfirm If mustConf 0 Then Debug.Print "Must Confirmed!" Else Debug.Print "Must Not Confirmed!" End If TcEventLogger 173 Version: 1.1