_hread

3.1

  long _hread(hf, hpvBuffer, cbBuffer)    
  HFILE hf; /* file handle */
  void _huge* hpvBuffer; /* address of buffer for read data */
  long cbBuffer; /* length of data buffer */

The _hread function reads data from the specified file. This function supports huge memory objects (that is, objects larger than 64K, allocated using the GlobalAlloc function).

Parameters

hf

Identifies the file to be read.

hpvBuffer

Points to a buffer that is to receive the data read from the file.

cbBuffer

Specifies the number of bytes to be read from the file.

Return Value

The return value indicates the number of bytes that the function read from the file, if the function is successful. If the number of bytes read is less than the number specified in cbBuffer, the function reached the end of the file (EOF) before reading the specified number of bytes. The return value is –1L if the function fails.

See Also

_lread, hmemcpy, _hwrite