Exportieren (0) Drucken
Alle erweitern

CFile::Read

Reads data into a buffer from the file associated with the CFile object.


virtual UINT Read(
   void* lpBuf,
   UINT nCount 
);

Parameters

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.

The number of bytes transferred to the buffer. Note that for all CFile classes, the return value may be less than nCount if the end of file was reached.

//example for CFile::Read
extern CFile cfile;
char pbuf[100];
UINT nBytesRead = cfile.Read( pbuf, 100 );

For another example see CFile::Open.

Anzeigen:
© 2015 Microsoft