IStreamSample::Update (Windows CE 5.0)

Send Feedback

This method performs a synchronous or an asynchronous update on the current sample.

HRESULTUpdate(DWORDdwFlags,HANDLEhEvent,PAPCFUNCpfnAPC,DWORDdwAPCData);

Parameters

  • dwFlags
    [in] Flag that specifies whether the update is synchronous or asynchronous.

    The SSUPDATE_ASYNC flag specifies an asynchronous update, which you can set if both hEvent and pfnAPC are NULL.

    Use SSUPDATE_CONTINUOUS to continuously update the sample until you call the IStreamSample::CompletionStatus method.

  • hEvent
    [in] Handle to an event that this method will trigger when the update is complete.

  • pfnAPC
    [in] Pointer to a Win32 asynchronous procedure call (APC) function that this method will call after it completes the sample update.

  • dwAPCData
    [in] Value that this method passes to the function specified by the pfnAPC parameter.

Return Values

Returns one of the following values.

Value Description
E_ABORT The update aborted.
E_INVALIDARG One of the parameters is invalid.
E_POINTER One of the parameters is invalid.
MS_E_BUSY This sample already has a pending update.
MS_S_ENDOFSTREAM Reached the end of the stream; the sample was not updated.
MS_S_PENDING The asynchronous update is pending.
S_OK Success.

Remarks

This method can be used to perform a synchronous or asynchronous update of a sample.

If hEvent and pfnAPC are NULL the update is synchronous unless the SSUPDATE_ASYNC or SSUPDATE_CONTINUOUS flag is specified.

When a synchronous update returns, the result of the function contains the I/O completion status.

You cannot specify values for both hEvent and pfnAPC; the method will fail.

Asynchronous updates might complete before the update returns; in that case, the return value is S_OK.

If you specify an event and the update returns S_OK, this method sets the event on return.

If you specify an APC function and the update returns S_OK, the APC is not queued and the function is not called.

Asynchronous updates that do not complete prior to returning return a value of MS_S_PENDING.

Applications that create multiple streams must read from each of them to avoid having their data blocked.

Requirements

DirectShow applications and DirectShow filters have different include file and link library requirements.

For more information, see Setting Up the Build Environment.

OS Versions: Windows CE 2.12 and later. Version 2.12 requires DXPAK 1.0 or later.

See Also

IStreamSample Interface

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.