CAtlFile::Read
Call this method to read data from a file starting at the position indicated by the file pointer.
HRESULT Read(
LPVOID pBuffer,
DWORD nBufSize
) throw( );
HRESULT Read(
LPVOID pBuffer,
DWORD nBufSize,
DWORD& nBytesRead
) throw( );
HRESULT Read(
LPVOID pBuffer,
DWORD nBufSize,
LPOVERLAPPED pOverlapped
) throw( );
HRESULT Read(
LPVOID pBuffer,
DWORD nBufSize,
LPOVERLAPPED pOverlapped,
LPOVERLAPPED_COMPLETION_ROUTINE pfnCompletionRoutine
) throw( );
Параметры
pBuffer
Pointer to the buffer that will receive the data read from the file.nBufSize
The buffer size in bytes.nBytesRead
The number of bytes read.pOverlapped
The overlapped structure. See lpOverlapped in ReadFile in the Windows SDK.pfnCompletionRoutine
The completion routine. See lpCompletionRoutine in ReadFileEx in the Windows SDK.
Возвращаемое значение
Returns S_OK on success, or an error HRESULT on failure.
Заметки
The first three forms call ReadFile, the last ReadFileEx to read data from the file. Use CAtlFile::Seek to move the file pointer.
Требования
Header: atlfile.h