Result1 : integer
Number of bytes or characters actually read.
Result2 : Buffer
Result data.
open_id : integer
Value provided by ASfCreate or ASfOpen.
data : buffer or string (allocated).
Data space for receiving result.
length: integer
Number of bytes or characters to read
The syntax 1 is better because it translates the data into the provided datatype (from or to Unicode if necessary), whenever the open mode.
The number given for <length> and of the result is the "natural" length, which will be:
For syntax 1:
• a number of bytes if the the 3rd parameter datatype is binary or text
• a number of characters if the 3rd parameter datatype is Unicode
For syntax 2:
• a number of bytes if the open mode is binary or text
• a number of Unicode characters if the open mode is Unicode