SysDirOpen
(FUN)
FUNCTION SysDirOpen : RTS_IEC_HANDLE
Opens a specified directory and returns a handle and the first directory entry.
szDirEntry is expected to provide enough space to write the direcory entry to.
In case szDirEntry is 0, the first directory entry may be retrieved with SysDirRead.
- InOut:
Scope
Name
Type
Comment
Return
SysDirOpen
RTS_IEC_HANDLE
Returns the runtime system error code (see CmpErrors.library)
Input
szDir
REFERENCE TO STRING
Name of directory.
Note
Empty string (‘’) is the request for the current working directory.
szDirEntry
REFERENCE TO STRING
OUT_PARAMETER, optional: Directory entry as string, may be 0
diMaxDirEntry
DINT
OUT_PARAMETER, optional: Max number of bytes to write in pszDirEntry
pDirInfo
POINTER TO DirInfo
OUT_PARAMETER, optional: Directory information, may be 0
pResult
POINTER TO RTS_IEC_RESULT
OUT_PARAMETER: Pointer to runtime system error code (see CmpErrors.library)