LogCopyInfo (FUN)ΒΆ
FUNCTION LogCopyInfo : RTS_IEC_RESULT
<SIL2/> Can be used to copy string within a callback registered at EVT_LogAdd (resolve string transported in EVTPARAM_CmpLogAdd.pszInfo and EVTPARAM_CmpLogAdd.pargList).
- InOut:
Scope
Name
Type
Comment
Return
LogCopyInfoRTS_IEC_RESULTReturns the runtime system error code (see CmpErrors.library) ERR_OK: Succeeded ERR_PARAMETER: One of the parameters invalid ERR_BUFFERSIZE: pszString too short to copy complete infos string
Input
hLoggerRTS_IEC_HANDLEHandle to the logger which was retrieved by LogCreate() or LogOpen(). Use LogConstant.LOG_STD_LOGGER as a pseudo handle to add this log entry to the standard plc logger. (typically provided by EVTPARAM_CmpLogAdd.hLog, if you call this function via callback registered at EVT_LogAdd))
pszInfoPOINTER TO STRING
Infos string (typically provided by EVTPARAM_CmpLogAdd.pszInfo, if you call this function via callback registered at EVT_LogAdd))
pargListPOINTER TO BYTE
pargList (typically provided by EVTPARAM_CmpLogAdd.pargList, if you call this function via callback registered at EVT_LogAdd))
pszStringPOINTER TO STRING
Destination string to copy log text into
pdiMaxStringLenPOINTER TO DINT
Variable that holds the length of the pszString buffer! NOTE: If pszString is too short, you get a return error code ERR_BUFFERSIZE and here you get the real length of the needed buffer!