tSysFileOpen (STRUCT)

TYPE tSysFileOpen : STRUCT

Parameter to open a file asynchronously
InOut:

Name

Type

Comment

szFile

STRING

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 (\)!

am

ACCESS_MODE

Requested 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

pResult

POINTER TO RTS_IEC_RESULT

[OUT] Pointer to the runtime system error code (see CmpErrors2 Interface Library)

pulOut

POINTER TO RTS_IEC_HANDLE

[OUT] Handle to the file or RTS_INVALID_HANDLE if failed