Read (FB; Prefix filrd)
FUNCTION_BLOCK Read EXTENDS CBM.ETrigToA
This function block reads the file, which was previously opened via ”FILE.Open”. If less characters can be read than specified in ”szBuffer”, the function block returns an active ”xDone” and indicates the current number of characters in ”szSize”. The size of the target memory structure for the bytes to be read and the number of bytes to be read will not be checked.
If the stability of the pointer on the data structures and their contents cannot be guaranteed in case of an online change, an online change must be avoided.
InOut:
Scope
Name
Type
Comment
Input hFile CAA.HANDLE File handle
pBuffer CAA.PVOID Target address for the first byte to be read; can be retrieved via operator ADR
szBuffer CAA.SIZE Maximum number of bytes to be read; can be retrieved via operator sizeof
Output eError ERROR Local library error ID (0: no error; 5101: time out)
szSize CAA.SIZE Current number of successfully read bytes; this value is already valid before xDone has been set