CAtlTemporaryFile::Read

 

Call this method to read data from the temporary file starting at the position indicated by the file pointer.

Syntax

      HRESULT Read(
   LPVOID pBuffer,
   DWORD nBufSize,
   DWORD& nBytesRead 
) throw( );

Parameters

  • 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.

Return Value

Returns S_OK on success, or an error HRESULT on failure.

Remarks

Calls CAtlFile::Read. To change the position of the file pointer, call CAtlTemporaryFile::Seek.

Example

See the example for CAtlTemporaryFile::CAtlTemporaryFile.

Requirements

Header: atlfile.h

See Also

CAtlTemporaryFile Class
CAtlTemporaryFile::Write