|
Purpose
|
Reads the next segment in a data element. |
|
Return value
|
Returns the length of segment actually read if successful and FAIL (or -1) otherwise. |
|
Description
|
Hread begins reading at the current file position, reads the specified number of bytes, and increments the current file position by one. Calling Hread with the length = 0 reads the entire data element. To reposition an access identifier before writing data, use Hseek. |
|
|
If length is longer than the data element, the read operation is terminated at the end of the data element, and the number of read bytes is returned. Although only one access identifier is allowed per data element, it is possible to interlace reads from multiple data elements in the same file. It is assumed that data is large enough to hold the specified data length. |