BinaryReadEx Function
Keywords:
The relatively new BinaryReadEx function allows you to allocate a buffer size smaller than the file that you intend to read (with the BinaryReadEx function).So for example, if you want to read 8 bytes of a file that is, say, 53 bytes, you can do a BinaryAlloc(8) to allocate 8 bytes, and then read just 8 bytes out of that file, e.g.:
file = "hello.txt" buf = BinaryAlloc(8) rc = BinaryReadEx(buf, 0, file, 0, 8) Message("BinaryReadEx returned", rc) BinaryFree(buf)
Article ID: W14146Filename: BinaryReadEx.txt