_lread

  UINT _lread(hFile, lpBuffer, cbRead)    
  HFILE hFile; /* file handle */
  LPVOID lpBuffer; /* address of buffer for read data */
  UINT cbRead; /* length of data buffer */

The _lread function reads data from the specified file.

Parameters

hFile

Identifies the file to read from.

lpBuffer

Points to a buffer for the data read from the file.

cbRead

Specifies the number of bytes to read from the file.

Return Value

The return value indicates the number of bytes actually read from the file. If the number of bytes read is less than cbRead, the function reached the end of the file (EOF) before reading the specified number of bytes. The return value is -1 if the function failed.

Comments

This function is maintained for compatibility with previous versions of Windows. Win32 applications should use the ReadFile function to read from a file.

See Also

_lwrite, ReadFile