IAsyncReader::SyncRead (Compact 2013)

3/26/2014

This method performs a synchronous read.

Syntax

HRESULT SyncRead(
  LONGLONG llPosition,
  LONG lLength,
  BYTE* pBuffer
);

Parameters

  • llPosition
    [in] Absolute file position.
  • lLength
    [in] Number of bytes required.
  • pBuffer
    [out] Where the data is written.

Return Value

Returns an HRESULT value that depends on the implementation of the interface. Current DirectShow implementation return values include the following.

Value

Description

VFW_E_BADALIGN

An invalid alignment was specified.

HRESULT_FROM_WIN32

Microsoft Win32® error.

S_FALSE

Size changed (probably due to end of file).

S_OK

Success.

Remarks

The SyncRead method works in a stopped state as well as in a running state. The read is not necessarily aligned. This method fails if the read is beyond the actual total length.

Requirements

Header

dshow.h

Library

Strmiids.lib

See Also

Reference

IAsyncReader Interface