Microsoft Foundation Classes (mfc.hlp) (Table of Contents; Topic list)
CFile::Read
CFile                                       Up Contents Index Back
──Microsoft Foundation Classes──────────────────────────────────────────────
 
  virtual UINT Read( void FAR* lpBuf, UINT nCount )
  throw( CFileException );
 
  Parameter   Description
 
  <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.
 
  Remarks
 
  Reads data into a buffer from the file associated with the CFile
  object.
 
  Return Value
 
  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.
 
  Example
 
  extern CFile cfile;
  char pbuf[100];
  UINT nBytesRead = cfile.Read( pbuf, 100 );
 
 
  See Also
 
  CFile::Write
 
 
                                     -♦-