SysFileOpen (FUN)
FUNCTION SysFileOpen : RTS_IEC_HANDLE
Note
File name can contain an absolute or relative path to the file. Path entries must be separated with a Slash (/) and not with a Backslash (\)!
- InOut:
Scope
Name
Type
Comment
Return
SysFileOpenRTS_IEC_HANDLEHandle to the file or RTS_INVALID_HANDLE if failed
Input
szFileSTRING
File name. File name can contain an absolute or relative path to the file. Path entries must be separated with a Slash (/) and not with a Backslash (\)!
amRequested access mode to the file. See ACCESS_MODE for details.Here find some examples:- AM_READ
If file does not exist, an error is returned. If the file exists, the file will be opened
- AM_WRITE
If file does not exist, a new file will be created. If the file exists, it will be overwritten!
- AM_APPEND
If the file does not exist, an error is returned. If the file exists, the file will be opened
pResultPOINTER TO RTS_IEC_RESULT
Pointer to runtime system error code (see CmpErrors.library)