dwRead = 8191 when this happens.
I tried to change databuffer to
databuffer : array[0..8191] of char;
- in this case, dwRead becomes 16383.
As dwRead is the number of Bytes, the problem is: Either use Ansistring(1) or change the index(2)?
1: This would only make sense if the returned value also is
Ansi-kind of string - and obviosly it is no more, else this wouldn't happen..?
2: Does not make sense for me, because "Number of Bytes to read" should equal "number of Bytes read" - shouldn't it? Can #0 be used for Unicodestrings/Chars anyway?
PS: I write in english to ensure the creator of this thread could follow the discussion, too, if he wants ...