[r45]: / trunk / library / FileControl / FB_FileControl / Save / svnobj  Maximize  Restore  History

Download this file

13 lines (12 with data), 1.9 kB

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
// Saves the contents of the buffer into a file
// Be sure to call Open() before calling Save()
METHOD Save : SysFile.SysTypes.RTS_IEC_RESULT;
VAR_INPUT
    pString : POINTER TO BYTE; // Call with ADR();
    Size : UDINT; // Call with SIZEOF();
IF FileHandle <> SysFile.SysTypes.RTS_INVALID_HANDLE THEN
    SysFile.SysFileWrite(hFile := FileHandle,
                         pbyBuffer := pString,
                         ulSize := Size,
                         pResult := ADR(Save));
END_IF