Microsoft Windows CE 3.0  

IAsyncReader::WaitForNext

Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

Blocks until the next read requested through IAsyncReader::Requestcompletes or the time-out occurs.

HRESULT WaitForNext(
DWORD
dwTimeout
,
IMediaSample **
ppSample
,
DWORD *
pdwUser
);

Parameters

dwTimeout
[in] Time-out in milliseconds; can be zero or INFINITE.
ppSample
[out] Completed sample.
pdwUser
User context.

Return Values

Returns an HRESULTvalue that depends on the implementation of the interface. Current DirectShow implementation return values include:

Value Description
VFW_E_TIMEOUT A time-out has expired.
VFW_E_WRONG_STATE The operation could not be performed because the filter is in the wrong state.
E_FAIL Failure.
S_OK Success.

Remarks

Samples may not be returned in order. If there is a read error of any sort, a notification will already have been sent by the source filter, and HRESULTwill be an error. If ppSampleis not null, a request has been completed with the result code returned.

The pdwUserparameter returns the caller's context DWORDcorresponding to the sample returned.