virtual UINT Read( void FAR* lpBuf, UINT nCount )
throw( CFileException );
lpBuf
Pointer to the user-supplied buffer that is to receive the data read from the file.
nCount
The maximum number of bytes to be read from the file. For text-mode files, carriage return–linefeed pairs are counted as single characters.
Reads data into a buffer from the file associated with the CFile object.
The number of bytes transferred to the buffer.
Note:
For all CFile classes, the return value may be less than nCount if the end of file was reached.
extern CFile cfile;
char pbuf[100];
WORD nBytesRead = cfile.Read( pbuf, 100 );