CDLseek (FUN)ΒΆ
FUNCTION CDLseek : DINT
Repositions the file offset of an open file. lseek() sets the file offset of hFile to the argument offset according to the directive whence
- InOut:
Scope
Name
Type
Comment
Return
CDLseekDINTthe resulting offset location as measured in bytes from the beginning of the file or -1 if failed.
Input
hFileRTS_IEC_HANDLEFile descriptor/handle, that was previously created with Open()
offsetDINToffset in bytes
whenceDINT- one of the following flags:
SEEK_SET: The file offset is set to offset bytes
SEEK_CUR: The file offset is set to its current location plus offset bytes
SEEK_END:The file offset is set to the size of the file plus offset
pResultPOINTER TO DINT
Pointer to linux errno error code, 0 is ok