FUNCTION SysDirRead : RTS_IEC_RESULT
Read next directory entry. Writes the entry in pszDirEntry.
|
InOut:
|
|
Scope
|
Name
|
Type
|
Comment
|
|
Return
|
SysDirRead
|
RTS_IEC_RESULT
|
Returns the runtime system error code (see CmpErrors.library)
-
ERR_OK: Entry could be read
-
ERR_END_OF_OBJECT: If end of directory list was reached
-
ERR_PARAMETER: If one of the parameters is invalid
-
ERR_BUFFERSIZE: If iMaxDirEntry is too short to get the complete directory entry string
Note
Typically after error ERR_BUFFERSIZE, the dir-handle is set to the next entry, so this entry will be missed!
|
|
Input
|
hDir
|
RTS_IEC_HANDLE
|
Handle to directory opened with SysDirOpen
|
|
Inout
|
szDirEntry
|
STRING
|
OUT_PARAMETER: Directory entry as string
|
|
Input
|
diMaxDirEntry
|
DINT
|
OUT_PARAMETER: Max number of bytes to write in pszDirEntry
|
|
pDirInfo
|
POINTER TO DirInfo
|
OUT_PARAMETER: Directory information NOTE: Can be 0 (so only directory name is provided in pszDirEntry)
|
|