[r55]: / trunk / library / FB_FileControl / Write / svnobj  Maximize  Restore  History

Download this file

15 lines (14 with data), 2.1 kB

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
(* 
    Saves the contents of the buffer into a file.
    Be sure to call Open() before calling Save()
*)
METHOD Write : 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
    Write := SysFile.SysFileWrite(hFile := FileHandle,
                                 pbyBuffer := pString,
                                 ulSize := Size,
                                 pResult := ADR(Write));
END_IF