次の方法で共有


IMediaEvent::WaitForCompletion (Windows Embedded CE 6.0)

1/6/2010

This method blocks execution of the application thread until the graph's operation finishes.

Syntax

HRESULT WaitForCompletion(
  long msTimeout,
  long* pEvCode
);

Parameters

  • msTimeout
    [in] Duration of the time-out, in milliseconds. Pass zero to return immediately. To block indefinitely, pass INFINITE.
  • pEvCode
    [out] Event that terminated the wait. This value can be one of the following:

    Value Description

    EC_COMPLETE

    Operation completed.

    EC_ERRORABORT

    Error. Playback cannot continue.

    EC_USERABORT

    User terminated the operation.

    Zero (0)

    Operation has not completed.

Return Value

Returns one of the following HRESULT values.

Value Description

E_ABORT

Function timed out before the operation completed. This is equivalent to a zero pEvCode value.

S_OK

Operation completed.

Remarks

This method is the equivalent of blocking until the event notification EC_COMPLETE, EC_ERRORABORT, or EC_USERABORT is received, or the time-out occurs.

When this method returns, the filter graph is still running. This method assumes that separate calls to the IMediaEvent interface are not being made. This method fails if the graph is not in or transitioning into a running state.

The time-out parameter (msTimeout) specifies the length of time to wait for completion. To test if the operation completed, specify a zero msTimeout value and check the event code value (pEvCode) for zero, indicating that the operation is not completed.

Requirements

Windows Embedded CE Windows CE 2.12 and later
Note Microsoft DirectShow applications and DirectShow filters have different include file and Library requirements
For more information, see Setting Up the Build Environment, Version 2.12 requires DXPAK 1.0 or later

See Also

Reference

IMediaEvent Interface