var
buf2:array of byte; // Dynamic array to hold file data
...
ReadFile(hDiskFile, buf2, sizeof(buf2), intreadedamount, nil);
The dyn arrays and ansi strings are pointers to the control structures, not pointers to the data space.
If you use buf2 : array[1..n] of byte as Glen said, then...