A PChar can act as a buffer which you could write to a memeory stream. Then you could read the file from the memory stream into whatever structure you want.

Another way is to
[pascal]
Type
TCharArray : Array[1..65000] of Char;

...

Data := TCharArray(PChar);
[/pascal]