WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

Functions

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

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:   W14146
Filename:   BinaryReadEx.txt
File Created: 1999:06:09:14:33:56
Last Updated: 1999:06:09:14:33:56