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 - LogCopyInfo- RTS_IEC_RESULT- Returns 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 - hLogger- RTS_IEC_HANDLE- Handle 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)) - pszInfo- POINTER TO STRING - Infos string (typically provided by EVTPARAM_CmpLogAdd.pszInfo, if you call this function via callback registered at EVT_LogAdd)) - pargList- POINTER TO BYTE - pargList (typically provided by EVTPARAM_CmpLogAdd.pargList, if you call this function via callback registered at EVT_LogAdd)) - pszString- POINTER TO STRING - Destination string to copy log text into - pdiMaxStringLen- POINTER 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!