Поделиться через


CInternetFile::Read

Call this member function to read into the given memory, starting at lpvBuf, the specified number of bytes, nCount.

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

Параметры

  • lpBuf
    A pointer to a memory address to which file data is read.

  • nCount
    The number of bytes to be written.

Возвращаемое значение

The number of bytes transferred to the buffer. The return value may be less than nCount if the end of file was reached.

Заметки

The function returns the number of bytes actually read — a number that may be less than nCount if the file ends. If an error occurs while reading the file, the function throws a CInternetException object that describes the error. Note that reading past the end of the file is not considered an error and no exception will be thrown.

Исключения

This method can throw exceptions of type CInternetException*.

Требования

Header: afxinet.h

См. также

Основные понятия

CInternetFile Class

CInternetFile Members

Hierarchy Chart