IRdcFileReader::Read method (msrdc.h)

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

Syntax

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

Parameters

[in] offsetFileStart

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

[in] bytesToRead

Number of bytes to be read.

[out] bytesActuallyRead

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

[out] buffer

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

[out] 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

Requirement Value
Minimum supported client Windows Vista
Minimum supported server Windows Server 2008
Target Platform Windows
Header msrdc.h
DLL MsRdc.dll

See also

IRdcFileReader