Download this file
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
VAR TempBuf : STRING(GVL_Param_XmlControl.MaxFileSize); pTempBuf : POINTER TO BYTE; pByteIn : POINTER TO BYTE; pByteBuffer : POINTER TO BYTE; i : UDINT; END_VAR IsGet //save current buffer to temporary buffer pByteBuffer := pStrBuf; FOR i := 0 TO (udiBufsize-1) DO TempBuf[i] := pByteBuffer[i]; END_FOR pByteIn := ADR(Prepend); WHILE pByteIn^ <> 0 AND (udiLength < udiBufSize ) DO pByteBuffer^ := pByteIn^; udiLength := udiLength + 1; pByteIn := pByteIn + 1; pByteBuffer := pByteBuffer + 1; END_WHILE; pTempBuf := ADR(TempBuf); WHILE pTempBuf^ <> 0 AND (udiLength < udiBufSize ) DO pByteBuffer^ := pTempBuf^; pTempBuf := pTempBuf + 1; pByteBuffer := pStrBuf + udiLength; (* String End *) pByteBuffer^ := 0; (* nul terminated string *)