IRdcFileReader::Read method

The Read method reads the specified amount of data starting at the specified position.

Syntax

HRESULT Read(
  ULONGLONG offsetFileStart,
  ULONG     bytesToRead,
  ULONG     *bytesActuallyRead,
  BYTE      *buffer,
  BOOL      *eof
);

Parameters

offsetFileStart

Offset from the start of the data at which to start the read.

bytesToRead

Number of bytes to be read.

bytesActuallyRead

Address of a ULONG that will receive the number of bytes read.

buffer

Address of the buffer that receives the data read. This buffer must be at least bytesToRead bytes in size.

eof

Address of a BOOL that is set to TRUE if the end of the file has been read.

Return Value

If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Remarks

Typically RDC will read the file sequentially from start to end. When reading signatures, the file may be read more than once.

If the BOOL pointed to by the eof parameter is not TRUE on return then the value pointed to by the bytesActuallyRead parameter must equal the bytesToRead parameter. If the value pointed to by the eof parameter is set, then the value pointed to by the bytesActuallyRead parameter can be any value between zero and the bytesToRead parameter.

Requirements

   
Windows version Windows Vista Windows Server 2008
Target Platform Windows
Header msrdc.h
DLL MsRdc.dll

See Also

IRdcFileReader