Thanks Xor-el. TBytes does compile OK, but the problem I have still continues.
Basically, I am caling an API of a propriatory software tool. Two of the API calls allows a programmer to get a file size, and read the file.
I get the file size first. That works OK. example : 162,273 bytes.
I then make the read call, which is supposed to read 162273 bytes of data from the file, into the buffer. But I've spent 3 hours wrestling with it and I just keep getting the SIGSEV error that is always generated when you try and pass either the wrong amount or the wrong thing to the wrong place.
The API read call I am trying to use is structured like this :
DWORD API_Read(
HANDLE hItem,
INT64 nStartOffset,
LPVOID lpBuffer,
DWORD nNumberOfBytesToRead,
);
So, file item number, starting offset, buffer to put data in, amount of data to put in it.
So, if you know the file size is assigned and reporting to be 162273, and you know the handle to the file item is valid, why on earth does this not just put in 162273 bytes from offset 0 into DataBuf?
intBytesRead := API_Read(Item, 0, @DataBuf, ItemSize);