This method retrieves the status of the current sample's latest asynchronous update. If the update is not complete, you can force it to complete.

HRESULT CompletionStatus(
  DWORD dwFlags,
  DWORD dwMilliseconds


  • dwFlags
    [in] Value that specifies whether to forcibly complete the update. This value is a combination of one or more of the following flags.

    Value Description
    COMPSTAT_NOUPDATEOK (0x01) Force the update to complete as soon as possible, even if the sample update is not yet complete. If the sample is updating and you did not set the COMPSTAT_WAIT flag, the method returns MS_S_PENDING. If the sample is waiting to be updated, this method removes it from the queue and returns MS_S_NOTUPDATED.
    COMPSTAT_WAIT (0x02) Wait until the sample finishes updating before returning from this method.
    COMPSTAT_ABORT (0x04) Forces the update to complete, even if it is currently updating. This leaves the sample data in an undefined state. Combine this value with the COMPSTAT_WAITFORCOMPLETION flag to ensure that the update canceled.
  • dwMilliseconds
    [in] If the dwFlags parameter is COMPSTAT_WAIT, this value is the number of milliseconds to wait for the update to complete. Specify INFINITE to indicate that you want to wait until the sample updates before this call returns.

Return Values

Returns one of the following values.

Value Description
E_ABORT The update aborted.
MS_S_ENDOFSTREAM The sample was not updated because it reached the end of the stream.
MS_S_NOUPDATE The update was forcibly completed; the sample was not updated by the stream.
MS_S_PENDING An asynchronous update is pending.
S_OK Success.


DirectShow applications and DirectShow filters have different include file and link library requirements. See Setting Up the Build Environment for more information.

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

See Also

IStreamSample Interface

Last updated on Wednesday, April 13, 2005

© 2005 Microsoft Corporation. All rights reserved.